2005-05-25, 09:42 AM
I tried using MPEG-VCR (because VideoRedo failed me) so I needed a clip list for MPEG-VCR.
I wrote a small script to convert the .txt output file from Comskip into a .wme file used as the cliplist in MPEG-VCR. This cliplist can be read in MPEG-VCR and you can quickly review the splitting done by Comskip, delete the commercials and save the final combined file.
Below you find the PostProcessing.bat file I use to do the conversion.
Hope someone finds it usefull.
----------------------------------------------------------------------
@echo off
Rem PostProcessing.bat
rem Initialize the variables
set count=1
set start=0
rem Identify the commercials
comskip %1
rem Create the cliplist
echo # >%~dpn1.wme
rem Process all the lines from the Comskip output file
for /F "tokens=1,2,3*" %%i in (%~dpn1.txt) do call :work %%~dpn1 %%i %%j %%k >>%~dpn1.wme
rem Done.
goto :eof
:work
rem Skip useless lines
if "%2"=="FILE" goto :eof
if "%2"=="-------------------" goto :eof
rem Output the clip information for the show part
set /A length=%2-%start%
echo CLIPLIST: #%count% clip
echo CLIP: %1.mpg
echo 6 %start% %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1
rem Output the clip information for the commercial part
set /A length=%3-%2
echo CLIPLIST: #%count% clip
echo CLIP: %1.mpg
echo 6 %2 %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1
rem Remember start of next clip
set start=%3
goto :eof
:eof
I wrote a small script to convert the .txt output file from Comskip into a .wme file used as the cliplist in MPEG-VCR. This cliplist can be read in MPEG-VCR and you can quickly review the splitting done by Comskip, delete the commercials and save the final combined file.
Below you find the PostProcessing.bat file I use to do the conversion.
Hope someone finds it usefull.
----------------------------------------------------------------------
@echo off
Rem PostProcessing.bat
rem Initialize the variables
set count=1
set start=0
rem Identify the commercials
comskip %1
rem Create the cliplist
echo # >%~dpn1.wme
rem Process all the lines from the Comskip output file
for /F "tokens=1,2,3*" %%i in (%~dpn1.txt) do call :work %%~dpn1 %%i %%j %%k >>%~dpn1.wme
rem Done.
goto :eof
:work
rem Skip useless lines
if "%2"=="FILE" goto :eof
if "%2"=="-------------------" goto :eof
rem Output the clip information for the show part
set /A length=%2-%start%
echo CLIPLIST: #%count% clip
echo CLIP: %1.mpg
echo 6 %start% %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1
rem Output the clip information for the commercial part
set /A length=%3-%2
echo CLIPLIST: #%count% clip
echo CLIP: %1.mpg
echo 6 %2 %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1
rem Remember start of next clip
set start=%3
goto :eof
:eof
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
Support Comskip, visit the forum and donate at http://www.comskip.org/