ffmpegwasm / ffmpegwasm/ffmpeg.wasm

generate thumbnail png from hls m3u8 video stream

Open
#161 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
17.8k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

```
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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.