NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 70 71 72 73 74 … 93 Next »
Using MPEG-VCR with Comskip

 
  • 0 Vote(s) - 0 Average
Using MPEG-VCR with Comskip
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#1
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
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#2
2005-05-26, 01:55 AM (This post was last modified: 2005-05-26, 02:01 AM by erik.)
Tipstir,

Thanks for the program, it all seems to work!
Could you explain how it is reducing the usage of resources?
I saw it run's comskip under the hood within a hidden cmd process, does that reduce the amount of used resources? Comskip seems to use the same amount of memory? The processor loading may be somewhat lower.
One small problem with you program might be that I always record on the same bitrate, that may not be true for eveyone.
The line with "6 start length 1 192 0 1 224 0 0 0 0 0 0" tells mpeg-vcr about the bitrate of the video and the audio and it should match the real bitrate of the clip. You could add a parameter to enter the string containing "1 192 0 1 224 0 0 0 0 0 0" so people who record on other bitrate can enter the correct settings.

Does showanalyser run much faster than comskip? I reach about 300fps with comskip 0.64 on a 1.8GHz system when switching of logo recognition (which does not add any improvement anyway) Thats more then 10 times faster then realtime!
Of cource on my GBPVR system (see description below) it runs much slower Sad
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
Jere_Jones
Offline

Member

Posts: 118
Threads: 4
Joined: Oct 2004
#3
2005-05-26, 02:12 AM
erik Wrote:Does showanalyser run much faster than comskip? I reach about 300fps with comskip 0.64 on a 1.8GHz system when switching of logo recognition (which does not add any improvement anyway) Thats more then 10 times faster then realtime!
Of cource on my GBPVR system (see description below) it runs much slower Sad
On my 2.4P4, I get around 220fps from comskip with logo detection on. On the same machine with the same show, ShowAnalyzer runs at 700fps.

I would like to add that on my HTPC, a 3.0P4HT, SA normally runs at 1300fps.

Jere
DEATH TO ALL COMMERCIALS!!
http://www.dragonglobal.org/
Latest ShowAnalyzer Beta version: 0.7.5
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#4
2005-05-26, 05:17 AM
My system is a VIA C3 running on 800MHz with 256MByte memory
It is neither AMD or Intel but a VIA CPU. It delivers aprox 400MHz Celeron performance, CPU loading during GBPVR recording is less then 5% because it is very good at IO. I only have one PVR150MCE so no need to run comskip faster.
No playback on that system because its our central server (file/mail/UPnP). My 100 MBit Ethernet backbone can deliver 7 MByte/s sustained file access
Biggest advantages of the VIA CPU are the low power consumption, only 7 watts, and the low price (Cabinet, powersupply, motherboard, CPU for 65 Euro Smile ).

Anyway, please do not use the script I listed in my first post because :o
I forgot you can have spaces in the file names and then it does NOT work.
Shame on me.
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#5
2005-05-26, 05:59 AM (This post was last modified: 2005-05-26, 07:11 AM by erik.)
Tipstir

This is the corrected script, it works with spaces in the filenames (edited to remove even more errors, and again to remove even more errors)
---------------------------------------------------------------------
@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 "usebackq tokens=1,2,3*" %%i in ("%~dpn1.txt") do call :work %%i %%j "%%~dpn1" >>"%~dpn1.wme"
rem Done.
goto :eof

:work
rem Skip useless lines
if "%1"=="FILE" goto :eof
if "%1"=="-------------------" goto :eof
rem Output the clip information for the show part
set /A length=%1-%start%
echo CLIPLIST: #%count% clip
echo CLIP: %~dpn3.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=%2-%1
echo CLIPLIST: #%count% clip
echo CLIP: %~dpn3.mpg
echo 6 %1 %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=%2
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/
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#6
2005-05-26, 07:55 PM
If the compiled xvert is the same as the bat file above, I think I see an error here (in bold):

@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"

