0

I want to add watermark for video. My code:

ffmpeg -i final_480p.mov \
-i watermark480p.png \
-filter_complex overlay=10:H-h-10 \
-y test.mov

with video size divisible by 2, command is good.

When i add watermark for video (853x480) don't work with error

[libx264 @ 075656e0] width not divisible by 2 (853x480)

How to fix this error? ( add more arguments, v.v..). Tks for reading

bav ko ten
  • 502
  • 7
  • 24

1 Answers1

1

Use

ffmpeg -i final_480p.mov \
-i watermark480p.png \
-filter_complex [0]scale='iw-mod(iw,2)':'ih-mod(ih,2)'[m];[m][1]overlay=10:H-h-10 \
-y test.mov

The scale filter will conform each odd dimension to an even number, and leave even dimensions alone.

Gyan
  • 85,394
  • 9
  • 169
  • 201