<p>Use</p>

<pre><code>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' \;
</code></pre>

CC BY-SA 4.0
2018-07-06T18:54:15.013Z
2018-07-06T18:54:15.013Z
Gyan
<p>So I have found this neat guide on converting video quality <a href="https://gist.github.com/dvlden/b9d923cb31775f92fa54eb8c39ccd5a9" rel="nofollow noreferrer">https://gist.github.com/dvlden/b9d923cb31775f92fa54eb8c39ccd5a9</a></p>

<p>To convert a video to 480p I run the following</p>

<pre><code>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
</code></pre>

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

<pre><code>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' \;
</code></pre>

<p>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.</p>

<ffmpeg>
ffmpeg - Trouble adding watermark + convert video quality in same command
masterq
# ffmpeg - Trouble adding watermark + convert video quality in same command

(Asked by: username_0 on 2018-07-06)

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.

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2018-07-06. Score: 0 | Accepted answer

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' \;


---

