-
Notifications
You must be signed in to change notification settings - Fork 23
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
PROPOSAL: enhance live stream support #77
Comments
Thanks for your proposal. Can you explain what your planned use case is? Do you want to improve the ability to download "pseudo-live" streams, where all segments are in fact available at the time of download, or are you interested in viewing a "true" live stream, live, as is possible with VLC for example? Also, I don't understand what you mean by your point concerning tempfiles and "operate on the output files". |
My planned use case is to support true live streams where not all segments are available yet: "start at live position or select a catchup mode where we start processing in the beginning of the stream(if fragments still available) and keep processing live until stream ended or user interrupted". I successfully used this on pseudo live streams and it works flawless but I'm interested in making it work with real live streams "by bringing it closer to a player implementation". The point of the tempfiles is somewhat off topic but I came across it when trying to analyse my usecase fit and I stumbled upon the save_fragments option. when this is selected it seems to be redundant to still use tempfiles to operate on for decoding and remuxing purposes as it uses double the disk space and keeps your saved fragments drm encrypted. |
OK, in principle I am in favour of better support for live streams. My current intuition is that the necessary logic would be difficult to fit in with the current VOD support, which is already rather convoluted. For example, I presume it would be necessary to add to the API a consumer function for the segments as they are downloaded, and to add timing logic to wait for segments that are not yet available. (Perhaps you can convince me that my intuition here is incorrect, though.) I would probably be willing to merge separate code that handles live streams, if it looks good to me, and to reorganize the existing code so that it's easier to share common functionality. |
I do think a timing mechanism is definitely necessary. I'd be happy to go about that alongside the consumer function and other topics. |
The current sequential Period-based approach is simpler that what you are proposing. That's not a sufficient reason to avoid reorganizing as you suggest; if your patch looks good I will probably be willing to merge it. Have fun! |
I'm interested in using this package for livestreams by bringing it closer to a player implementation:
I personally believe that these features would roundup this module, this is why I'm opening this issue rather than just going ahead reimplementing most of this logic. I think rather than a completely dedicated routine we could offer these features being backwards compatible and still fully supporting the VOD usecase that is currently covered and keeping the api pretty much the same with little additions.
I'm happy to help with the change in implementation if you find this proposal useful.
The text was updated successfully, but these errors were encountered: