VLC HowTo/Extract audio

From VideoLAN Wiki
Revision as of 00:48, 27 October 2011 by Jim DeLaHunt (talk | contribs) (→‎Planning: A bit of rewording and wikilinking)
Jump to navigation Jump to search

VLC can extract audio from any of the many input sources it supports, and write this audio to an audio-file in a variety of formats. In other words, it discards any video content from the input source, and it converts the audio content to the desired format.

You can invoke audio extraction from the VLC graphical user interface, or from the VLC command line. When using the VLC command line, you can select options that let you monitor the audio (and/or video, actually) as the extraction happens. Or, you can select options to hide VLC's visual interfaces, leaving it to extract and convert the audio data as fast as the computer allows -- which might take a fraction of the time. You can also script the VLC command line invocations, letting you do many extraction tasks without manual effort.


Identify the source from which you want to extract the audio signal. You will open this source from VLC using the same GUI operations or command-line options as you would for any other VLC usage.

Is the source an audio-only file? If so, then this operation is a simple transcoding of audio content from one format to another. Be aware that, while VLC has certain facility for this task, other tools may be even more powerful, faster, or more reliable for the task. For instance, the FLAC tools include a command-line utility which can convert WAV files into FLAC files with excellent speed and reliability. Where VLC really shines is for sources which combine video and audio content.

Is the source a DVD, or other container with internal structure, such as multiple "Titles", and multiple "Chapters" in each Title? If so, then you need to identify which Title and Chapters include the audio content you want, and which are irrelevant. For instance, a DVD may have a menu in Title 1, an advertisement in Title 2, the main content in Title 3, and a trailer in Title 3. The main content in Title 3 may be divided into dozens of chapters, like the tracks in a CD. In a case like this, you probably want only the audio content from Title 3, not from the other Titles. You may want to extract a single audio file with the content of all of Title 3, or you may want a separate audio output file for each Chapter.

The VLC GUI provides a somewhat clumsy but workable way to explore the structure of a DVD or corresponding video file. Run the VLC app.

Using the VLC graphical user interface (GUI)

See How to Rip DVD Audio to MP3 Using VLC Media Player, Edited by AudioDude and 2 others, WikiHow.com

Note that VLC's GUI lets you specify the Title and Chapter from which it will start, but VLC will continue extracting until the end of the Title. It doesn't let you extract a single Chapter at a time. To do that, you will need to use the VLC command line.

Using the VLC command line

If you want the extracted audio in the same format as it is stored in the input, then VLC can provide it to you with no loss of quality, because there is no re-encoding of the content.

The way to do this for AC3 format audio from a DVD video is (on Linux):

vlc --no-sout-video dvdsimple:///dev/scd0@1:1 :sout='#std{access=file,mux=raw,dst=./file.ac3}'

Note: :sout means that the option sout applies only to the preceding stream, not to the whole command line. See VLC command-line help.

See Also