我需要为视频添加 2 个水印,一个在左边,一个在右边。我该怎么做?
ffmpeg -re -i file1.mp4 -i "/var/www/logo/logo.png" -filter_complex '[0:v]scale=640:360[bg];[bg][1:v]overlay=15:15' -i "/var/www/html/am.png" -filter_complex '[0:v]scale=640:360[bg];[bg][1:v]overlay=W-w-15:15' -vcodec
导致错误
at most one video stream is supported in flv
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
答案1
仅使用一个过滤图(仅一个实例-filter_complex
):
ffmpeg -i file1.mp4 -i "/var/www/logo/logo.png" -i "/var/www/html/am.png" -filter_complex \
"[0:v]scale=640:360[bg0]; \
[bg0][1:v]overlay=15:15[bg1]; \
[bg1][2:v]overlay=W-w-15:15" \
-c:v libx264 output.flv