jimmywarting / StreamSaver.js

StreamSaver writes stream to the filesystem directly asynchronous
https://jimmywarting.github.io/StreamSaver.js/example.html
MIT License
3.97k stars 413 forks source link

No Video(e.g hls) saving example #266

Closed waakobrian closed 2 years ago

waakobrian commented 2 years ago

Please include (like hls) the video saving example at https://github.com/jimmywarting/StreamSaver.js/blob/master/examples/video-stream.html

jimmywarting commented 2 years ago

nah, hls is more complicated. it involves many small chunk files with seperated video resolutions and sperated audio tracks and sperated subtitle tracks. it's not like one mkv, mp4 or avi file that contains all the data in a single container

it would also require a dependency on something like hls.js to parse the mainifest

streamsaver is for saving one large file only, (dose not handle multiple files that well - would need to arcive everything into one single file in order to save multiple files) if you want to save a hls then you would probably want to use whatwg/fs, let the user select a directory on the disk and ask for write permission to it.