Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (67)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • 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

Sur d’autres sites (8541)

  • How to Convert Video to MP4 using FFMPEG in PHP

    4 octobre 2020, par Ken

    I am trying to find *.mkv and to convert into *.mp4
right now I'm using the following codes to convert .mkv videos to .mp4

    


    <?php   
    $folder = '/path/to/video/folder';
    $filename = 'a.name.of.the.video.mkv';
    $newFilename = pathinfo($filename, PATHINFO_FILENAME).'.mp4';
    exec('/usr/bin/ffmpeg -i '.$folder.DIRECTORY_SEPARATOR.$filename.' -codec copy '.$folder.DIRECTORY_SEPARATOR.$newFilename.' 2>&1', $out, $error);

?>


    


    The above codes are working fine but I want to convert all videos ending with .mkv to .mp4 without manually setting their names.

    


    I want the PHP version of the following command using above working codes.

    


    for i in *.mkv; do
  ffmpeg -i "$i" -codec copy "${i%.*}.mp4"
done


    


    I have tried this so far but did not work

    


    exec('/usr/bin/ffmpeg for i in '.$folder.'*.mkv; do ffmpeg -i "$i" -codec copy "${i%.*}.mp4" done');


    


  • FFMPEG -re Insurance

    17 octobre 2020, par Devin Dixon

    FFMPEG -re according to the ffmpeg docs :

    


    


    Read input at native frame rate. Mainly used to simulate a grab
device, or live input stream (e.g. when reading from a file). Should
not be used with actual grab devices or live input streams (where it
can cause packet loss).

    


    


    My ffmpeg stream command is :

    


    ffmpeg -re -i https://www.example.com/video.mp4 -filter_complex tpad=start_duration=10:stop_duration=15:start_mode=add:color=black:stop_mode=add -af adelay=10000|10000 -maxrate 2M -crf 24 -bufsize 6000k -c:v libx264 -preset superfast -tune zerolatency -strict -2 -c:a aac -ar 44100 -attempt_recovery 1 -max_recovery_attempts 5 -drop_pkts_on_overflow 1 -f flv rtmp://live.example.com/123453


    


    Except this does not always work, and sometimes I have livestreams ending early because ffmpeg is playing faster than the frame rate. Is there another command that can be used to ensure ffmpeg streams the video in real time ?

    


  • split videos with ffmpeg

    23 novembre 2020, par 5Diraptor

    I'm trying to create a script that scans a directory, and for all videos larger then X size, splits them down into smaller chunks.

    


    There are two similar questions :

    


    


    Neither of these work in the way I want. The first you have to manually input every file that you want to process. The second doesn't check for filesize, or output the files in the way I want.

    


    So far, this is the contents of the .bat file :

    


    %~d1&#xA;&#xA;for %%a in (*.MOV) do (&#xA;&#xA;if %%~za GTR 2000000000 (&#xA;&#xA;REM usage %%a <filename>&#xA;set "_filename=%~n1"&#xA;set "_tally=.SPLIT-%03d"&#xA;set "_extension=%~x1"&#xA;&#xA;set "_outputname=%_filename%%_tally%%_extension%"&#xA;&#xA;&#xA;    ffmpeg -i "%%a" ^&#xA;        -crf 0 -c copy -map 0 -segment_time 00:00:30 -f segment -reset_timestamps 1 ^&#xA;        %_outputname%&#xA;)&#xA;)&#xA;pause&#xA;</filename>

    &#xA;

    My aim is for the script to work in the following way :

    &#xA;

      &#xA;
    1. Drag a video (from a folder of videos) onto the .bat file.
    2. &#xA;

    3. Script opens up, and targets each file ending .MOV, and is greater then 2GB
    4. &#xA;

    5. ffmpeg splits the video down into >2GB chunks. (I know it's currently split down in 30 second chunks, still working on understanding how to use the -fs parameter).
    6. &#xA;

    7. Each chunk gets saved with the original filename and extension, but the filename is suffixed with ".SPLIT" and then a unique number that relates to which file it is - first file is 000 and second is 001 etc.
    8. &#xA;

    &#xA;

    Problems :

    &#xA;

      &#xA;
    • Firstly, I want to split by filesize and not time, but I don't understand how to use the -fs parameter in this case. I guess I could use something like ffprobe -i input.file -show_format -v quiet | sed -n &#x27;s/duration=//p&#x27; in conjunction with it but I'm not confident...
    • &#xA;

    • Secondly, I'm getting a problem with %03d in the .bat. Think I'm mixing up languages ? It retrieves the filepath of the .bat file instead of counting number of loops.
    • &#xA;

    &#xA;

    Any help really appreciated !

    &#xA;