美文网首页FFmpeg
ffmpeg视频压缩

ffmpeg视频压缩

作者: TroyZhang | 来源:发表于2016-06-01 11:28 被阅读2237次

How do I reduce the size of a huge MP4 video?

You can try using something such as ffmpeg or mencoder to reencode it with a lower bitrate, e.g.:
Calculate the bitrate you need by dividing 1 GB by the video length in seconds. So, for a video of length 16:40 (1000 seconds), use a bitrate of 1000000 bytes/sec:

ffmpeg -i input.mp4 -b 1000000 output.mp4

Additional options that might be worth considering is setting the Constant Rate Factor, which lowers the average bit rate, but retains better quality. Vary the CRF between around 18 and 24 — the lower, the higher the bitrate.

ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4

相关文章

网友评论

    本文标题:ffmpeg视频压缩

    本文链接:https://www.haomeiwen.com/subject/nejhdttx.html