Re-sampling H264 video to reduce frame rate while maintaining high image quality

后端 未结 3 1094
梦毁少年i
梦毁少年i 2021-01-30 10:53

Here\'s the mplayer output for a video of interest:

br@carina:/tmp$ mplayer foo.mov 
mplayer: Symbol `ff_codec_bmp_tags\' has different size in shared object, co         


        
3条回答
  •  长发绾君心
    2021-01-30 11:35

    A lot has changed since this posting in 2012. I am adding this answer for people like me who find this from the search engines. I had good luck with the following:

    ffmpeg -y -i source.mp4 -r 25 -s 160x90 -c:v libx264 -b:v 3M -strict -2 -movflags faststart destination.mp4
    

    Here’s a short explanation on what every parameter does:

    • -y : overwrite output files without asking
    • -i source.mp4 : input file name
    • -r 25 : output frame rate (in frames per second)
    • -s 160x90 : output frame size (in pixel) - inserts the scale video filter
    • -c:v libx264 : output video encoder
      • -c:v is short for -codec:v and -vcodec
    • -b:v 3M : video bitrate (in bit/s) passed to libx264 encoder
    • -strict -2 : governs standards compliance; -2 allows experimental features - required to enable native FFmpeg AAC audio encoder in builds older than version 2015-12-05, see here, AAC is now the default audio encoder.
    • -movflags faststart : move the index to the beginning of the output file (mov and mp4 format specific parameter)

    For more details see the official documentation.

提交回复
热议问题