@Cybore - try running this in the same directory as your MKV file.
Code:
@echo off
set PATH_MKVMERGE=E:\PortableApps\VideoProcessing\mkvtoolnix
set PATH_QAAC=E:\PortableApps\VideoProcessing\qaac
set PATH_FFMPEG=E:\PortableApps\VideoProcessing\ffmpeg
set PATH=%PATH%;%PATH_MKVMERGE%;%PATH_QAAC%;%PATH_FFMPEG%
@echo on
cd /d %~dp0
For %%a IN ("*.mkv") Do (
echo ---------------------- BATCH STARTING %%~na%%~xa
ffmpeg.exe -report -loglevel verbose -i "%%~na%%~xa" -map 0:a:0 -f wav -acodec pcm_f32le -ac 2 -af pan=stereo:FL=0.25*FL+FC+0.6*LFE:FR=0.25*FR+FC+0.6*LFE - | qaac.exe --tvbr 127 --quality 2 --rate keep --ignorelength --no-delay - -o "%%~na-ffmpeg.m4a" 1>>qaac.log 2>&1
If exist "%%~na.srt" (
mkvmerge.exe --split 4000M -o "%%~na-2chnightmode%%~xa" --no-chapters --no-audio "%%~na%%~xa" "%%~na-ffmpeg.m4a" "%%~na.srt" 1>>"mkvmerge.log" 2>&1
) Else (
mkvmerge.exe --split 4000M -o "%%~na-2chnightmode%%~xa" --no-chapters --no-audio "%%~na%%~xa" "%%~na-ffmpeg.m4a" 1>>"mkvmerge.log" 2>&1
)
)
This will convert all MKV files in the current directory. If you would like it to similarly convert other filetypes, such as .MP4 - just replace the line:
Code:
For %%a IN ("*.mkv") Do (
to:
Code:
For %%a IN ("*.mp4") Do (