[FFmpeg-user] Add time code AND a watermark in one pass

Kieran O Leary kieran.o.leary at gmail.com
Sun Feb 25 12:07:07 EET 2018


Hi

On Sun, Feb 25, 2018 at 10:48 AM, Reino Wijnsma <rwijnsma at xs4all.nl> wrote:
> On 25-2-2018 9:38, Kieran O Leary <kieran.o.leary at gmail.com> wrote:
>> On Sun, Feb 25, 2018 at 7:24 AM, Kevin Duffey <kevinmduffey-at-yahoo.com at ffmpeg.org> wrote:
>>> [...]
>>> for /R %%a in ("*.mov") do ffmpeg -i "%%a" -i watermark.png -filter_complex "[2:v]scale=4096x2160 [ovrl],[1:v][ovrl]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2; drawtext=fontfile='C:\\Windows\\Fonts||arial.ttf':fontsize=15:timecode='00\:00\:00\:00':r=24:x=(w-tw)/2:y=h-(2*lh):fontcolor=white" -s 720x480 -c:v libx264 -preset ultrafast -crf 20 d:\encoded\%%~na.mp4
>> Why are there two || characters before arial.ttf?
>>
>> [...]
>>
>> C\\:\\\\Windows\\\\Fonts\\\\'arial.ttf'
>> ^^ worked for me - so two escapes for the colon, three for each slash,
>> and then place 'arial.tff' in single quotes.
>> Here is a very simple command line which works on Windows 10:
>> ffmpeg -i out.mkv -vf
>> drawtext=fontfile=C\\:\\\\Windows\\\\Fonts\\\\'arial.ttf':fontsize=14:text=watermark_text
>> -y out.mov
> If you ask me there's no need for so many escape-characters.
>
> ffmpeg -i <input> -vf "drawtext=fontfile='C\:\\Windows\\Fonts\\arial.ttf':fontsize=14:fontcolor=white:text=watermark_text" -f sdl -
>
> and even
>
> ffmpeg -i <input> -vf "drawtext=fontfile='C\:/Windows/Fonts/arial.ttf':fontsize=14:fontcolor=white:text=watermark_text" -f sdl -
>
> work just fine for me.
>
> -- Reino

Thanks Reino, both work perfect here too. Much simpler.

-K


More information about the ffmpeg-user mailing list