Youtube to Ogg (or mp3)

Youtube has lot of videos where the important part is the music. Sometimes I like to save it to .ogg (or .mp3 if needed). I write it down how I usually do:

I find some song that I want to save, for example:
http://www.youtube.com/watch?v=6gaZYk85rnA

What you need? On a Debian system, the packages youtube-dl, mplayer, vorbis-tools ( apt-get install youtube-dl mplayer vorbis-tools ) (I’m not sure if the default mplayer in Debian works or it’s a special one)

Then execute:
youtube-dl "http://www.youtube.com/watch?v=6gaZYk85rnA"

mplayer -novideo -ao pcm:file=pingpong.wav 6gaZYk85rnA.flv

oggenc pingpong.wav

The sound of the video is inside pingpong.ogg.

If you want in mp3 format: change oggenc by your encoder, or audacity pingpong.wav and then File – Export as… and select mp3.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>