Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • PHP-FFMPeg Converts Video Twice

    12 février 2020, par 127-0-0-1

    I'm using FFMpeg's library for PHP (see https://github.com/PHP-FFMpeg/PHP-FFMpeg). After starting the convert process, the converted video's file size gradually increases (I constantly refresh the folder) and after converting finishes, the file size becomes 0 again and converting starts again. So converting is done twice, I could not understand if it is normal or there is something wrong.

    My converting code is:

    require 'vendor/autoload.php';
    $ffmpeg = FFMpeg\FFMpeg::create([
            'ffmpeg.binaries'  => 'C:/ffmpeg/ffmpeg.exe', 
            'ffprobe.binaries' => 'C:/ffmpeg/ffprobe.exe',
            'timeout'          => 0 
        ]);
    
    $video = $ffmpeg->open($fileName);
    $video
        ->filters()
        ->resize(new FFMpeg\Coordinate\Dimension(1920, 1080 ))
        ->synchronize();
    
    $format = new FFMpeg\Format\Video\X264('libmp3lame');
    
    try {
        $video->save($format, $outFileName);
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    
  • how do surface blur to a video using FFMPEG common line ?

    12 février 2020, par zuiluo

    enter image description here enter image description here

    like above two image , it is one frame of the video ,

    origin video:https://youtu.be/Qmoc7VyX2f8

    surface blur video:https://youtu.be/zbw1XVXjn4c

    Is there a way to use FFMPEG common line do that , thank you very much

  • Combine two ffmpeg commands (segment and still photo)

    11 février 2020, par Brbcod1

    is it possible to combine this command

    ffmpeg -i video.mp4 -map 0:s:0? -c copy -movflags empty_moov+default_base_moof+frag_keyframe -f segment output%03d.mp4
    

    with a command that can take a still from the first segment

    ffmpeg -ss 00:00:00.00 -i output001.mp4 -vframes 1 -q:v 2 still.jpg"
    
  • How can I limit the CPU usage of moviepy ?

    11 février 2020, par Egon Kirchof

    Python 3. I am using moviepy to create a new video. The problem is ffmpeg uses 100% of all my cores so I can't do anything else in the computer. There is a parameter for write_videofile called threads but when I adjust it to, say, threads=10 (I have 12 cores in total) there is no difference. I even tried invoking the script using cpulimit (cpulimit -l 70 python my_script.py, for instance) but then the script simply doesn't work, it just freezes, no error message. Is there a way I can force moviepy not to use all the cores in the CPU or is there any application (like cpulimit) that would actually work ?

  • How to add multiple audio files at specific times, on a silence audio file using ffmpeg ?

    11 février 2020, par boblapointe

    I need to overlay audio files at specific times, on an existing silence.mp3. Something like that:

    [----[...audio1...]----------[...audio2...]---------------]
    

    I've tried the following but it doesn't work:

    ffmpeg -y -i silence.mp3 -itsoffset 4 -i audio1.mp3 -itsoffset 30 -i audio2.mp3 -c:a copy final.mp3
    

    Any help would be appriciated. Thank you.