Reputation: 452
I want to add watermark on video using ffmpeg like tiktok videos, means watermark with logo name and user id and with reflecting diagonally each 5 sec or same interval of time, for simple watermark I am using following command.Please help
ffmpeg -i video.mp4 -i watermark.png -filter_complex "overlay=5:5" out.mp4
Upvotes: 3
Views: 1832
Reputation: 81
Top-Left To Bottom-Right loop:
ffmpeg -i video.mp4 -i watermark.png -filter_complex \
"[0:v][1:v]overlay=x='if(lt(mod(t,10),5),10,W-w-10)':y='if(lt(mod(t,10),5),10,H-h-10)'" \
-codec:a copy out.mp4
Top-Right To Bottom-Left loop:
ffmpeg -i video.mp4 -i watermark.png -filter_complex \
"[0:v][1:v]overlay=x='if(lt(mod(t,10),5),W-w-10,10)':y='if(lt(mod(t,10),5),10,H-h-10)'" \
-codec:a copy out.mp4
Idea is very simple
Upvotes: 6