View Single Post
  #9  
Old January 8th 07, 02:19 AM posted to rec.aviation.piloting
[email protected]
external usenet poster
 
Posts: 19
Default Emergency landing at airfield

Jay Honeck wrote:
There are HUNDREDS of aviation videos on youtube, I made a 4 something
hour DVD out of just mostly ultralight/microlight/VLA stuff downloaded
from youtube a few months back.


I've not counted the number of aviation videos on YouTube, either, but
I'm curious -- what method do you use to save/burn them?


As somebody else posted there are plugins for Firefox which allow you
to easily download videos one at a time.

But because I had quite a number I wanted to grab all at once I added
them all to a playlist which is set as my "Video Log", and wrote a
script (that Computer Science major comes in handy now and then) to
download each video from Video Log (as the .flv (flash video) file) -
the script actually cheated a bit and used keepvid.com to get the URL
to each video file and then download that. As I recall I then
transcoded the files to mpeg or avi or something, and from there could
use any old DVD creator thingee.

The results were ok, as you would expect the low resolution of most
videos on YT makes the resulting DVD decidedly low quality, but
certainly watchable, and perfect for my purposes of a "running display"
at public events for our club.

For anybody interested, here's the video log I used (plus a few more
I've added since)
http://www.youtube.com/profile_video...leemanj&page=1
it has the odd duplicate video in it because I forget what I've added
in the past

For reference, here is the quick hack of a (PHP) script I wrote to do
the downloading, it should work on most any Unix-ish (web) server...

---start--cut--here----youtuberipper.php---
?php
$Username = 'your_youtube_username_here';
$Stop_At_Page = 18;
$Save_To = '/tmp/';

$URL =
'http://www.youtube.com/profile_video_blog?user='.$Username.'&page=';
$Page = 1;
while($Page = $Stop_At_Page)
{
$yt = file_get_contents($URL . $Page);
preg_match_all('/a href="(\/watch\?v=[^&]+)&[^"]+"([^]+)\/a/',
$yt, $matches, PREG_SET_ORDER);
echo "\n";

foreach($matches as $set)
{
if(is_numeric($set[2])) continue;
ob_start();
system("echo \"url=" . urlencode('http://www.youtube.com' .
$set[1]) . "\" | POST http://keepvid.com/index_p/");
$x = ob_get_clean();
if(preg_match('/"(.+\/get_video\?video_id=[^"]+)"/', $x, $m))
{
$set[1] = $m[1];
}
echo "{$set[2]}\t\t\t{$set[1]}\n";

system("GET {$set[1]} {$Save_To}" . preg_replace('/[^A-Z0-9-_]/i',
'_',
$set[2]) .
".flv");
}

$Page++;
}
?
---end--cut--here----youtuberipper.php---