How can I get the actual video URL of a YouTube live stream?

You need to get the HLS m3u8 playlist files from the video’s manifest. There are ways to do this by hand, but for simplicity I’ll be using the youtube-dl tool to get this information. I’ll be using this live stream as an example: First, get the formats of the video: ➜ ~ youtube-dl –list-formats … Read more

youtube api v3 page tokens

You’re experiencing what is intended; using the nextPageToken, you can only get up to 500 results. If you’re interested in the development of how this came about, you could read through this thread: But as a summary of that thread, it basically comes down to the fact that, with so much data on YouTube, … Read more

how to map youtube handles to channel IDs

One more time YouTube Data API v3 doesn’t provide a basic feature. I recommend you to try out my open-source YouTube operational API. Indeed by fetching you will get the YouTube channel id you are looking for in item[“id”]. For instance with the YouTube channel handle @WHO, you would get: { “kind”: “youtube#channelListResponse”, “etag”: … Read more

How to get the mp4 url for Youtube videos using Youtube v3 API

i made a very simple API : As Example: YouTube Video Link:**YGCLs9Bt_KY** now to get the Direct link you need to call the api , like this (change to your site) : returns: [ { “url”: “https:\/\/r10—\/videoplayback?key=yt6&signature=81D86D3BC3D34D8A3B865464BE7BC54F34C1B0BC.7316033C2DD2F65E4D345CFA890257B63D7FE2A2&mt=1522999783&expire=1523021537&sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&requiressl=yes&ei=gSLHWvuxDMOUVYaTqYgB&dur=244.204&pl=22&itag=22&ip=”, “quality”: “hd720”, “itag”: “22”, “type”: “video\/mp4; codecs=\”avc1.64001F, mp4a.40.2\”” }, { “url”: “https:\/\/r10—\/videoplayback?key=yt6&mt=1522999783&gir=yes&expire=1523021537&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&itag=43&ratebypass=yes&fvip=2&ipbits=0&mime=video%2Fwebm&initcwndbps=710000&signature=71DC48B9BF4B2E3ED46FE0A4CD36FE027DACF31E.4624B7B4BCB947336CEB029E9958B136F79759EB&clen=24203231&requiressl=yes&dur=0.000&pl=22&ip=”, “quality”: “medium”, … Read more

How to obtain a feed of comments entered through the ‘chat’ box during a YouTube live broadcast?

It is now possible to return chat messages for your own broadcasts using the LiveChatMessages endpoint as part of the YouTube Live Streaming API. When creating a new liveBroadcast object, a liveChatId String will be returned as part of that liveBroadcast‘s snippet. Pass your broadcast’s chat ID to LiveChatMessages/list endpoint’s liveChatId parameter, and id, snippet, … Read more

Youtube api v3 Get list of user’s videos

The channels#list method will return a JSON with some information about the channel, including the playlist ID for the “uploads” playlist:{YOUR_API_KEY} With the playlist ID you can get the videos with the playlistItems#list method:{YOUR_API_KEY} You can test those at the end of the documentation pages.

How to play YouTube content on tvOS

UIWebView and MPMoviePlayerController are not available for tvOS. Our next option is to use AVPlayer to play YouTube videos. AVPlayer cannot play a YouTube video from a standard YouTube URL, ie. It needs a direct URL to the video file. Using HCYoutubeParser we can accomplish exactly that. Once we have the URL we need, … Read more