Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (58)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (9816)

  • On upload rename the file to input.mp4 not working

    7 septembre 2014, par T.A.R.D.I.S_wolf

    Ok so i’m trying to make it to were the file is uploaded then renamed to input.mp4 so that it over rights the old one. But its not working ?

    But it still keeps uploading with the original file name.
    Or is there a way to just delete the files in the folder uploads after 30 min ? Both the uploaded file and output file.

    <?php
    $fileName = $_FILES["file1"]["name"]; // The file name
    $fileTmpLoc = $_FILES["file1"]["tmp_name"]; // File in the PHP tmp folder
    $fileType = $_FILES["file1"]["type"]; // The type of file it is
    $fileSize = $_FILES["file1"]["size"]; // File size in bytes
    $fileErrorMsg = $_FILES["file1"]["error"]; // 0 for false... and 1 for true
    if (!$fileTmpLoc) { // if file not chosen
       echo "ERROR: Please browse for a file before clicking the upload button.";
       exit();
    }

       $newfilename = $fileName . input.mp4';
       rename($fileName, $newfilename);

    if(move_uploaded_file($fileTmpLoc, "uploads/$newfilename")){

     echo "Starting ffmpeg... <br />";
     echo shell_exec("ffmpeg -y -i uploads/".$newfilename." uploads/output.mp3");
     echo "Done. <br /><br />";

    echo '<a href="http://test.tw-wcs.com:82/ffmpeg/MP4_To_MP3/uploads/output.mp3" target="_blank">Click Here</a> To open your file in a new tab.';

    } else {
       echo "move_uploaded_file function failed";
    }
    ?>
  • Concatenate multiple video files alongside delayed audio files

    28 mars 2022, par Spartan 117

    I am currently working on a utility that is responsible for pulling audio and video files from the cloud and merging them together via FFMPEG. As I am new to FFMPEG, I am going to split the question into an FFMPEG part and a C# part just so people can answer either 1 part or the other (or both !).

    &#xA;

    FFMPEG Part

    &#xA;

    Currently, I have a working FFMPEG arg if there is only 1 video file present and it needs to be merged with multiple files.

    &#xA;

    ffmpeg -i input1.mkv -i input1.mka -i input2.mka -i input3.mka -i input4.mka -filter_complex "[1:a]adelay=0s:all=1[a1pad];[2:a]adelay=20s:all=1[a2pad];[3:a]adelay=30s:all=1[a3pad];[4:a]adelay=40s:all=1[a4pad];[a1pad][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]" -map [aout] -map 0:0 output4.mkv&#xA;

    &#xA;

    The delays you see in there are determined by subtracting the start time of each file from the start time of the earliest created audio or video file. I know that if I wanted to create a horizontal stack of multiple videos, i could just do

    &#xA;

    ffmpeg -i input1.mkv -i input1.mka -i input2.mkv -i input2.mka -i input3.mka -i input4.mka&#xA;-filter_complex &#xA;"[2:v]tpad=start_duration=120:color=black[vpad]; &#xA; [3:a]adelay=120000:all=1[a2pad]; &#xA; [4:a]adelay=180000:all=1[a3pad];&#xA; [5:a]adelay=200000:all=1[a4pad]; &#xA; [0:v][vpad]hstack=inputs=2[vout]; &#xA; [1:a][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]" &#xA; -map [vout] -map [aout] &#xA; output.mkv&#xA;

    &#xA;

    but what I want to do is both keep those delays for the audio and video files AND concatenate (not stack) those videos, how would i go about doing that ?

    &#xA;

    C# Part

    &#xA;

    You see that giant arg up there ? The utility is supposed to generate that based on a List of recordings. Here is the model.

    &#xA;

    List<filemodel> _records;&#xA;public class FileModel {&#xA;  public string Id { get; set; }&#xA;  public string FileType { get; set; }&#xA;  public string StartTime { get; set; }&#xA;}&#xA;</filemodel>

    &#xA;

    The utility has to then go through that list and create the arg (as seen in the FFMPEG part) to be executed by the Xabe.FFMPEG package. The way i was thinking to approach this is to basically create 2 string builders. 1 string builder will be responsible for dealing with the inputs, the other string builder. Here is what i have so far

    &#xA;

    private async Task CombineAsync()&#xA;    {&#xA;        var minTime = _records.Min(y => Convert.ToDateTime(y.StartTime));&#xA;        var frontBuilder = new StringBuilder("-y ");&#xA;        var middleBuilder = new StringBuilder("-filter_complex \"");&#xA;        var endString = $" -map [vout] -map [aout] {_folderPath}\\CombinedOutput.mkv";&#xA;&#xA;        for (var i = 0; i &lt; _records.Count; i&#x2B;&#x2B;)&#xA;        {&#xA;            var type = _records[i].FileType.ToLower();&#xA;            var delay = (Convert.ToDateTime(_records[i].StartTime).Subtract(minTime)).TotalSeconds;&#xA;            frontBuilder.Append($"-i {_folderPath &#x2B; "\\" &#x2B; _records[i].Id} ");&#xA;            var addColon = i != _records.Count - 1 ? ";" : "";&#xA;            middleBuilder.Append(type.Equals("video") ? $"[{i}:v]tpad=start_duration={delay}:color=black[v{i}pad]{addColon} " : $"[{i}:a]adelay={delay}s:all=1[a{i}pad]{addColon} ");&#xA;        }&#xA;        middleBuilder.Append("\"");&#xA;        Console.WriteLine(frontBuilder.ToString() &#x2B; middleBuilder.ToString() &#x2B; endString);&#xA;        // var args = frontBuilder &#x2B; middleBuilder &#x2B; endString;&#xA;        // try&#xA;        // {&#xA;        //     var conversionResult = await FFmpeg.Conversions.New().Start(args);&#xA;        //     Console.WriteLine(JsonConvert.SerializeObject(conversionResult));&#xA;        // }&#xA;        // catch (Exception e)&#xA;        // {&#xA;        //     Console.WriteLine(e);&#xA;        // }&#xA;    }&#xA;

    &#xA;

      &#xA;
    1. Is this the correct way to go about building the argument out ?

      &#xA;

    2. &#xA;

    3. How in god's name do i get something like this in there, since it relies on naming and total count for the piping and inputs=

      &#xA;

        [0:v][vpad]hstack=inputs=2[vout]; // This part will change for video concatenation depending on what gets answered above&#xA;  [1:a][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]&#xA;

      &#xA;

    4. &#xA;

    &#xA;

  • fate : disable automatic conversions on many tests.

    14 août 2020, par Nicolas George
    fate : disable automatic conversions on many tests.
    

    Explicitly insert the scale or aresample filter where it would
    have been inserted by the negotiation.
    Re-enable conversions if it cannot be done easily.

    If a conversion is needed in a test, we want to know about it.
    If the negotiation changes and makes new conversion necessary,
    we want to know about it even more.

    • [DH] tests/fate-run.sh
    • [DH] tests/fate/ac3.mak
    • [DH] tests/fate/acodec.mak
    • [DH] tests/fate/adpcm.mak
    • [DH] tests/fate/audio.mak
    • [DH] tests/fate/bmp.mak
    • [DH] tests/fate/canopus.mak
    • [DH] tests/fate/cdxl.mak
    • [DH] tests/fate/dca.mak
    • [DH] tests/fate/dfa.mak
    • [DH] tests/fate/dnxhd.mak
    • [DH] tests/fate/ea.mak
    • [DH] tests/fate/ffmpeg.mak
    • [DH] tests/fate/filter-audio.mak
    • [DH] tests/fate/filter-video.mak
    • [DH] tests/fate/fits.mak
    • [DH] tests/fate/gif.mak
    • [DH] tests/fate/h264.mak
    • [DH] tests/fate/hlsenc.mak
    • [DH] tests/fate/image.mak
    • [DH] tests/fate/libswresample.mak
    • [DH] tests/fate/lossless-audio.mak
    • [DH] tests/fate/lossless-video.mak
    • [DH] tests/fate/microsoft.mak
    • [DH] tests/fate/monkeysaudio.mak
    • [DH] tests/fate/mov.mak
    • [DH] tests/fate/mp3.mak
    • [DH] tests/fate/opus.mak
    • [DH] tests/fate/pcm.mak
    • [DH] tests/fate/prores.mak
    • [DH] tests/fate/qt.mak
    • [DH] tests/fate/qtrle.mak
    • [DH] tests/fate/screen.mak
    • [DH] tests/fate/utvideo.mak
    • [DH] tests/fate/video.mak
    • [DH] tests/fate/voice.mak
    • [DH] tests/fate/vpx.mak
    • [DH] tests/fate/wavpack.mak