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 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 to 1/3 of the video length 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.
Option 'sameq' was removed. If you are looking for an option to preserve the quality (which is not what -sameq was for), use -qscale 0 or an equivalent quality factor option.
Here is my ffmpeg's version is 4.1.3 – chx3 May 27 '19 at 03:00