0

So I have found this neat guide on converting video quality https://gist.github.com/dvlden/b9d923cb31775f92fa54eb8c39ccd5a9

To convert a video to 480p I run the following

ffmpeg -i input.mov -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264 -pix_fmt yuv420p -b:v 1000k -minrate 500k -maxrate 2000k -bufsize 2000k -vf scale=854:480 intro-480p.mp4

However currently I am doing this to transcode and add a watermark to all our videos in a directory

find /home/video/archive -type f -execdir ffmpeg -i '{}' -filter:v drawtext="fontfile=/root/FreeSans.ttf:text='www.website.com':fontcolor=white@1.0:fontsize=26:y=h-line_h-30:x=w/20*mod(t\,120)" -f mp4 -vcodec libx264 -preset fast -profile:v main -acodec aac -movflags +faststart '/home/video/watermarked/{}.mp4' \;

However I am having trouble combining these two commands into one. Whatever I try the watermark doesn't show, just the quality changes to 480p. How can I achieve both with one command? Also please add it to the command above so I can convert all files in a folder.

0

Use

find /home/video/archive -type f -execdir ffmpeg -i '{}' -filter:v "drawtext=fontfile=/root/FreeSans.ttf:text='www.website.com':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 libfdk_aac -b:a 128k -movflags +faststart '/home/video/watermarked/{}.mp4' \;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.