Should that not read:

comskip.exe %1 ?
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#7
2005-05-26, 09:30 PM
Nope. Skipped right over xvert/comskip and renamerecording renamed it.
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#8
2005-05-26, 10:11 PM
Instead of xvert, how about just appending the code above to postprocessing.bat, with renamerecording right after it?
Think it would make a difference?
I'll try anything to get a proper .wme out of this!
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#9
2005-05-26, 10:34 PM
Success!
I used the code above, and it works perfectly, then rename recording does it's thing as well.
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#10
2005-05-27, 07:25 AM (This post was last modified: 2005-05-27, 12:40 PM by erik.)
I am currently trying the test above.
Please be aware that the last chapter of the .mpg file is may NOT be entered into the womble .wme file.
The .txt file from comskip looks like this
100 200
300 400

Where the number pairs identify the commercials.
If the file contains a show section after the last commercial (e.g. frame 400 too 500) then the .wme file should contain 5 chapters but there is currently no simple way to solve that unless... you scan the comskip .log file and use the third last line to read the total number of frames from the .log file.
For me its not a problem because a show is always terminated by a commercial.
It may be different for others.
I will however experiment if there is a trick to solve it.
It works!!!!! shows completely the last segment , also improved the naming of the clips. see below

The test.zip fails , try it with a space in the filename like "t t.mpg"
--------------------------------------------------------------------

@echo off
Rem PostProcessing.bat

rem Initialize the variables
set count=1
set start=0

rem Identify the commercials
comskip.exe %1

rem Create the cliplist
echo # >"%~dpn1.wme"
rem Process all the lines from the Comskip output file
for /F "usebackq tokens=1,2,3*" %%i in ("%~dpn1.txt") do call :work %%i %%j "%%~dpn1" >>"%~dpn1.wme"

rem Output last clip
echo CLIPLIST: #%count% show >>"%~dpn1.wme"
echo CLIP: %~dpn1.mpg >>"%~dpn1.wme"
echo 6 %start% 200000 1 192 0 1 224 0 0 0 0 0 0 >>"%~dpn1.wme"

rem Done.
goto :eof

:work
rem Skip useless lines
if "%1"=="FILE" goto :eof
if "%1"=="-------------------" goto :eof
rem Output the clip information for the show part
set /A length=%1-%start%
echo CLIPLIST: #%count% show
echo CLIP: %~dpn3.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=%2-%1
echo CLIPLIST: #%count% commercial
echo CLIP: %~dpn3.mpg
echo 6 %1 %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=%2
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/
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mpeg-dash bgowland 2 2,284 2013-09-26, 05:43 PM
Last Post: bgowland
  Any interrest for a Comskip version that can decode VBI/CC from TS or DVR-MS? erik 10 4,093 2008-05-17, 08:10 PM
Last Post: erik
  Determining the comskip rate. pastro 2 1,566 2007-10-07, 08:05 PM
Last Post: pastro
  DVD to MPEG - target drive other than C:? MarkD 2 1,459 2006-11-12, 10:29 PM
Last Post: MarkD
  vb6, get WxH of Avi and Mpeg zehd 2 1,796 2006-06-13, 11:39 PM
Last Post: zehd
  Comskip: Can some upload short DVR-MS exmaples to test the DVR-MS input of Comskip erik 1 1,377 2006-03-25, 06:21 PM
Last Post: -stattik-
  Comskip: What next? erik 0 1,503 2006-03-15, 09:51 PM
Last Post: erik
  Looking for Comskip tester for DVB or ATSC TS input erik 3 1,864 2006-01-30, 08:32 PM
Last Post: hazydave
  Looking for a logo for Comskip erik 3 1,939 2006-01-05, 12:23 AM
Last Post: jbyram2
  Connect MPEG-2 demux filter in Directshow graph? bgowland 3 6,135 2006-01-01, 04:16 PM
Last Post: funkybro_uk

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode