All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Oct 30, 2013 5:37 pm 

Joined: Fri Oct 21, 2011 10:20 pm
Posts: 137
I use this windows batch file to extract the soundtrack from any source (like AVI, WMV, MP4, MP3, WAV etc.), process it via Stereo-Tool and create a MP3 as result. In my case I create podcast MP3s for my portable MP3-player with max loudness/compression, so I can use the lowest volume setting on my MP3 player with a constant volume.

The batch file takes as parameters the source files. You can simply drag'n'drop the files onto the batch file. The result files are stored in the same folder as the source files, named "<source-name>.result.mp3".

Needs:
- FFMPEG ( http://ffmpeg.zeranoe.com/builds/ )
- Stereo-Tool command line ( http://www.stereotool.com/download/stereo_tool_cmd.exe )
- A Stereo-Tool settings file.

Place the three files into the folder where the batch file is stored.

Copy this code into a new file "stereotool_process.cmd" and place the CMD-File into a folder of your choice:
Code:
set reg_key=
set path=%~dp0;%path

rem Change "my_setting" to your preferred Stereo-Tool settings file:
set configfile=%~dp0\my_setting.sts

rem Change "128" to any bitrate you like for your MP3:
set bitrate=128

rem Remove "rem" to enable registration key. Replace "keyvalue" with your key:
rem set reg_key=-k "<keyvalue>"

:start
  set src_file="%~dpnx1"
  set temp_wav="%~dpn1.wav%"
  set temp_result_wav="%~dpn1.temp.wav%"
  set final_result_mp3="%~dpn1.result.mp3%"

  title "%~n1"
  
  if not %src_file%==%temp_wav% ffmpeg -y -i %src_file% -vn -ac 1 -ar 44100 %temp_wav%
  
  stereo_tool_cmd %temp_wav% %temp_result_wav% -q -s %configfile% %reg_key%
  
  if not %src_file%==%temp_wav% del %temp_wav%

  ffmpeg -y -i %temp_result_wav% -acodec libmp3lame -ab %bitrate%k -ac 2 -ar 44100 %final_result_mp3%
  
  del %temp_result_wav%
  
  shift
  
  if not "%~n1" == "" goto :start
Tipp: If you want to use this batch file as context option from the windows explorer, create a link to it in the Send-To folder in your current profile of the windows system. To go there, copy this into the address field of the windows explorer:
Code:
%appdata%\Microsoft\Windows\SendTo
After that you can select files in the explorer, open the context menü and select the batch file in the "Send-To" option of the menu.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+02:00


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited