question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to start at "live" on a Youtube livestream?

See original GitHub issue

Hi,

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:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
fentcommented, May 11, 2017

The range and begin options are not currently supported for live streams. Will have to do some investigating.

2reactions
FireController1847commented, Aug 31, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found