livestreamer
livestreamer copied to clipboard
Is it possible to "rewind" a youtube live stream?
There is this live stream that allows you to go 2 hours back in time (https://www.youtube.com/watch?v=KF47Za1lfjM). Whenever I miss the beginning of a show, I would like to be able to tell livestreamer for example to start recording 5 minutes earlier of even at a specific time. Is that possible? If not, and if it would be feasible to implement, I'd recommend adding this feature.
Yes, you can do this if you are capturing an hls YouTube stream. Just pass the command line argument --hls-live-edge SEGMENTS. The higher SEGMENTS is, the farther back in time you can go. Some streams only allow you to go back a little bit.
Note this is not just for YouTube -- it works for any HLS stream that allows "rewind". Also note that if your HDS stream allows for rewind you can do the same with the argument --hds-live-edge SECONDS. SECONDS is the number of seconds to go back in time.
I don't think there's any way to do this for a AKAMAI, HTTP, or RTMP stream
Thanks. I found out that it is in fact possible to go back the full 2 hours if I type in a very high number. You don't by any chance know how long one segment usually is?
Sorry, I haven't taken the time to figure that out. But yeah, if you just keep increasing the number, you will be able to eventually get back far enough to the beginning. If you set it to something absurdly high (10000?) you can pretty much be sure that you'll get everything that you can potentially get, going back to the beginning and eventually (usually) catching up to the live stream before too long if you have decent enough bandwidth.
Is there no --http-live-edge option to rewind httpstream:// protocol? I guess it should be possible but it is not implemented in livestreamer tool?
I did not find a way to rewind this command: livestreamer "httpstream://http://vr-live-mp3-128.scdn.arkena.com/virginradio.mp3" best