Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (44)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5776)

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

    7 mars 2018, par 57_Wolve

    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";
    }
    ?>
  • 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.

    &lt;?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;