streamlink
streamlink copied to clipboard
plugins.youtube: rewind support / DASH streams
Feature Request
- [x] This is a feature request and I have read the contribution guidelines.
Description
Youtube and some other sites have replaced HLS rewinding with DASH, and so Streamlink can no longer download live streams from the beginning.
Expected / Actual behavior
Some youtube streams have "rewind" enabled, allowing users to rewind to the beginning of the stream and watch the full stream with history.
Formerly, Streamlink was able to interface this and download the complete stream using --hls-live-restart
. Apparently, youtube no longer uses hls for this, and so the ability to interface with dash and recover previous segments is required to ensure continued functionality.
Additional comments, screenshots, etc.
See related issues:
https://github.com/streamlink/streamlink/issues/2572 https://github.com/streamlink/streamlink/issues/2890 https://github.com/streamlink/streamlink/issues/2891 https://github.com/streamlink/streamlink/issues/2935
And especially these comments:
https://github.com/streamlink/streamlink/issues/2891#issuecomment-612662516 https://github.com/streamlink/streamlink/issues/2935#issuecomment-619452446
https://github.com/streamlink/streamlink/issues/2891#issuecomment-612662516 is by far the most important comment for anyone looking at this. We tried to get it working before but it created major problems so we gave up on it. If anyone wants to try again the notes linked in that comment are going to be the best starting place.
Edit: I am going to lock all other Youtube HLS rewind issues. DO NOT comment on this with any "this is broken for me", or "+1" or anything else useless like that which doesn't contribute to providing code that moves towards a solution. If I start seeing that in here as well I'm going to delete those comments as they don't contribute anything helpful and simply clutter the issue.
I think this will require some quite significant work on the way streams are downloaded to make it feasible. I started work on a redesign of that stuff and maybe it’s something we can look at for 2.0.0 - I will write up some design docs next week and create and issue to describe what I’m thinking.
For people who need this functionality - there is an "alternative", Mediahuman youtube-downloader, which does download youtube livestreams from the start. However for me a number of times it would cancel midway through the stream with "Download completed". Another "alternative" would be setting up a cron job with some shitty bash script to get new livestream from rss and start downloading it as it goes live.
Is there any other "free" alternative to streamlink that has youtube rewind support? Mediahuman youtube-downloader is asking for $20.
guys I cannot play youtube live i.e. skynews live. can someone help please?
@bachoo786 Did you read through the issue? If it's a DASH stream it won't work. Adding this sort of comment creates pointless noise. No one can help you because of the nature of the problem. We can't just "fix it", it's not that simple. If someone feels like working on this they will.
@gravyboat relax mate could have said it in nicer way jheez
MediaHuman YouTube Downloader doesn't work either, it says "Live streams are not supported".
Even if only a small amount of people report that issue on github, much more people do not bother doing it and simply drop streamlink because it just does not work for them any longer. We would appreciate this feature implemented. A feedback is not "pointless notifications".
@Entrack If they drop Streamlink because it doesn't work that's fine and their choice, this isn't a product people are paying for where we have some sort of obligation to make certain functionality work or prioritize any functionality over what people feel like working on.
More feedback is absolutely a pointless notification at this point unless that feedback includes a solution, code, or possible way to make this work. We understand some of the people using this free and open source software would like DASH support. If it was as simple as snapping our fingers and having it done we would have done so already (and we have tried).
This software is free and open source. If you don't like how we run it and want to fork us, feel free to do so. If you want to submit a PR to fix it we'll review that PR. Until that point remember that people are spending their limited free time working on this software without compensation. If you don't like that people pick and choose what they want to work on in their spare time that's not our problem.
This project works for downloading ongoing streams from the start https://github.com/rytsikau/ee.Yrewind, seems to only support Windows though.
This is the Streamlink issue/bug tracker, not a place for discussing how you can download stuff from youtube via unrelated and/or proprietary software.
@bamtan That is a cool work around that according to the readme uses chrome, probably headlessly through an api. The actual chrome integration and implementation is closed source and the executable uses obfuscation, and thus you wouldn't know if it is doing questionable things now or in future releases. So overall I would be cautious in using it.
As far as using a similar technique for streamlink, I also have to wonder if the maintainers here would want to bundle chrome. So far it seems they want to continue on their path of producing their own implementation, which likely offers much more control.
I suppose it doesn't hurt to note other working alternatives though, as if someone was having trouble with DASH downloads, this is a sensible place for them to look.
This would still be very nice.
https://github.com/Kethsar/ytarchive
The ytarchive utility has been rewritten in golang, but for those who understand python better and want to see it in that language working at the time of this comment despite some bugs, here is a link to the python version as it will be removed: https://github.com/Kethsar/ytarchive/blob/v0.3.0/ytarchive.py
Unlike the previous suggestion put here, this does not rely on a web engine or opening a browser, and is actually open source, MIT no less, so it should be easy to adapt. I am already slapping together something for my private streamlink build.
Thanks for pointing it out!
As this may help whoever implements this the proper way in streamlink, download a live stream from its start for DASH has been merged into yt-dlp: [youtube] download live from the start, to the end #888
When the next yt-dlp version releases you can use yt-dlp --wait-for-video 120 --live-from-start
to watch for and start downloading a livestream.
Is this work in progress to be implemented in streamlink? :)
Since currently adaptive formats are not supported for live streams. If someone needs, here is an alternative https://github.com/jmf1988/ytdash It is mostly focused on live playback. Works well and in fact only tool that I found that supports live youtube dash playback currently.
Sorry for linking other project, but I think it may be useful for some and there is not much development on streamlink side to support adaptive playback.