Remote-MediaServer
Remote-MediaServer copied to clipboard
[enhancement request] HLS support all major browsers using hls.js
Hi,
Have you looked into using this?? : https://video-dev.github.io/hls.js/stable/ Using this we could go for HLS all the way and ditch the Mpeg4PlayHandler
As of today, it is supported on:
- Chrome for Android 34+
- Chrome for Desktop 34+
- Firefox for Android 41+
- Firefox for Desktop 42+
- IE11+ for Windows 8.1+
- Edge for Windows 10+
- Opera for Desktop
- Vivaldi for Desktop
- Safari for Mac 8+ (beta)
Please note: iOS Safari “Mobile” does not support the MediaSource API. Safari browsers have however built-in HLS support through the plain video “tag” source URL. See the example above (Getting Started) to run appropriate feature detection and choose between using Hls.js or natively built-in HLS support.
I have seen hls.js and it's actually already in use for offline playback in chrome. But I would like to keep mpeg as the main and hls as a backup, here is why:
- startup is a lot faster, because we don't have to wait for the first chunk to be rendered to disk, this is especially nice when seeking.
- no need for writing to disk, because data is directly piped to the client
- and the cpu issue right now, but I'm sure we can get that resolved;)
I agree to all points... except that your current solution is mainly targeting local (network) use. One thing I have in mind, is remote use as well... Which required (realtime, don't wanna go for haveing multiple formats available) transcoding. In those situations there is a startup lag anyway. I've tested it using your Mpeg4Playhandler code, and it actually works quite ok, of course there is a lot higher CPU consumption doing that (hence I want processed killed as soon as it can eheh)...
I didn't dive into your HLS code yet... have to look at it
maybe an idea to make it configurable, something like: "preferred streaming format"