ffmpegwasm / ffmpegwasm/ffmpeg.wasm

How to pass fontfile to drawtext?

Ouverte
#163 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C
Étoiles
17.8k
Forks
1.1k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

**Describe the bug**
How could you add fontfile to drawtext?
Tried
```
import BOLDFONT from './OpenSans-Bold.woff'
// OR
const BOLDFONT = './OpenSans-Bold.woff'

drawtext='
fontfile=${BOLDFONT}:
text=My text:
fontcolor=white:
fontsize=16:
x=60:
y=(h-th)/2',
```
Throws Error:
```
[fferr] [Parsed_drawtext_1 @ 0x1a38d40] Could not load font "/_nuxt/fonts/OpenSans-Bold.woff": cannot open resource
log.js?908e:15 [fferr] [AVFilterGraph @ 0x1a387c0] Error initializing filter 'drawtext' with args '
log.js?908e:15 [fferr] fontfile=/_nuxt/fonts/OpenSans-Bold.woff:
log.js?908e:15 [fferr] text=My text:
log.js?908e:15 [fferr] fontcolor=white:
log.js?908e:15 [fferr] fontsize=16:
log.js?908e:15 [fferr] x=60:
log.js?908e:15 [fferr] y=(h-th)/2'
log.js?908e:15 [fferr] Error initializing complex filters.
log.js?908e:15 [fferr] Invalid argument
log.js?908e:15 [ffout] FFMPEG_END
```

Please help!

Note: App running on NUXT.js

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.