Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Saving matplotlib.animation outputs a 0 second video

    15 février 2017, par Andy Baldacchino

    I am fairly new to matplotlib and animations, the animation I have works when using pyplot.show but when attempting to use the animation.save function, the only thing outputted is a 0 second video with the initial frame of the animation.

    This is my code:

    plt.rcParams['animation.ffmpeg_path'] = r'C:\FFMPEG\bin\ffmpeg.exe'
    FFwriter = animation.FFMpegWriter()     
    video_ani.save('basic_animation1.mp4', writer = FFwriter, fps=30, extra_args=['-vcodec', 'libx264'])
    

    Any help would be appreciated, thanks

  • How to choose between openH264 and x264 decoder

    15 février 2017, par Darko

    I'm using the dev build from zeranoe.com which has OpenH264 and libx264 in it. How can i choose between these two Decoders to compare the decoding speed ?

    avcodec_find_decoder(AVCodecID.AV_CODEC_ID_H264); 
    

    only gives me the name "h264" but which decoder is it ?

    And tries to force a specific decoder failed, like:

    codec = avcodec_find_decoder _by_name("x264");
    codec = avcodec_find_decoder _by_name("libx264");
    

    Which other options i have to improve the decoding speed of avcodec_decode_video2 for highres (4k and higher) RTSP video streams ?

  • Concat a video with itself, but in reverse, using ffmpeg

    15 février 2017, par Vitam

    I was able to reverse with:

    ffmpeg -i input.mp4 -vf reverse output_reversed.mp4
    

    And I can concat with:

    ffmpeg -i input.mp4 -i input.mp4 -filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.mp4
    

    But can I concat with a reverse version of the video, with a single command?

    What I am trying to achieve is a ping pong effect, where the video plays once, then plays backwards right after.

    Thanks!

  • ffmpeg cut and concat single command line

    15 février 2017, par Gianluca Calabria

    I have two flac audio files, I need to cut them with different timecodes and then concatenated them using one single command line with ffmpeg. Is there a way to do it? I did something like that but it's not working very well, the timestamps of the outputs file are all messed up (instead of having an output flac beginning from 00:00 I have a file beginning from 59:90!!) Also this command line is insanely slow and it works only on unix system...hope someone could help me

    mkfifo temp1 temp2 
    ffmpeg -y -i PMM_20170116-1100_1.flac -ss 3590 -t 10 -c copy -acodec copy -f flac temp1 2> /dev/null  & ffmpeg -y -i PMM_20170116-1200_1.flac -ss 0 -t   3590 -c copy -acodec copy -f flac temp2 2> /dev/null & ffmpeg -f flac -i "concat:temp1|temp2" -ac 2 -ar 48000 cutmergetest.flac
    
  • FFMPEG Merge two videos into one with side-by-side same quality output

    15 février 2017, par Filip Kafo Kaučiarik

    I´m already working on project with 3d video an i have problem,i got left and right channel of video a a ineed to merge it into side by side.I already read some blogs about this problem and i got this code:

    ffmpeg -i avatar35l.avi -vf "movie=avatar35r.avi [in1]; [in]pad=1920*2:1080[in0]; [in0][in1] overlay=1920:0 [out]" avatar35sbs.avi
    

    it works,but i got significant quality loss and i need a quality of output video same as input video,30fps,1080p,same lenght,i´m a new one to ffmpeg and i need a concrete example of that

    Can anybody help me?