I hardly ever have time to stay in front of my computer and watch speeches about subjects that I’m interested in.
For example this speech given by John Resig: John Resig on Advanced Javascript to Improve your Web App.
So in order to solve my lack of time problem I prefer to listen these speeches in my mp3 player. I do that when I’m walking, when I’m waiting for the bus, when I’m doing workout, etc.
There are same steps that I follow to do that.
The first think to do is download the video. To download the video I use a firefox plugin named “NetVideoHunter”.
You can have it installed by clicking here NetVideoHunter plugin.
It works for almost all the video-sharing site likeYoutube, MySpace Music, Google Video, Metacafe, Dailymotion, Break, Putfile, etc.
After you have the video downloaded you need to extract the audio of the video and convert it to mp3 format. So it will be able to be played in your mp3 player.
The software that I use to do it is the FFmpeg. It is a is a free software / open source andit can runs in Windows, Linux, Mac OS, etc). It does much more than just extract the videos sounds. Maybe someday I’ll write about this great software. But now I’ll just focus on its feature that is extract the sound.
To download and install the software you have some possibilities:
You may need to install the Lame Encoder then follow the instructions that are in this page.
You have all that you need: the video and the ffmepeg and the lame encode installed.
The extraction of the audio is easy. All we need to to is using this code bellow. By doing that you’ll extract the sound in the mp3 format with a good quality:
ffmpeg -i video_file_name.flv -ab 160k -ar 44100 -ac 2 mp3_file_name.mp3"
If you are on Windows use the command.
ffmpeg.exe
*It works for a lot of video formats not just only to flv.
Let’s talk about these options one by one in brief:
ffmpeg / ffmpeg.exe (windows) : the executable
-i filename orginal: -i indicates the the next expression’ll be the filename original
-ab bitrate: set audio bitrate (in kbit/s)
-ar rate: set audio sampling rate (in Hz)
filename destination: put the file destination
Now you know how to extract audios from videos.
Comments
Leave a Reply