简体   繁体   English

为什么使用 FFMPEG 为视频添加水印后视频大小会增加?

[英]Why video size is increasing after adding watermark to video using FFMPEG?

I am adding watermark to video using FFMPEG where i use -preset ultrafast in FFMPEG command.which add watermark to video very fast but due to this my output video size increased.我正在使用 FFMPEG 向视频添加水印,其中我在 FFMPEG 命令中使用-preset ultrafast 。它非常快速地向视频添加水印,但由于这个原因,我的 output 视频大小增加了。

ffmpeg -i input.mp4 -i mt.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -codec:a copy -preset ultrafast output.mp4

Without Using -preset ultrafast不使用-preset ultrafast

input video size 5MB and output video size 5MB输入视频大小 5MB 和 output 视频大小 5MB

Using -preset ultrafast使用-preset ultrafast

input video size 5MB and output video size 11MB输入视频大小 5MB 和 output 视频大小 11MB

As FFMPEG documentation says:正如FFMPEG 文档所说:

A preset is a collection of options that will provide a certain encoding speed to compression ratio.预设是一组选项,可提供一定的编码速度与压缩比。 A slower preset will provide better compression (compression is quality per filesize).较慢的预设将提供更好的压缩(压缩是每个文件大小的质量)。 This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset.这意味着,例如,如果您以特定文件大小或恒定比特率为目标,您将使用较慢的预设获得更好的质量。 Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.同样,对于恒定质量编码,您只需选择较慢的预设即可节省比特率。

In other words there is a trade off between encoding speed and space optimization/compression.换句话说,编码速度和空间优化/压缩之间存在折衷。 Try going for other preset like veryfast or superfast尝试使用其他预设,例如非常快或超快

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM