7 ms·
If you want this functionality you can encode the video into chunks at multiple quality levels using video2hls[0] and host them anywhere you like[1]. [0]: http
by guu 6y ago
If you want this functionality you can encode the video into chunks at multiple quality levels using video2hls[0] and host them anywhere you like[1].
[0]: https://github.com/vincentbernat/video2hls https://github.com/vincentbernat/video2hls
[1]: https://ryanparman.com/posts/2018/serving-bandwidth-friendly-video-with-hls/ https://ryanparman.com/posts/2018/serving-bandwidth-friendly...
- guptaneil 6y agovideo2hls looks awesome, thanks for sharing that! I usually use AWS MediaConvert[0] to do the conversion for me, but nice to see an open-source tool to easily do the same. [0]: https://blog.metamorphium.com/2020/07/20/diy-video-streaming/ https://blog.metamorphium.com/2020/07/20/diy-video-streaming...
- poxrud 6y agoYou can also use ffmpeg to do this, but figuring out the correct command line options is not easy.
- news_to_me 6y agoI used MPEG-DASH to build a netflix-party clone when the pandemic started, mostly following this tutorial: https://www.isrv.pw/html5-live-streaming-with-mpeg-dash https://www.isrv.pw/html5-live-streaming-with-mpeg-dash. It could easily be adapted to on-demand video streaming. My solution was pretty janky, but it's an interesting problem space to explore.
- simlevesque 6y agoHLS is half of the answer, that will only work of half of all devices. You need HLS + MPEG-DASH.
- joshmn 6y agoI can't think of a device that would support MPEG-DASH that wouldn't support HLS. What are some? HLS has been around for a decade. I think you're thinking of certain DRM mechanisms. HLS with FairPlay wouldn't work on an Android device running Chrome, just as iOS Safari doesn't support Widevine. But for most of us, we don't need DRM.
- simlevesque 6y agoWhat? that's the opposite of the truth. Firefox, Chrome, Edge, IE, do not support HLS. https://caniuse.com/#feat=http-live-streaming https://caniuse.com/#feat=http-live-streaming
- joshmn 6y agoSorry, I didn't think we were talking about native support. I'm just so used to shipping something like videojs. In any event, nothing natively supports MPEG-DASH. https://caniuse.com/#feat=mpeg-dash https://caniuse.com/#feat=mpeg-dash Though there is a disclaimer "DASH can be used with a JavaScript library in browsers that doesn't support it natively as long as they support Media Source Extensions." the same is true for HLS, without the requirement of MSEs.
- guu 6y agoFor browsers that do not support HLS you can use a JavaScript HLS client implementation[0] using Media Source Extensions[1]. [0]: https://github.com/video-dev/hls.js/ https://github.com/video-dev/hls.js/ [1]: https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API https://developer.mozilla.org/en-US/docs/Web/API/Media_Sourc...
- simlevesque 6y agoIsn't this super battery intensive?