Bringing Linux to the Masses
NOTE: This howto is for Linux users. If you are a Windows user go pay someone $40 and then another $15. Good luck.
So you are at work and really want a song but just can’t get it because torrenting at work is blocked or could really get you in trouble? No problem, why not use youtube? Chances are that the song is already there on some video, either the official music video or some random compilation!
Search for a video that has the song you are looking for, then download the video using keepvid and save it on your desktop. Now you will need a script to convert your newly downloaded video from .flv to .avi. So fire up your favorite text editor and copy this into it:
# video encoding bit rate
V_BITRATE=1000
while [ "$1" ]; do
case “$1″ in
-divx)
MENC_OPTS=”-ovc lavc -lavcopts \
vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect”
;;
-xvid)
MENC_OPTS=”-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect”
;;
*)
if file “$1″ | grep -q “Macromedia Flash Video”; then
mencoder “$1″ $MENC_OPTS -vf pp=lb -oac mp3lame \
-lameopts fast:preset=standard -o \
“`basename $1 .flv`.avi”
else
echo “$1 is not Flash Video. Skipping”
fi
;;
esac
shift
done
Save the file as flv2avi.sh. Next chmod it and move it into your /usr/bin (while you are in the directory of the script)
Ok so now we are ready to convert our downloaded .flv file to avi, so run this command (while you are in the directory of the video)
After some crunching you will get a new file called name_of_file.avi, all you need now is to strip the sound from the video. Use the following command:
Thats it! You got your song in a .wav format. Convert the .wav file into whatever format you prefer
honestape Vote:
0
0
March 10th, 2008 at 10:12 pm
Trying to make us Windows users feel inferior? Well, it won’t work here, buddy!
[Reply]
atropos Vote:
0
0
March 11th, 2008 at 7:46 am
You should feel inferior
One argument that has been beaten to death is that most people see computers as tools and don’t care how it works, so yes when it comes to “computer kung fu” they are inferior…on the other hand, if one is interested in computers and only does Windows, may god have mercy on his soul.
[Reply]
BSA Vote:
0
0
March 14th, 2008 at 2:14 am
thanks for the advice
[Reply]
Rami Taibah Vote:
0
0
March 14th, 2008 at 8:00 am
Anytime mate, tell me how it works out
[Reply]
tuxie_ Vote:
0
0
March 17th, 2008 at 6:39 pm
I developed a tiny bash script to download videos from youtube, convert and play them. It’s called “latuba”.
http://tuxie.debianuruguay.org/?p=69
http://tuxie.debianuruguay.org/xtras/latuba
It depends on youtube-dl or whatever software you want to use to do the actual download, ffmpeg to convert it to avi and vlc to play it. It also receives a list of parameters, like youtube’s username and password to download adult only videos.
It would be a nice feature to extract the audio from the video, I’ll add it in the future.
[Reply]
tuxie_ Vote:
0
0
March 20th, 2008 at 1:45 am
I posted a comment (#560) but didn’t get approved nor deleted. Was it eaten by the spam filter for containing URLs in it?
Thanks.
[Reply]
Rami Taibah Vote:
0
0
March 20th, 2008 at 4:15 am
Ok it’s in thanks Tuxie
Ya I know there are a lot of tools like that, this one is just a quick and dirty guide. You know. Anyways thanks for the links.
[Reply]
McBain Vote:
0
0
April 9th, 2008 at 3:38 am
This is all well and good. Well, its good if you like your music encoded at 64k mono. Ever noticed how low quality the audio tracks on youtube videos are?
Seriously bro, 64k mono isn’t even FM radio quality. As a way to download music, this sucks.
[Reply]