[FFmpeg-user] Use ffmpeg to watermark and scale an image on video

Zhen Ma alex.zhen.ma at gmail.com
Tue Nov 22 22:57:21 CET 2011

It should work with this way.

ffmpeg -i sample.mov -sameq -acodec copy -vf
'movie=logo.png,*scale=60:30* [watermark];
[watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]'

On Tue, Nov 22, 2011 at 4:13 PM, daad at libero.it <daad at libero.it> wrote:

> I want to be able to watermark videos with a logo image, which contains a
> website url. The videos can be of different formats and dimension. I'm
> trying
> to figure out a generic ffmpeg command to achieve it, so that i don't have
> to
> tweak the command depending on the video i have to process. So far i got:
> ffmpeg -i sample.mov -sameq -acodec copy -vf 'movie=logo.png [watermark];
> [in]
> [watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]'
> sample2.mov
> In this way though the logo will look too big or too small with video of
> different size. I've seen there is a scale option for avfilter but that
> will
> scale the video, not the watermarked image (i guess?), but I haven't
> figure out
> whether it's possible to resize the image logo based on the dimension of
> the
> input video, so that I can say to scale the logo width to 1/3 of the video
> width for example, and keep the image ratio.
> Any idea? doesn't need to be done in a single command, could even be a
> script.
> thanks in advance.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Your sincerely !
Alex Zhen Ma
▪ Email: alex.zhen.ma at gmail.com

More information about the ffmpeg-user mailing list