Ffmpeg to add watermark and username to videos like tiktok
I am trying to use ffmpeg to add watermark and username (dynamic input) to videos same as tiktok.
Currently I have the following command which adds an image to video but the transition is moving from left to right, my goal to make it appear in random positions as tiktok, and also to add username under the logo but not sure how to make it happen.
ffmpeg -i testvideo.mp4 -i logo.png -filter_complex "[1][0]scale2ref=w=iw/10:h=ow/mdar[logo][main];[main][logo]overlay=x='mod(t\,10)/10*W':y='if(lt(mod(t+2\,8)\,4)\,H-h-H*20/100\,H*20/100)'" -vcodec libx264 -crf 28 -preset faster -tune film output_video_test.mp4
I tried to use rand() function but received the following error
Unknown function in 'rand(...)'
How can I make log appear in random places and add dynamic user input (username) same as tiktok using ffmpeg?
And if not possible can I achieve the end goal with other technology?
Read more here: Source link
