ffmpegwasm / ffmpegwasm/ffmpeg.wasm

How to pass fontfile to drawtext?

Aperta
#163 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C
Stelle
17.8k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.