Stereo Tool
https://forums.stereotool.com/

Process sound track from any source to MP3
https://forums.stereotool.com/viewtopic.php?f=8&t=5023
Page 1 of 1

Author:  Maximizer [ Wed Oct 30, 2013 5:37 pm ]
Post subject:  Process sound track from any source to MP3

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.

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/