YouTube maxresdefault thumbnails

You can use YouTube Data API to retrieve video thumbnails, caption, description, rating, statistics and more. With the YouTube Data API, you can add a variety of YouTube features to your application. For the high quality version of the thumbnail use a url similar to this: http://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg There is also a medium quality version of … Read more

how to set up default download location in youtube-dl [closed]

You need to use the -o switch with the Configuration file Output on youtube-dl is handled with the –output or -o switch; pass it as an option, followed by the destination you want to save your downloads to: youtube-dl -o “%USERPROFILE%\Desktop\%(title)s-%(id)s.%(ext)s” www.youtube.com/link/to/video Note that -o has a dual function in that it also sets a … Read more

Get title from YouTube videos

Easiest way to obtain information about a youtube video afaik is to parse the string retrieved from: http://youtube.com/get_video_info?video_id=XXXXXXXX Using something like PHP’s parse_str(), you can obtain a nice array of nearly anything about the video: $content = file_get_contents(“http://youtube.com/get_video_info?video_id=”.$id); parse_str($content, $ytarr); echo $ytarr[‘title’]; That will print the title for the video using $id as the video’s … Read more

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: https://www.youtube.com/watch?v=_Gtc-GtLlTk First, get the formats of the video: ➜ ~ youtube-dl –list-formats … Read more

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. https://www.youtube.com/watch?v=8To-6VIJZRE. 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

How can I make the YouTube player scale to the width of the page but also keep the aspect ratio?

What i believe to be the best CSS solution. .auto-resizable-iframe { max-width: 420px; margin: 0px auto; } .auto-resizable-iframe > div { position: relative; padding-bottom: 75%; height: 0px; } .auto-resizable-iframe iframe { position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } <div class=”auto-resizable-iframe”> <div> <iframe frameborder=”0″ allowfullscreen=”” src=”http://www.youtube.com/embed/_OBlgSz8sSM”></iframe> </div> </div> Demo http://jsfiddle.net/46vp592y/

youtube-dl, how do I resume a download after error?

It’s good to use a combination of -ciw when downloading playlists. -i, –ignore-errors Continue on download errors, for example to skip unavailable videos in a playlist -w, –no-overwrites Do not overwrite files -c, –continue Force resume of partially downloaded files. By default, youtube-dl will resume downloads if possible. The following example downloads top 100 songs … Read more