Showing posts with label youtube. Show all posts
Showing posts with label youtube. Show all posts

Tuesday, June 1, 2010

How to extract the audio from a Youtube video?

Did you ever encounter a Youtube video you really like the audio part? I'm sure you wonder now how you can extract the audio from your favorite Youtube video. Here is how you can do it for free in three easy steps.

a) Download the Youtube video
First, you have to download the Youtube video.

b) Extract the audio from the video
You have to install mplayer (on Ubuntu: sudo apt-get install mplayer)
$ mplayer -quiet youtubeVideo.MP4 -ao pcm:fast:file=audio.wav -vc dummy -vo null -channels 2

This will extract the audio from the file youtubeVideo.MP4 and will convert it to a WAV file called audio.wav.

c) Convert the WAV file to an MP3 file
The last step is to convert the WAV file to an MP3 file which is a lot smaller and allows you to save space. For this we are using "lame" (on Ubuntu: sudo apt-get install lame):

$ lame audio.wav audio.mp3

This will take the audio.wav file and save it as audio.mp3. That's it. The file audio.mp3 contains the audio part of the Youtube video.

Sunday, May 30, 2010

How to download Youtube videos

Have you ever wanted to download a Youtube video? This is very easy with Firefox as there is an add-on called 1-Click YouTube Video Download. Once you have installed this add-on there will be a link below every Youtube video where you can download them in the following formats: MP4 HD (High Definition), MP4 High-Quality and FLV.



Which format should I download?

This depends on what you want to do with it. The MP4 file format is usually the recommended format as it allows easy conversions to other formats. The FLV format is the container file format used to deliver video over the Internet using the Adobe Flash Player. Finally the 3GPP file format is mostly used on used on 3G mobile phones.