How to scale and position watermark to scale?

前端 未结 1 1172
不知归路
不知归路 2021-01-03 09:02

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 200         


        
相关标签:
1条回答
  • 2021-01-03 09:45

    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.

    0 讨论(0)
提交回复
热议问题