VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. I have this code which overlays a title over video.

    I have specified the path to the font I want to use but ffmpeg isn't finding it. It defaults to Times Roman. It only finds the font I want if the font file is in the same folder as the bat (script) file.

    Am I doing something wrong?

    Code:
    ffmpeg -y -i C0015.mp4 -filter_complex "[0]split[base][text];[text]drawtext=fontfile="C:\Windows\Fonts\Arial\arial.ttf":text='Testing': fontcolor=ebebeb:fontsize=36*10:box=1:boxcolor=1616eb@1:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2,format=yuv422p,fade=t=in:st=2:d=1:alpha=1,fade=t=out:st=7:d=1:alpha=1[subtitles];[base][subtitles]overlay"  -c:a aac  title_output.mp4
    Thank you.
    Quote Quote  
  2. Paths in ffmpeg filters - this has to do with windows escape characters.

    For every colon or backslash, you need another backslash

    This part
    Code:
    fontfile="C:\Windows\Fonts\Arial\arial.ttf"
    Should look something like this (or add Arial sub folder if you have it there)
    Code:
    fontfile='C\:\\Windows\\Fonts\\Arial.ttf'
    Quote Quote  
  3. That worked. Many thanks again.
    Quote Quote  
  4. side note: using slashes instead of back-slashed might also work,..
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!