Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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

[1]: https://ryanparman.com/posts/2018/serving-bandwidth-friendly...



I 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. It could easily be adapted to on-demand video streaming.

My solution was pretty janky, but it's an interesting problem space to explore.


You can also use ffmpeg to do this, but figuring out the correct command line options is not easy.


video2hls 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...


HLS is half of the answer, that will only work of half of all devices. You need HLS + MPEG-DASH.


For 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/

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Media_Sourc...


Isn't this super battery intensive?


I 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.


What? that's the opposite of the truth.

Firefox, Chrome, Edge, IE, do not support HLS.

https://caniuse.com/#feat=http-live-streaming


Sorry, 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 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: