FFMPEG - 具有相同质量和文件大小的水印视频 [英] FFMPEG - Watermark video with same quality and filesize

查看:235
本文介绍了FFMPEG - 具有相同质量和文件大小的水印视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些视频,我想用透明的PNG水印他们。这是我试过的:

I have some videos, and I'd like to watermark them with a transparent PNG. Here's what I've tried:

ffmpeg -i 9.flv -vf "movie=logo.png [watermark];[in][watermark] overlay=10:10 [out]" 9_w.flv

但是,质量不保留。最好我想ffmpeg重新编码与原始文件(相同的编解码器,比特率)设置完全相同的文件。如果这不容易,我想使用特定的编解码器进行编码,但是保留质量,但是这是测量的。

However, bitrate or quality is not preserved. Preferably I'd like ffmpeg to re-encode the file with exactly the same settings as the original file (same codecs, bitrate). If thats not easily possible, I'd like to encode with a specific codec, but preserving 'quality', however that is measured.

推荐答案

尝试

ffmpeg -i 9.flv -vf "movie=logo.png [watermark];[in][watermark] overlay=10:10 [out]" -vcodec flv -sameq 9_w.flv

ffmpeg使用相同的视频编码质量。

this tells ffmpeg to use the same quality for video encoding.

您还可以添加

-acodec libmp3lame copy

之前输出要做同样的音频编码。

before the output to do the same with the audio encoding.

这篇关于FFMPEG - 具有相同质量和文件大小的水印视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