video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.79k stars 2.57k forks source link

Seamless playback of VOD assets on SmartTV (WebOS) - using on the fly merged M3U8s? #3385

Closed xo-vision closed 3 years ago

xo-vision commented 3 years ago

I have developed a small digital signage system that can play videos and html clips driven by an ad server.

The ad server will deliver descriptions of the next clip to load and refreshes after the current clip starts playing so the next clip is known. I need to play video clips seamlessly, but failed to make that possible. There is always a black screen glitch in between videos. I cannot use two video players and preload to the hidden one in order to show it when necessary (this works perfectly on PC though) as WebOS for TV allows only for one video element, unfortunately. I tried several methods, none of them worked.

Now my idea is to create an M3U8 on the fly that stitches VOD videos in realtime on the client.

Is that possible? I am not a HLS specialist obviously, but my idea is to create a "pseudo"-live M3U8 by concatenatong them when the next clip is available and update it after reload of a new video clip.

Any ideas? Would that be possible? Are there alternatives?

robwalch commented 3 years ago

I don't think you're going to have luck getting media with consistent codecs, resolution, and bandwidth from ad servers. MSE can be finicky about the input being consistent so while possible, this does not sound easy, fun, or reliable in the long term.