how to start at "live" on a Youtube livestream?
See original GitHub issueHi,
I tried to get the stream of a Youtube livestream with this line of code:
stream = yt("https://www.youtube.com/watch?v=QHV9lnZuFaY", { range: {starts: 999999}});
const dispatcher = connection.playStream(stream);
Regardless of what I will enter in the starts
parameter, the stream will start at beginning or 4h earlier if the stream is longer than 4 hours online.
Is there a way to start streaming at the current live position?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to Live Stream On YouTube
Creators can live stream on YouTube via webcam, mobile, and encoder streaming. Webcam and mobile are considered great options for beginners and allow...
Read more >How to live stream on YouTube - Epiphan Video
How to live stream on YouTube: Web browser · Log in to your YouTube account and click the “Create a video or post”...
Read more >The Complete Guide to Streaming on YouTube Live
How to livestream on YouTube on mobile or a tablet. Open the YouTube app; At the bottom of the screen, tap on Create...
Read more >How to Live Stream on YouTube: Step-by-Step Guide
Open the YouTube app and select the Camcorder icon. · Select Go Live. · Add a title and privacy setting to your stream....
Read more >How to Live Stream on YouTube in 7 Easy Steps
Open up the YouTube app. · Click on the 'Create video' button (camera icon) . · Click "Live”. · Give your stream a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
range
andbegin
options are not currently supported for live streams. Will have to do some investigating.I’m not exactly sure about other people, but I’ve livestreamed myself once or twice on YouTube and it’s only let me archive up to four hours. Of course, after the stream ends, it will then re-upload the video for like 11 hours or however long it was, but while it was live afaik it only goes back 4 hours.
I’ve left my bot running for quite a while recently, and it actually seems that it requests for a new buffer every 30-45 minutes (but I’m not exactly sure, as I forgot to measure time lol). I still believe that it contains everything up to “live”, though, as when I used the Postman app on chrome it gave me a list over 5000 lines long.
I believe that instead of having to specify whether it be live, it should be live by default, and adding a begin option will override the default. Of course, we could always use begin: “now”, it’d just be set to now by default. It sounds like a great idea.
For going back in time, that also sounds like a great idea. When hovering over a YouTube livestream, you can see it says “-3h20m10s” or something like that, so a negative number sounds great. I’m going to continue testing and see if I can whip something up that will work.
Edit: Testing wise, I’m now logging the date of a new response from the buffer so we can find out how many are actually included in a request.
Edit 2: With my testing, I ended up getting stuck at the point where I’m not exactly sure how to only get the last item in the list. That’s why I ended up coming here to let you know of my findings. I’ve stopped testing for now.