fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.85k stars 874 forks source link

Font not loading using "fontfile" option #1099

Closed cosmicle0 closed 3 years ago

cosmicle0 commented 3 years ago

Version information

Code

command.videoFilter({
        filter: 'drawtext',
        options: {
          fontfile: '../../assets/fonts/raleway.ttf',
          text: tA[0],
          fontsize: 48,
          fontcolor: 'white',
          x: '(main_w/2-text_w/2)',
          y: 200,
        }
      })

Issue

The font does not get loaded and so some random font is used. I do not get an error either so I can't provide stderr/stdout. I'm sure I'm providing the correct path to the font. I've also tried path.join(__dirname, '../../assets/fonts/raleway.ttf'), but it hasn't fixed my issue.

Thanks, cosmicice

cosmicle0 commented 3 years ago

Seems like it's an FFMPEG issue, I can use the fontfile directive without any issues on linux, but not on windows, not sure why.