How to Extract Audio From a Video File Using VLC

cone_altglassI was going over some recording I made with my phone, but when I wanted to edit the audio in audacity, I realized that I had recorded it using a video recording application, and the files were in webm format. I had used ffmpeg in the past to extract audio from video files, but the audio quality was not the best, and I needed to preserved audio quality as much as possible. I started doing a bit of search online, and I came across this method using the amazing VLC media player. There’s a big wikipidia article on VLC audio extraction, but I’m going to simplify the parts that I found useful. In my case I wanted to extract audio from a bunch of video files, so I also used bash scripting in Linux for this. wiki for VLC on Windows, and wiki for bash in Linux. Here are some bash tutorial in case you need to get acquainted with the bash in Linux.
Extracting audion from a single file using VLC gui.
1 select “Media” –> “Convert/Save”
2 Click “Add…” and select the file you want
3 Click “Convert / Save” (on the bottom)
4 Provide a “Destination file:”
5 Select the “Profile” (i.e. “Audio – MP3”, “Audio – Vorbis (OGG)”, etc.)
6 Click “Start”

Extracting audio from a single video file using bash

vlc -I dummy --sout "#transcode{acodec=s16l,channels=2}:std{access=file,mux=wav,dst=OUTPUT.wav}" INPUTFILE.webm vlc://quit

note: OUTPUT.wav and INPUT.webm are the input and output files

Extracting audion from multiple video files using for loop in bash (same as above but with a for loop)

for i in *mp4; 
vlc -I dummy --sout "#transcode{acodec=s16l,channels=2}:std{access=file,mux=wav,dst=$i.wav}" $i vlc://quit;
Share This!

One thought on “How to Extract Audio From a Video File Using VLC

  1. cheesdown

    You may try use Avdshare Audio Converter to extract MP3, WAV, AAC, FLAC, WMA, etc from MP4, AVI, FLV, WMV, MKV, ASF, etc for playing audio on iPhone, iPod, MP3 player, etc on Mac/PC.

Leave a Reply

Your email address will not be published.