ffmpegwasm / ffmpegwasm/ffmpeg.wasm

How to pass fontfile to drawtext?

Abierto
#163 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
17.8k
Forks
1.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.