VLC HowTo/Extract audio from a file: Difference between revisions
Jump to navigation
Jump to search
Jim DeLaHunt (talk | contribs) Cross-link to better Extract Audio article, and add to Category:How to. |
more examples, less spaces |
||
| Line 1: | Line 1: | ||
The example under this show how to extract audio from a working video file like file.ts in command line. | The following example under this show how to extract audio from a working video file like file.ts in command line. | ||
vlc file.ts --no-sout-video --sout '#std{mux=raw,dst=file.mp3}' | |||
The following example will prevent the GUI from appearing and converts the audio to .wav: | |||
vlc -I dummy --sout "#transcode{acodec=s16l,channels=2}:std{access=file,mux=wav,dst=OUTFILE.wav}" INFILE.mp4 vlc://quit | |||
With this, you can build scripts to mass-convert multiple files, for example in Bash (Linux, Mac OS X) to convert all files ending in lowercase "mp4" you would use: | |||
for i in *mp4; do vlc -I dummy --sout "#transcode{acodec=s16l,channels=2}:std{access=file,mux=wav,dst=$i.wav}" $i vlc://quit; done | |||
==See also== | ==See also== | ||
* article ''[[Extract audio]]'' | * article ''[[Extract audio]]'' | ||
[[Category:How To]] | [[Category:How To]] | ||
Revision as of 04:08, 20 December 2013
The following example under this show how to extract audio from a working video file like file.ts in command line.
vlc file.ts --no-sout-video --sout '#std{mux=raw,dst=file.mp3}'
The following example will prevent the GUI from appearing and converts the audio to .wav:
vlc -I dummy --sout "#transcode{acodec=s16l,channels=2}:std{access=file,mux=wav,dst=OUTFILE.wav}" INFILE.mp4 vlc://quit
With this, you can build scripts to mass-convert multiple files, for example in Bash (Linux, Mac OS X) to convert all files ending in lowercase "mp4" you would use:
for i in *mp4; do vlc -I dummy --sout "#transcode{acodec=s16l,channels=2}:std{access=file,mux=wav,dst=$i.wav}" $i vlc://quit; done
See also
- article Extract audio