I am trying fro a while now to get this script to run correctly after completion of a download.
I created a file called MKVFIX.CMD and put the following text in it:
@ECHO OFF
cd "%~dp0"
SET KEY="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\mmg.exe"
FOR /F "tokens=2*" %%A IN ('REG QUERY %KEY%') DO SET MKVTOOLPATH=%%B
ECHO MKVToolnix found at %MKVTOOLPATH% > logging.txt
FOR /F "delims=*" %%A IN ('dir /b /s *.MKV') do CALL :MKVFIXMUX "%%A" "%MKVTOOLPATH%"
START "" logging.txt
GOTO :eof
:MKVFIXMUX
"%~dp2mkvmerge.exe" -o "%~dpn1_fix.MKV" --engage keep_bitstream_ar_info -A -S --compression -1:none "%~dpnx1" -D -S --compression -1:none "%~dpnx1" -A -D --compression -1:none "%~dpnx1"
if not errorlevel 0 (
ECHO Failed on %~nx1 remux! >> logging.txt
goto :eof)
if exist "%~dpn1_fix.MKV" (
del "%~dpnx1"
rename "%~dpn1_fix.MKV" "%~nx1"
)
ECHO Processing of %~nx1 successful! >> logging.txt
goto :eof
I pointed sabnzbd to the directory where the script is located.
I selected the fixmkv.cmd as the script to run
After a download finishes, sabnzbd checks, repairs, unpacks and renames it as stated in the TV-sorting settings tab; using the key %sn/Season %0s/%sn - S%0sE%0e.%ext.
This all works fine, e.g. ending up with f:\SabNZB-Download\Series Name\Season 01\Series Name - S01E05.mkv
At this point, sabnzbd calls upon the fixmkv.cmd file, and nothing happens.
If i click the show script result option, this is what i get:
Leverage.S03E11.720p.HDTV.x264-CTU
D:\Program Files (x86)\SABnzbd>REM Whipped up by TEKNO to fix MKV header compression issues on Standalone media players!
D:\Program Files (x86)\SABnzbd>REM fixMKV version 1.2
D:\Program Files (x86)\SABnzbd>REM Requires MKVToolnix v4.1.1 INSTALLED (it auto detects where)
Het bestand is niet gevonden
Can anyone please help out getting this to run properly
