ffmpegwasm / ffmpegwasm/ffmpeg.wasm
generate thumbnail png from hls m3u8 video stream
未关闭
- 主要语言
- C
- 星标
- 17.8k
- 派生
- 1.1k
- PR 合并指标
- 30 天内没有已合并 PR
描述
```
const str = 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8';
await ffmpeg.load();
const name = 'playlist.m3u8';
ffmpeg.FS('writeFile', name, await fetchFile(str));
await ffmpeg.run(
'-i', name, '-ss', '00:00:00', '-vframes', '1', '-s', '160x90',
// '-vcodec', 'copy', '-c', 'copy', '-bsf:a', 'aac_adtstoasc',
'output.png'
);
const data = ffmpeg.FS('readFile', 'output.png');
setImageSrc(URL.createObjectURL(new Blob([data.buffer], { type: 'image/png' })));
```

贡献指南
评估
这个 Issue 还没有评估数据。