Easiest way to grab information on a youtube video is to get the source from http://youtube.com/get_video_info?video_id=XXXXXXXX
I will use PHP as an example of handling this data. Using PHP's parse_str() you can assign all variable of the string to a nice array of video info:
$content = file_get_contents("http://youtube.com/get_video_info?video_id=".$id);
parse_str($content, $ytarr);
Then all the info is stored into $ytarr. Variables of interest would be "fmt_list" and "fmt_map" (which appear to contain the same thing afaik). This variable contains a list of available video formats in accordance to the chart here: http://en.wikipedia.org/wiki/Youtube#Quality_and_codecs
Assuming you know which of those formats you wish to download, you can then use the "fmt_url_map" variable (or $ytarr['fmt_url_map'] in this example) to access the list of links to the desired format.
You can download videos of any format using those links, but they are subject to youtube's limited bandwidth (the optimal streaming speed youtube uses to save on bandwidth) so therefore the downloads won't be quite as fast as you would imagine. This leads me to believe that these links are best used for streaming rather than downloading, but I'm not aware of any alternative.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…