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

Posted: January 27, 2013. At: 11:57 PM. This was 5 years ago. Post ID: 5255

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.

[email protected] ~/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.

[email protected] ~/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.

[email protected] ~/Music $ lame -h -b 320 out.wav
LAME 3.99.5 64bits (
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

No comments have been made. Use this form to start the conversation :)

Leave a Reply