Enhance your YouTube Viewing Pleasure
Tuesday, August 15, 2006
Publishing your own video on YouTube, or watching other people's videos, is all the rage these days. Why are we talking about YouTube, in a column about the CLI? Because this week we're writing about youtube-dl, a clever little CLI tool that's easy to install and use to fetch YouTube videos." Read more @ Linux.com.
Note form the Nerd: This really is a neat little python program. I have been playing around with it for a while, and I love it! Acually quite useful. I have also found a bash script alternative to this program (doesn't require python) written by Crouse from Bashscripts.org:
Note form the Nerd: This really is a neat little python program. I have been playing around with it for a while, and I love it! Acually quite useful. I have also found a bash script alternative to this program (doesn't require python) written by Crouse from Bashscripts.org:
#!/bin/bash
# by Crouse
# Program name ytr = YouTube.com Ripper
baseurl="http://youtube.com/get_video.php?"
mkdir -p ~/YouTube ;
mkdir -p ~/YouTube/tmp ;
cd ~/YouTube/tmp ;
read -p "What is the youtube.com url you want to rip ? " urltorip ;
read -p "What would you like to name the video (no spaces in the name) ? " nameofvideo ;
wget ${urltorip} -O urlsource.txt ;
grep "player2.swf" urlsource.txt > url.info ;
cut -d? -f2 url.info > url;
cut -d\" -f1 url > videoid;
videourl=`cat videoid`
fullurl=${baseurl}${videourl}
echo ${fullurl}
rm *
wget ${fullurl}
mv * *.flv
echo "Now converting the file to mpeg ... this can take awhile, please be patient" ;
ffmpeg -i *.flv -ab 56 -ar 22050 -b 500 -s 320x240 ${nameofvideo}.mpg
mv *.mpg ../
rm -Rf ~/YouTube/tmp
exit