-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A method to stitch together VOD clips #764
Comments
We implemented this by building a 'stream merging' api that normalises and concatenates mpd sources into a single stream available as hls & dash on the fly and passing that as the source for each. The code is a bit of a mess but it works well. No reason the input can't be amended to support hls streams too. .following |
On a side note: This could also be achieved server-side to avoid having to re-implement this on every device platform. Something we developed as a proof-of-concept and made available as open source: https://eyevinn.github.io/channel-engine/ With that said, the proposed method would still be cool and nifty feature to have in Shaka. |
I think this would be very interesting for our use case (I work on music streaming at TIDAL) currently we use two instances of Shaka player to do preloading of the next track when the playing track is close to finished. Ideally we would like to have as short a gap when switching between tracks as possible (gapless being the goal) :-) |
@joeyparrish (in reply to #880 (comment)); Cool. Like Øyvind said gapless is the goal for us at TIDAL. I'm free to look into this and would like to help if possible. Any pointers were I should start digging in the shaka code base? |
In v3.0, we introduced a utility that stitches together DASH periods. That could also be adapted for used in The preconditions can be checked in The most complicated part will be starting a secondary "load graph" to parse the new manifest. (This is effectively a state machine that implements all the various parts of load() and interactions with attach(), detach(), unload(), and destroy().) In this way, it does connect to #880, since preload may also want to refactor some of the load graph stuff to be able to start the load process for multiple pieces of content in parallel. In Player ( In Player, in Finally, you'll want to look at That's a very rough sketch of the components I expect should be involved, but we haven't done any serious design work on this or thought through all the changes or their potential side-effects. It looks to me like a very big change. So you should feel free to try making some changes as a proof-of-concept, but it might save us all time and effort in the long term if we have more design discussions as you progress. If the first we see of your chosen approach is a completed PR, it might be a painful review, and any design changes we ask for at that late stage may be more difficult to make. Thanks for expressing interest in working on this! |
Thanks for the thorough reply @joeyparrish! I'll have a look at this methods and get a bit more acquainted with the code base. It looks like preload is something the main shaka team is going to jump on soon looking at the roadmap and wishes for next release? Maybe I should wait with tying to implement gapless - or at least the loading aspects - until that is done? |
Is anyone interested in this functionality? |
Yes, 257 %! Needed for gapless playback :) |
Hi all, I'd like to add that it would probably be worth considering how the solution extends to also support stitching from VOD to live. This is something that is already declared as possible in ISO/IEC 23009-1 5.11.2 Regular Chaining:
Not to say that Shaka needs to support all supplementary/essential descriptors out there, but just to emphasize that there is precedence for a need to support more than just VOD to VOD, so something to take into consideration when solving for VOD to VOD. |
Okay, makes sense. If the additional content is live, that should be okay. (We will have to adjust timestamps in the live content to make it happen.) But the existing content must be static to be able to append anything new. Does that sound good? |
Yes, makes sense to me. The document does mention that "the chained-from MPD may be of type static or dynamic", but I have to think that surely that can only apply to a dynamic manifest that has turned static, or maybe just a typo... Because I don't even understand the use case otherwise (when should the player transition over?). I'll ask in the video-dev In any case, our use-case only considers existing content being static. We would consider this for live pre-roll, which would be represented as some small chain of static assets (e.g. 3), followed by a dynamic asset starting at the live point. |
Update: I got an answer from video-dev#dash. @joeyparrish when you mention "the existing content must be static to be able to append anything new", do you mean that you wouldn't consider an API that would allow appending to something that is currently live but could end and then transition? So something like "scheduling an asset to be appended when the current asset end is known". Again, I'm not pushing for it, just curious on your thoughts. |
It might be interesting to allow an application to stitch together multiple VOD clips.
For example:
The periods of the new content would be appended to the periods of the old content, and the presentation timeline would be extended to match.
There would be no requirement that the same manifest parser be used for each clip, so DASH could be appended together with HLS.
Appending a manifest which turns out to be live or IPR content would fail with an error such as
CANNOT_APPEND_NON_VOD_CONTENT
.If the initial load() call is for live or IPR content, the
appendVod()
call would call fail with an error such asCANNOT_APPEND_TO_NON_VOD_CONTENT
. (Subtle difference in error code.)If filtering the new content against the existing content leaves no playable streams from the new content, the call would fail with an error such as
CANNOT_APPEND_INCOMPATIBLE_CONTENT
. For example, appending TS content after MP4, or appending H.264 after VP9.If this capability would be interesting to you, please comment and let us know!
The text was updated successfully, but these errors were encountered: