How to get live stream url from youtube live?

Get current stream URL out of Youtube Live API

  • Is there any way currently to get the livestream URL out of the Youtube Live API? I can get the id, but there doesn't appear to be anyway to change that into a URL. Not that it should matter, but I'm using the Python youtube client.

  • Answer:

    [Edited] I believe you got the stream ID instead of the broadcast ID. Check the https://developers.google.com/youtube/v3/live/code_samples/python#retrieve_a_channel_s_live_video_streams to see how to get your channel's broadcast ID. ... print "%s (%s)" % (broadcast["snippet"]["title"], broadcast["id"]) vs ... print "%s (%s)" % (stream["snippet"]["title"], stream["id"]) Although both get an id value, they are two different objects, therefore they should give you two different IDs. Appending the broadcast ID to the URL I mentioned in the comments will give you the URL for the stream. Update: If you created a live event via your YouTube channel, you can just use liveBroadcasts list to get the id, which will also be the video ID that you can use to get the URL. If you created a liveStream via insert(), you must also create a liveBroadcast using insert() and bind it to the liveStream with bind() before you can use liveBroadcasts list to get the ID.

Ben Hoff at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.