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,
(*) 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.
- Install VLC
- Put all your mp3 files into a single folder.
- Open a terminal, cd to that folder by using ‘cd folderpathandname’.
- In that folder, type ‘copy con abc.bat’, press ‘Ctrl+z’, then press ‘Enter’. Don’t close the terminal!
- Open ‘File Explorer’ to that folder, right click ‘abc.bat’, click ‘Edit’.
- 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.
- Create a new folder in your mp3 folder, name it ‘converted’.
- Go back to your terminal, type ‘abc’ and ‘Enter’.
- 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.
Reference:
https://wiki.videolan.org/How_to_Batch_Encode/
https://wiki.videolan.org/Codec/
Be First to Comment