ffmpegwasm / ffmpegwasm/ffmpeg.wasm

How to pass fontfile to drawtext?

未关闭
#163 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
17.8k
派生
1.1k
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。