PMS Script - Need Help

Come up with a useful post-processing script? Share it here!
Post Reply
steven2019
Newbie
Newbie
Posts: 1
Joined: April 24th, 2013, 10:46 am

PMS Script - Need Help

Post by steven2019 »

Hey guys,

I need some help with my setup. I have Sickbeard and SABnzbd and a sony bluray that i stream to using PS3 Media Server.
I know the bluray only really likes m2ts files so i use ps3m2ts (fantastic program) to automate the conversion. I also know that tsmuxer doesn't respond well to header compression so i use mkvmerge to remove that but i know the script i use that is cobbled together from the work of others could be better and i still get an error at the end.

Here's where i need your help -
1. I only want to run mkvmerge if the file is compressed rather than on every one!
2. I want to make sure only english audio streams are used (I have an episode of Dexter that has both but French is the default (and i dont speak French))
3. Sickbeard doesn't put the end result into the TV folder. This is the result from the log file

Code: Select all

Opening URL: http://localhost:8081/home/postprocess/processEpisode?quiet=1&dir=D%3A%5CTV%5CHomeland.S02E02.Beirut.Is.Back.720p.WEB-DL.DD5.1.H.264-DON%5CHomeland.S02E02.Beirut.Is.Back.720p.WEB-DL.DD5.1.H.264-DON_fix.mkv

Code: Select all

CD /d %1\

REM Whipped up by TEKNO to fix MKV header compression issues on Standalone media players!
REM fixMKV version 1.2
REM Requires MKVToolnix v4.1.1 INSTALLED (it auto detects where)
@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
"mkvmerge.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"
move /y "%~dpn1_fix.mkv" "%~dpnx1"
CD /d C:\Users\media\Tools\SickBeard
ps3m2ts.exe "%~dpnx1"
C:\Users\media\Tools\SickBeard\autoProcessTV\sabToSickBeard.exe %1
if not errorlevel 0 (
ECHO Failed on %~nx1 remux! >> logging.txt
goto :eof)
if exist "%~dpn1_fix.mkv" (
del "%~dpnx1"
del "%~dpn1_fix.mkv")
goto :eof

exit
Cheers

Steve
Post Reply