Posted: . At: 10:14 AM. This was 6 years ago. Post ID: 12160
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.


Rip the audio from a video file to a wav with mplayer on Linux.


This post will show how easy it is to rip the audio from a video file and save it to a wav file. This works very well and is a good way to make an OGG Vorbis file from a Youtube video the user has downloaded.

Use this long command to rip the audio from your video file.

jason@Yog-Sothoth » ~ » $ mplayer -ao pcm:fast:file=out.wav -nocorrect-pts -vo null -vc null baraka.mkv

This writes the data to the out.wav file. But this was 2.1 Gigabytes. So we need to encode and compress this to make it smaller.

This is how I did this. Just encoding it to an OGG file. This saves disk space and still gives good quality.

jason@Yog-Sothoth » ~ » $ oggenc out.wav -o baraka_ost.ogg

This file is therefore much smaller.

-rw-rw-r--  1 jason jason  72M Jun 11 10:01  out.ogg

This is how easy it is to rip the audio from a video file and save it in very good quality from a Youtube video, or a movie.

Best to use 1080p Youtube videos, they are better quality.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.