Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 10 wav-Files. I want to convert all of them into mp3-Files. I managed to to this for one single file (as described in How to convert media using VLC?), but I don't want to do this for every single file. Is there a way to convert all the 10 files at a single blow? I'm using windows 7.

share|improve this question
2  
possible duplicate of Batch convert .wav to mp3 and ogg? –  nixda Jul 8 '13 at 16:16
    
Thank you for the batch hint! –  Ergodicity Jul 9 '13 at 11:26
add comment

1 Answer 1

up vote 2 down vote accepted

I followed nixda's suggestion and used a batch script. I figured out how to programm a batch for windows 7. This is my solution:

@echo off
for /f "delims=|" %%f in ('dir /b D:\"folder xyz"\VLC_batch\*.wav') do (
echo %%f
CALL "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "%%f" --sout=#transcode{acodec=mp3,ab=128,vcodec=dummy}:standard{access=file,mux=raw,dst=converted/"%%f"} vlc://quit
move "%%f" trash/"%%f"
)

cd converted
ren *.wav *.mp3
cd ..

How the programm works:

  • All the files with the .wav extension in the specified folder "D:...\VLC_batch" are converted to mp3
  • The mp3 files are saved in the folder "converted" (which must already exist)
  • The wav files are pushed to the folder "trash" (which must already exist)
  • "ab=128" sets the bit rate. To convert with e.g. bit rate 256, replace it with "ab=256".

There ist still one bug: If the name of the wav-file contains a dot or comma, the name is truncated (and no extension is appended!). The file gets converted despite this. If anyone knows a solution feel free to edit my code. Tested with Version 1.1.11. Newer versions may not work!

share|improve this answer
    
+1 Good & new solution –  nixda Jul 16 '13 at 7:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.