<p>try this :</p>
<p><code>ffmpeg.exe -i &quot;filename&quot;  -filter_complex &quot;subtitles=filename.ass:fontsdir=./fonts:force_style='FontName=Arial Rounded MT Bold,PrimaryColour=&amp;H0000FFFF,SecondaryColour=&amp;H000000FF,OutlineColour=&amp;H00000000,BackColour=&amp;H20000000,BorderStyle=4,Fontsize=17'&quot; -c:v libx264 -crf 20 &quot;$filename.mp4&quot;</code></p>
<p>With a font directory with your font (here : ./font/ARLRDBD.TTF) and the name of your font not ttf file name (here : Arial Rounded MT Bold).</p>
<p>Enjoy</p>

CC BY-SA 4.0
2024-05-22T23:02:56.583Z
2024-05-22T23:02:56.583Z
Samile
<p>When calling ffmpeg it keeps defaulting to Arial-MT / Arial-BoldMT even when specifying a font. How do you correctly specify the fontfile?</p>
<p>When specifying any font it will always default back:</p>
<p><code>[Parsed_subtitles_0 @ 000001915a83f800] fontselect: (DosisBold, 400, 0) -&gt; ArialMT, 0, ArialMT</code></p>
<p>I am calling ffmpeg with the following command:</p>
<p><code>ffmpeg -i input.mp4 -vf subtitles='subtitle.srt':force_style='FontName=DosisBold,Alignment=10,Fontsize=24' output.mp4 -loglevel debug</code></p>
<p>I have a file called &quot;DosisBold.ttf&quot; in the same folder as ffmpeg. I have already tried FontName=DosisBold.ttf and it also doesn't work. All files are in the same folder as the ffmpeg.exe.</p>
<p>I have converted the .srt file to .ass and specified the font file but it still defaults back to ArialMT.</p>
<pre><code>Format: Name, Fontname, Fontsize {...}
Style: SubStyle,DosisBold,24 {...}
</code></pre>
<p>I am using &quot;ffmpeg-n7.0-latest-win64-gpl-7.0&quot;, I have tried different versions of ffmpeg (e.g. &quot;ffmpeg-master-latest-win64-gpl&quot;) and still no change. Also tried different fonts / font files and it always defaults back to Arial.</p>

<ffmpeg>
How to properly specify font file for ffmpeg as it's always defaulting to Arial?
Jim Jans
# How to properly specify font file for ffmpeg as it's always defaulting to Arial?

(Asked by: username_0 on 2024-04-22)

When calling ffmpeg it keeps defaulting to Arial-MT / Arial-BoldMT even when specifying a font. How do you correctly specify the fontfile?
When specifying any font it will always default back:
[Parsed_subtitles_0 @ 000001915a83f800] fontselect: (DosisBold, 400, 0) -> ArialMT, 0, ArialMT
I am calling ffmpeg with the following command:
ffmpeg -i input.mp4 -vf subtitles='subtitle.srt':force_style='FontName=DosisBold,Alignment=10,Fontsize=24' output.mp4 -loglevel debug
I have a file called "DosisBold.ttf" in the same folder as ffmpeg. I have already tried FontName=DosisBold.ttf and it also doesn't work. All files are in the same folder as the ffmpeg.exe.
I have converted the .srt file to .ass and specified the font file but it still defaults back to ArialMT.
Format: Name, Fontname, Fontsize {...}
Style: SubStyle,DosisBold,24 {...}

I am using "ffmpeg-n7.0-latest-win64-gpl-7.0", I have tried different versions of ffmpeg (e.g. "ffmpeg-master-latest-win64-gpl") and still no change. Also tried different fonts / font files and it always defaults back to Arial.

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2024-05-22. Score: 0

try this :

`ffmpeg.exe -i "filename" -filter_complex "subtitles=filename.ass:fontsdir=./fonts:force_style='FontName=Arial Rounded MT Bold,PrimaryColour=&H0000FFFF,SecondaryColour=&H000000FF,OutlineColour=&H00000000,BackColour=&H20000000,BorderStyle=4,Fontsize=17'" -c:v libx264 -crf 20 "$filename.mp4"`

With a font directory with your font (here : ./font/ARLRDBD.TTF) and the name of your font not ttf file name (here : Arial Rounded MT Bold).

Enjoy


---

