0

I was playing with this for several hours, I couldn't make so thought of reaching for help, Can you please help me in framing the ffmpeg command to display the watermark Image on the video, For the Initial half video the watermark should be on the bottom left and for the rest half video the watermark shop be on the right top.

Bottom left: ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -codec:a copy output.mp4

Top right: ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=main_w-overlay_w-5:5" -codec:a copy output.mp4

Also, I had a look on this for Timeoverlay ffmpeg watermark first 30 second.

How to merge all these and satisfy my requirements as mentioned above?

qedsl
  • 3
  • 2

1 Answers1

0

In this example the duration of input.mp4 is 30 seconds. The overlay filter supports the enable option.

ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable='lte(t,15)'[bg];[bg][1]overlay=main_w-overlay_w-5:5:enable='gte(t,15)'" -codec:a copy output.mp4
llogan
  • 121,796
  • 28
  • 232
  • 243