SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-10-2005, 03:18 PM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
Utility: comskip varient

This version of comskip is the result of testing and experimenting with the logged results from over 160 shows. I automated the testing process to try and produce the most accurate black frame/commercial detection possible. Originally, I had planned on taking the results and using them with Jere_Jone's version of comskip. But, during the testing process I discovered changes that substantially improved the accuracy of black frame commercial detection, so the settings are no longer directly applicable to Jere's version.

I improved the commercial marking code by switching to a two pass system. The first pass uses a small maximum commercial size. If the minimum percentage of the show isn't marked as commercial, it does another pass using a larger max commercial size. The results from the two passes are compared and the one closest to 26.67% is used. One of my cable channels is very staticy; I was able to go from no commercial detection to very good commercial detection by adding a fall back setting if less than 16% of the show was marked as commercial.
Attached Files
File Type: zip comskip024.zip (70.1 KB, 2265 views)

Last edited by malore; 08-11-2005 at 07:13 PM.
Reply With Quote
  #2  
Old 08-10-2005, 05:02 PM
Kanati's Avatar
Kanati Kanati is offline
Sage Expert
 
Join Date: May 2005
Posts: 567
I'll drop it in my setup and see what shakes loose.
Reply With Quote
  #3  
Old 08-10-2005, 09:59 PM
ascv ascv is offline
Sage User
 
Join Date: Jan 2005
Posts: 24
malore,
What folder does comskip go in?
thanks
Reply With Quote
  #4  
Old 08-10-2005, 11:03 PM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
Quote:
Originally Posted by ascv
malore,
What folder does comskip go in?
thanks
It goes in the same folder as SageTV.exe, which is usually found in either C:\Program Files\SageTV\SageTV or C:\Program Files\Frey Technologies\SageTV.

Anyone unfamiliar with comskip should check out the main comskip thread. For comskip to be usefull you'll also need to use one of the many custom STVs that have support for it.
Reply With Quote
  #5  
Old 08-11-2005, 10:22 AM
ascv ascv is offline
Sage User
 
Join Date: Jan 2005
Posts: 24
Thanks for the help Malore.
Reply With Quote
  #6  
Old 08-11-2005, 11:12 AM
ukmgranger's Avatar
ukmgranger ukmgranger is offline
Sage Expert
 
Join Date: Apr 2004
Location: Derby England
Posts: 609
will this be any use to us in the UK. I read somewhere that comskipping with UK material was pretty dificult?!?
Reply With Quote
  #7  
Old 08-11-2005, 12:49 PM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
Quote:
Originally Posted by ukmgranger
will this be any use to us in the UK. I read somewhere that comskipping with UK material was pretty dificult?!?
These setting probably work best for the USA and apparently Canada. But, I'm willing to test for what the best settings on average might be for other regions for anyone willing to do a little work. However, nothing will help this program if the commercial breaks don't start and end with a least one black frame.

Anyone who would like me to test what settings might work best for them needs to:
1. edit the comskip.ini file and change blacklist=0 to blacklist=1
2. run/rerun comskip on your shows. You can do this manually by drag-and-dropping the video file onto comskip or automatically by deleting the corresponding .txt file(s) and restarting whatever you use to automatically run comskip.
3. edit the comskip .txt file(s) to have the correct commercial breaks. I used VirtualDub-MPEG2 to open the video files, because it's free and provides framenumbers just like comskip uses. VirtualDub is slow to open mpeg2 files, but very fast afterwards. Just search the time line for the start and end of the commercials and enter the frame numbers in the comskip .txt file seperated by tabs, with each break on a seperate line.
4. zip up the .lst and .txt files and attach them to a post. Best results would be achieved from a variety of shows from different channels.

Before doing much of this check that it will work at all by looking to see if anything close to the start and stop frames are in the .lst file for the show.

Example .lst file (shortened)
(Format: framenumber, maximum brightness, avg. brightness, % bright)
43 35 20 0.0000
17014 31 18 0.0000
17917 44 19 0.0000
18368 53 20 0.0000
18820 37 19 0.0000
19275 44 21 0.0000
20633 49 20 0.0000
21232 49 21 0.0000
22887 33 18 0.0000
23795 32 17 0.0000
31945 43 19 0.0000
32851 40 20 0.0000

Example .txt file
17014 23795

The commercial break can clearly be seen because it consist of a series of short segments seperated by black frames and then large gaps of no black frames during the actual show.

Last edited by malore; 08-11-2005 at 07:16 PM.
Reply With Quote
  #8  
Old 08-11-2005, 07:13 PM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
I read a post indicating that someone from Canada was getting good results using this version, so that is encouraging.
Reply With Quote
  #9  
Old 08-11-2005, 10:44 PM
h8dk97 h8dk97 is offline
Sage Advanced User
 
