3

I'm scaling a video and applying a watermark like so:

ffmpeg -ss 0:0:0.000 -i video.mp4 -y -an -t 0:0:10.000
 -vf \"[in]scale=400:316[middle]\" -b:v 2000k -r 20
 -vf 'movie=watermark.png,pad=400:316:0:0:0x00000000 [watermark];[middle] [watermark]overlay=0:0[out]'
 out.flv

However, the applied watermark seems to be scaled to the original video size rather than the smaller scaled video size.

This command line worked on ffmpeg version 0.8.6.git and now behaves differently after an upgrade to version N-52381-g2288c77.

How do I get it to work again?


Update 2013-04-26:
I now have tried to use the overlay filter's X and Y parameters instead of padding without success.

1 Answer 1

7

Answered by ubitux on the FFmpeg IRC:

Use scale and overlay in a single -filter_complex chain, like so:

ffmpeg -y -ss 0 -t 0:0:30.0 -i 'video.mp4' -i '/watermark.png'
 -filter_complex "[0:0] scale=400:225 [wm]; [wm][1:0] overlay=305:0 [out]"
 -map "[out]" -b:v 896k -r 20 -an 
 'out.flv'

Also load the watermark via -i rather than the movie filter.

Sign up to request clarification or add additional context in comments.

1 Comment

Hum I have to say this has got me :D Error initializing filter 'scale' with args '400:225:pad=height=ih+20:color=#71cbf4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.