Reputation: 21
I want to include subtitle and watermark in the same video. That's what i tried:
for %%a in ("original\720p\*.*") do ffmpeg -i "%%a" -i watermark.png -filter_complex "overlay=10:10" -vf ass=subtitle.ass -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart "newfiles\720p\%%~na.mp4"
i got this error:
-vf/-af/-filter and -filter_complex cannot be used together for the same stream.
How should I solve this problem?
Upvotes: 0
Views: 119
Reputation: 133703
Do not mix -vf
/-af
/-filter
and -filter_complex
. Filters in the same linear chain are separated by commas:
for %%a in ("original\720p\*.*") do ffmpeg -i "%%a" -i watermark.png -filter_complex "[0][1]overlay=10:10,ass=subtitle.ass" -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -b:a 384k -ar 48000 -movflags faststart "newfiles\720p\%%~na.mp4"
See FFmpeg Filter Documentation for more info.
I removed -strict -2
: it has not been needed for the AAC encoder since 2015.
Upvotes: 1