[Windows] Remux mkv to m2ts
Posted: August 23rd, 2010, 3:51 pm
I made a script that incorporates the functions of ps3m2ts and TVersity Media Server to have a completely automatic and seamless way of remuxing .mkv's and then updating the TVersity media library. This is meant to take the place (at least for me) of mkv2vob which can be hassle running every time a .mkv needs remuxing.
The script can be found at the end of this post and is also attached (if you download the attached copy you will need to rename the file extension to .bat from .txt). Just in case I added a pastebin and mediafire link which can be downloaded/viewed from:
http://www.mediafire.com/?bqc1dvxh9dcrc3n
http://pastebin.com/YF0AAJiF
For this script to work you will need the program ps3m2ts, links below (first is the authors website):
http://www.m0sand.com/ps3m2ts/ps3m2ts-binary-v0.1.zip
http://www.mediafire.com/?ih2iays6h9dpggg
Also if you want the TVersity media library to be refreshed when the .mkv is done remuxing you will also need that also. Use the Google if needed.
Once ps3m2ts has been extracted to a folder copy the script to your sabnzbd post processing scripts folder. Mine is: C:\Program Files\SABnzbd\scripts\
Now edit the batch file with notepad and change the SOURCEPATH to reflect your .mkv folder. Next change the PS3M2TSPATH to reflect the folder location of the program. Then finally and optionally change the TVERSITYPATH to reflect the folder of the program.
If you do not want the TVersity functionality simply remove these lines from the batch file:
set TVERSITYPATH=C:\Program Files\TVersity\Media Server\
cd %TVERSITYPATH%
MShare.exe -R
As far as I know this works perfectly but really won't be able to tell until tomorrow which is when a plethora of TV is on. Please post your thoughts and test it out. Hopefully it doesn't have any problems.
The script can be found at the end of this post and is also attached (if you download the attached copy you will need to rename the file extension to .bat from .txt). Just in case I added a pastebin and mediafire link which can be downloaded/viewed from:
http://www.mediafire.com/?bqc1dvxh9dcrc3n
http://pastebin.com/YF0AAJiF
For this script to work you will need the program ps3m2ts, links below (first is the authors website):
http://www.m0sand.com/ps3m2ts/ps3m2ts-binary-v0.1.zip
http://www.mediafire.com/?ih2iays6h9dpggg
Also if you want the TVersity media library to be refreshed when the .mkv is done remuxing you will also need that also. Use the Google if needed.
Once ps3m2ts has been extracted to a folder copy the script to your sabnzbd post processing scripts folder. Mine is: C:\Program Files\SABnzbd\scripts\
Now edit the batch file with notepad and change the SOURCEPATH to reflect your .mkv folder. Next change the PS3M2TSPATH to reflect the folder location of the program. Then finally and optionally change the TVERSITYPATH to reflect the folder of the program.
If you do not want the TVersity functionality simply remove these lines from the batch file:
set TVERSITYPATH=C:\Program Files\TVersity\Media Server\
cd %TVERSITYPATH%
MShare.exe -R
As far as I know this works perfectly but really won't be able to tell until tomorrow which is when a plethora of TV is on. Please post your thoughts and test it out. Hopefully it doesn't have any problems.
Code: Select all
@echo on
SETLOCAL ENABLEDELAYEDEXPANSION
set SOURCEPATH=C:\Documents and Settings\HOME\Desktop\TV\
set TVERSITYPATH=C:\Program Files\TVersity\Media Server\
set PS3M2TSPATH=C:\Documents and Settings\HOME\Desktop\Tom\ps3m2ts\
cd %SOURCEPATH%
IF EXIST *.mkv (
GOTO MKVAVAIL
) ELSE (
GOTO MKVNOTAVAIL
)
:MKVAVAIL
cd %PS3M2TSPATH%
FOR %%A in ("%SOURCEPATH%*.mkv") DO (
ps3m2ts.exe "%%A"
)
cd %SOURCEPATH%
IF EXIST *.m2ts del *.mkv
rename "*.m2ts" "*.m2t"
:MKVNOTAVAIL
cd %TVERSITYPATH%
MShare.exe -R
exit