You're viewing a comment by Greg and its responses.
You're viewing a comment by Greg and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


I put together the following korn script from your perl code... It downloads the video and converts it to a DVD-style MPEG. Good work; I hope others will find it useful!
#!/bin/ksh set -e if [ -z "$1" ]; then echo "Please supply quoted URL as argument." exit 1 fi URL="$1" FILE=`echo "$URL" | awk -F 'v=' '{print $2}'` perl -MWWW::Mechanize -e '$_ = shift; ($y, $i) = m#(http://www\.youtube\.com)/watch\?v=(.+)#; $m = WWW::Mechanize->new; ($t = $m->get("$y/v/$i")->request->uri) =~ s/.*&t=(.+)/$1/; $m->get("$y/get_video?video_id=$i&t=$t", ":content_file" => "$i.flv")' "$URL" mencoder -of mpeg -mpegopts format=dvd -ofps 30000/1001 -oac lavc -ovc lavc -srate 48000 -af lavcresample=48000 -vf scale=704:480,expand=720:480 -lavcopts acodec=ac3:abitrate=192:vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=1856:keyint=18:aspect=4/3 -o "$FILE.mpeg" "$FILE.flv"Reply To This Comment