How to batch convert mp3 using VLC command line

This command line is to convert mp3 to mp3, for other formats, you need to dig out yourself. This exmaple is for Windows only.

Command line example:

for %%a in (*.mp3) do “C:\Program Files\VideoLAN\VLC\vlc.exe” -I dummy -vvv %%a –sout=#transcode{acodec=mp3,ab=48,channels=1,samplerate=32000}:std{access=file,mux=dummy,dst=converted\%%a} vlc://quit

(*) The hungry WordPress ate a dash ‘-‘ just before ‘sout’, the command there should have two dashes close to each other before ‘sout’, not just one. It reads as ‘ percent sign, percent sign, letter a, a space, dash, dash, letter s, letter o, …’


How to use the command above.

  1. Install VLC
  2. Put all your mp3 files into a single folder.
  3. Open a terminal, cd to that folder by using ‘cd folderpathandname’.
  4. In that folder, type ‘copy con abc.bat’, press ‘Ctrl+z’, then press ‘Enter’. Don’t close the terminal!
  5. Open ‘File Explorer’ to that folder, right click ‘abc.bat’, click ‘Edit’.
  6. Paste the above command into ‘abc.bat’, and change path of your vlc.exe, bitrate, samplerate, channels and etc. Don’t forget to save it and close.
  7. Create a new folder in your mp3 folder, name it ‘converted’.
  8. Go back to your terminal, type ‘abc’ and ‘Enter’.
  9. Wait.

-vvv: verbose mode

acodec: output audio codec

ab: audio bit rate

channels: 1-mono, 2-stereo

samplerate: you already know it

dst: the destination for your converted files, make sure you create the destination folder before executing ‘abc’.


If you wish you change the output format, you may need to change the ‘acodec’ and ‘mux’, visit the reference below for more details.



Recent Posts

Recent Comments




    Written by:

    Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *