2007-11-12, 01:14 AM
I am using a batch file to remove the commercials from a recording. The batch file is as follows:
CD "C:\Program Files\devnz\gbpvr"
rem demux the mpeg file
bbdmux "%~dpn1.mpg" 0xe0 "%~dpn1.m2v"
bbdmux "%~dpn1.mpg" 0xc0 "%~dpn1.mp2"
Rem Remove the commercials
cuttermaran.exe "%~dpn1.cpf"
del "%~dpn1.m2v"
del "%~dpn1.mp2"
Rem Mulxiplex again to a regular mpeg file
mplex1 "%~dpn1_clean.m2v" "%~dpn1_clean.mp2" "%~dpn1_clean.mpg"
del "%~dpn1_clean.m2v"
del "%~dpn1_clean.mp2"
del "%~dpn1*.info"
Rem RENAME the old .mpg file and rename the new one to the old name
rem if EXIST "%~dpn1_clean.mpg" move "%~dpn1.mpg" "%~dpn1_original.mpg"
rem if EXIST "%~dpn1_clean.mpg" move "%~dpn1_clean.mpg" "%~dpn1.mpg"
It works fine until I get to the mplex part. The _clean.m2v and _clean.mp2 files have been created, but not mpg file is created. It does not appear that mplex1 is doing anything. Can anyone help me solve this problem? Thanks.
CD "C:\Program Files\devnz\gbpvr"
rem demux the mpeg file
bbdmux "%~dpn1.mpg" 0xe0 "%~dpn1.m2v"
bbdmux "%~dpn1.mpg" 0xc0 "%~dpn1.mp2"
Rem Remove the commercials
cuttermaran.exe "%~dpn1.cpf"
del "%~dpn1.m2v"
del "%~dpn1.mp2"
Rem Mulxiplex again to a regular mpeg file
mplex1 "%~dpn1_clean.m2v" "%~dpn1_clean.mp2" "%~dpn1_clean.mpg"
del "%~dpn1_clean.m2v"
del "%~dpn1_clean.mp2"
del "%~dpn1*.info"
Rem RENAME the old .mpg file and rename the new one to the old name
rem if EXIST "%~dpn1_clean.mpg" move "%~dpn1.mpg" "%~dpn1_original.mpg"
rem if EXIST "%~dpn1_clean.mpg" move "%~dpn1_clean.mpg" "%~dpn1.mpg"
It works fine until I get to the mplex part. The _clean.m2v and _clean.mp2 files have been created, but not mpg file is created. It does not appear that mplex1 is doing anything. Can anyone help me solve this problem? Thanks.