ffmpegwasm / ffmpegwasm/ffmpeg.wasm

generate thumbnail png from hls m3u8 video stream

未关闭
#161 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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' })));
```

![image](https://user-images.githubusercontent.com/48445639/108716889-524dc400-7525-11eb-8501-6bc31c8a981e.png)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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