Rip the audio from a video file the easy way with mplayer and convert it to an OGG file.

Posted: January 27, 2017. At: 10:45 AM. This was 11 months ago. Post ID: 10224
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

This post will show how to rip the audio from a video file to a wav and then convert that to an ogg file. This is very simple and easy to do.

This long command will rip the audio from the file and save it in the out.wav file.

localhost% mplayer -ao pcm:fast:file=out.wav -vo null -vc null Surface\ of\ the\ Sun\ -\ Sunshine\ -\ John\ Murphy,\ 1\ hour.mp4

Now we have a 1 hour long wav file.

localhost% ls -lha out.wav
-rw-r--r--. 1 jason jason 1.2G Jan 27 10:25 out.wav

We need to convert this to an OGG Vorbis file. I installed the vorbis-tools package on Fedora 25.

[[email protected] Videos]# dnf install vorbis-tools

Then the oggenc tool may be used to convert to OGG format.

localhost% oggenc out.wav -o sunshine.ogg
Opening with wav module: WAV file reader
Encoding "out.wav" to 
at quality 3.00
	[100.0%] [ 0m00s remaining] \ 

Done encoding file "sunshine.ogg"

	File length:  58m 50.0s
	Elapsed time: 0m 45.3s
	Rate:         77.8788
	Average bitrate: 100.9 kb/s

This is how easy it is to rip and convert the sound from a video to an audio file.

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

Leave a Reply