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

2 Comments to Merging audio files with VLC

  • I tried doing this but it just had the first track playing foe the duration of the playlist (around 3 hours). Could it have problems with files with spaces or is something else going wrong?

  • Hammad says:

    Can you plz explain this in an easy way so that a non programmer can understand. Because i can,t understand what you did there

  • Leave a Reply