Join Date: Sep 2004
Location: Melbourne, Australia
Posts: 99
Has anyone tried it in Australia? Would love to be able to skip commercials :-)
Reply With Quote
  #10  
Old 08-12-2005, 04:00 AM
h8dk97 h8dk97 is offline
Sage Advanced User
 
Join Date: Sep 2004
Location: Melbourne, Australia
Posts: 99
Do you need closed captions for comskip to work?


Quote:
Originally Posted by malore
This version of comskip is the result of testing and experimenting with the logged results from over 160 shows. I automated the testing process to try and produce the most accurate black frame/commercial detection possible. Originally, I had planned on taking the results and using them with Jere_Jone's version of comskip. But, during the testing process I discovered changes that substantially improved the accuracy of black frame commercial detection, so the settings are no longer directly applicable to Jere's version.

I improved the commercial marking code by switching to a two pass system. The first pass uses a small maximum commercial size. If the minimum percentage of the show isn't marked as commercial, it does another pass using a larger max commercial size. The results from the two passes are compared and the one closest to 26.67% is used. One of my cable channels is very staticy; I was able to go from no commercial detection to very good commercial detection by adding a fall back setting if less than 16% of the show was marked as commercial.
Reply With Quote
  #11  
Old 08-12-2005, 05:51 AM
blade blade is offline
SageTVaholic
 
Join Date: Jan 2005
Posts: 2,500
Quote:
Originally Posted by h8dk97
Do you need closed captions for comskip to work?
No.
Reply With Quote
  #12  
Old 08-16-2005, 03:37 AM
snoopy's Avatar
snoopy snoopy is offline
Sage Expert
 
Join Date: Dec 2004
Location: dog house
Posts: 682
Getting Malore's New Comskip to work?

Quote:
Originally Posted by malore
It goes in the same folder as SageTV.exe, which is usually found in either C:\Program Files\SageTV\SageTV or C:\Program Files\Frey Technologies\SageTV.

Anyone unfamiliar with comskip should check out the main comskip thread. For comskip to be usefull you'll also need to use one of the many custom STVs that have support for it.
How do I use this? What am I missing? I am using Neilm's STVi for comskip support and have copied your comskip files (comskip.exe and comskip.ini) to the SageTV folder. I've restarted SageTV. It appears to have no effect. Do you have any suggestions?
__________________
The newest v7 release of SageTV, now a free upgrade for existing owners of SageTV, is a dream come true for any TV enthusiast. Combine it with Play-On for Netflix and Hulu (among others) and no stone has been left unturned. SageTV is TV done right!
-- Snoopy
Reply With Quote
  #13  
Old 08-16-2005, 07:02 AM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
You actually need to be using a STV that supports comskip. The v3 STV only supports the commercial skipping of a comskipped program, it doesn't run the comskip program. SageMC and Malore are 2 of the ones I can think of that support the use of comskip for analyzing the files.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #14  
Old 08-16-2005, 07:17 AM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
gplasky, is correct. If you read through the comskip import thread you'll see it doesn't add the background commercial processing, so you have to use something like DirMon with it. If you just want to test comskip out on a couple of shows you can drop-and-drag a .mpg file onto the comskip.exe, wait for it to finish, then play it with SageTV.
Reply With Quote
  #15  
Old 08-16-2005, 10:59 AM
mikesm mikesm is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,293
Interesting... Does it compile and run under linux?

Thanks,
Mike
Reply With Quote
  #16  
Old 08-16-2005, 06:16 PM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
If you can compile the mpeg2dec sample program from libmpeg2 then it shouldn't be too hard to get comskip to work in Linux.
Reply With Quote
  #17  
Old 08-17-2005, 09:49 AM
Kanati's Avatar
Kanati Kanati is offline
Sage Expert
 
Join Date: May 2005
Posts: 567
My tests thus far indicate anywhere from 10 - 25% increase in accuracy. And none have been worse than the original. Good job.
Reply With Quote
  #18  
Old 08-18-2005, 07:47 AM
malore's Avatar
malore malore is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Iowa
Posts: 877
Thanks, glad to hear it's working for you.
Reply With Quote
  #19  
Old 09-11-2005, 12:26 AM
judoGTI judoGTI is offline
Sage Advanced User
 
Join Date: Mar 2005
Posts: 131
bump just to see what people are thinking
Reply With Quote
  #20  
Old 09-11-2005, 12:23 PM
robertmcox's Avatar
robertmcox robertmcox is offline
Sage Advanced User
 
Join Date: May 2003
Posts: 137
I'm not sure if it works better or not....I've thought about switching back to normal compskip, but haven't because it does get some shows (history channel and most scifi) right on the dot every time. But when it doesn't detect well, it really doesn't do well and have to ff/rew.

I notice sometimes it detects a long commercial break as 2 commercial blocks with about 10 seconds of non-commercial inbetween. I would think this would be easy to correct, if you're looking for suggestions.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.