The easiest way to capture information on YouTube videos is to get a source from http://youtube.com/get_video_info?video_id=XXXXXXXX
I will use PHP as an example of processing this data. Using PHP parse_str () , you can assign the entire string variable to a beautiful array of video information:
$content = file_get_contents("http://youtube.com/get_video_info?video_id=".$id); parse_str($content, $ytarr);
Then all information is stored in $ ytarr . The variables of interest will be fmt_list and fmt_map (which appear to contain the same afaik thing). This variable contains a list of available video formats according to the diagram here: http://en.wikipedia.org/wiki/Youtube#Quality_and_codecs
Assuming that you know which of these formats you want to download, you can use the fmt_url_map variable (or $ ytarr ['fmt_url_map'] in this example) to access the list of links in the desired format.
You can download videos of any format using these links, but they depend on the limited bandwidth of youtube (youtube uses the optimal streaming speed to save bandwidth), so downloading will not be as fast as you could imagine. This makes me think that these links are best used for streaming and not for downloading, but I don't know any alternative.
Cruel source share