Trabla: ffmpeg & cmd - convert WAV to MP3 in Win7 using FFmpeg
Solving:
1. Install FFmpeg for Windows
https://visvis.googlecode.com/files/ffmpeg-win32-setup.exe
2. Create Folder Structure & files
C:\WAV_to_MP3
C:\WAV_to_MP3\WAV
C:\WAV_to_MP3\MP3
C:\WAV_to_MP3\WAV_to_MP3.bat
3. Place WAV files into folder C:\WAV_to_MP3\WAV
4. Edit file C:\WAV_to_MP3\WAV_to_MP3.bat - type following command line script + Save
SET PATH=%PATH%;C:\Program Files (x86)\ffmpeg
for %%f in (C:\WAV_to_MP3\WAV\*.wav) do ffmpeg -i %%f -f mp3 C:\WAV_to_MP3\MP3\%%~nf.mp3
where
C:\Program Files (x86)\ffmpeg - location folder of ffmpeg.exe file
for %%f in (C:\WAV_to_MP3\WAV\*.wav) do - means foreach file in folder C:\WAV_to_MP3\WAV\ with any name but extension .wav execute command after word "do"
ffmpeg -i %%f -f mp3 C:\WAV_to_MP3\MP3\%%~nf.mp3 - ffmpeg conversion command
%%f - input file name ( full path )
%%~nf - only file name without path and extension
5. Run C:\WAV_to_MP3\WAV_to_MP3.bat in cmd.exe
No comments:
Post a Comment