How to use mplayer to rip the sound from a video and create a wav file that you can encode with lame.

This is the command I just used to rip the audio from a movie and save it as a wav file. Then the lame command is used to encode the wav into an mp3 file.

john@adeptus-mechanicus ~/Music $ mplayer -ao pcm:fast:file=out.wav -vo null -vc null video.mp4 && lame -h -b 320 out.wav

This allows you to download a video from Youtube that has music you like and convert it into an mp3 file very easily. And you could use the oggenc command to encode the wav file into the ogg vorbis codec.

john@adeptus-mechanicus ~/Music $ oggenc out.wav --managed -b 128 -M 160 moviesound.ogg

Here I am using the lame command to encode the wav file into the mp3 format.

john@adeptus-mechanicus ~/Music $ lame -h -b 320 out.wav
LAME 3.99.5 64bits (http://lame.sf.net)
Using polyphase lowpass filter, transition band: 20323 Hz - 20903 Hz
Encoding out.wav to out.mp3
Encoding as 48 kHz j-stereo MPEG-1 Layer III (4.8x) 320 kbps qval=2
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA 
244544/244544(100%)|    6:38/    6:38|    6:40/    6:40|   14.716x|    0:00 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  320.0        4.9  95.1        97.8   1.2   1.0
Writing LAME Tag...done
ReplayGain: -4.7dB
About

I am a computer enthusiast that has always been interested in maintaining and upgrading computer hardware. I was born on a farm and lived there for 13 years before moving into town. I was always interested in technology and my father always gave me good encouragement for developing my knowledge and interest in tinkering with computers. He was using a computer on the farm but that was in the very late 80`s and late 90`s. Seeing what a computer could do always fascinated me and then I knew that is what I wanted to do. The first time I used Linux was Red Hat 6.2 installed off a single CDROM and I was amazed that you did not need to install any more drivers on my old Intel Celeron machine to be able to enjoy a nice 24BPP desktop and use the GIMP to edit photos and enjoy playing the old Linux games like Xbill. Then a while later I tried Mandrake Linux 9.2 and I was hooked. It came with so much software and was very easy to use as well. Then Mandrake Linux 10 and on through FreeBSD, Debian 3.0, Debian 3.1 Suse Linux 9.2, Suse 10 and onto the Ubuntu distributions although I am using Fedora Core 15 and the Gnome 3 desktop at the moment.

Tagged with: , , , , , ,
Posted in bejiitaswrath

Leave a Reply

Plugin from the creators of Brindes :: More at Plulz Wordpress Plugins