#StackBounty: #ffmpeg ffmpeg – Watermark every x second fade in/out and adjust for video resolution

Bounty: 100

I am using the current ffmpeg command to convert multiple videos and create a watermark that is a scrolling text that goes from right to left to right every 120 seconds of play time.

find /home/video/ -type f -execdir ffmpeg -i '{}' -filter:v "drawtext=fontfile=/root/FreeSans.ttf:text='QWERTY':fontcolor=white@1.0:fontsize=26:y=h-line_h-30:x=w/20*mod(t,120),scale=854:480" -pix_fmt yuv420p -c:v libx264 -preset slow -b:v 1000k -minrate 500k -maxrate 2000k -bufsize 2000k -c:a aac -ar 44100 -b:a 128k -movflags +faststart '/home/video/new/{}.mp4' ;

I would like to modify the watermark so it looks something like this

enter image description here

I would like the text shown above to fade in every 120 seconds and last for 15 seconds. Be bold format and the same colour (black).

“qwerty qwerty qwerty qwerty” new line
“qwerty qwerty qwerty qwerty”

Another issue I currently have with the current command I am using is with different video frames. For example if the video is only 800×600 the text will be very large. If the video is 1920×1080 the text will be extremely small. I would like the text size to be adjusted depending on the frame rate. It should look like above in terms of screen size.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.