Merging audio files with VLC

To merge the (audio) contents of a play list into a single mp3 file you can use VLC as follows:

vlc <INFILES> --sout "#transcode{acodec=mp3,ab=<BITRATE>,channels=2}:std{access=file,mux=raw,dst=<OUTFILE>}" --sout-keep

For example if we have a playlist called playlist.m3u and we want to create a 192kbit mp3 called merged.mp3 we do so as follows:

vlc playlist.m3u --sout "#transcode{acodec=mp3,ab=192,channels=2}:std{access=file,mux=raw,dst=merged.mp3}" --sout-keep

This method re-encodes the audio. This method is slow, and lossy (mostly noticeable when using low bitrates), but the resulting mp3 file is properly playable in most media players. There are ways to merge mp3s without re-encoding, but the duration of the files can often not be properly detected by most players.

Based on: Decentralized Streaming

Monday, April 16th, 2012 Uncategorized

Leave a Reply