Re: [PATCH] Re: [mythtv-users] How well does commercial detection work?

2005-04-12 Thread Risto Treksler
Fixed it myself :)

The patch is attached and it replaces the previous patch and
addresses all four issues.

1) in strict mode - treat frames as blank only if logo is absent
2) more fixes for the long long issue
3) fix for white frames triggering commercials
4) do not detect commercials less than 60 sec long, in the middle of a show


PS
I also highly recommend changing the default max and min comm break lengths

-#define MIN_COMM_BREAK_LENGTH   60
-#define MAX_COMM_BREAK_LENGTH  485
+#define MIN_COMM_BREAK_LENGTH   55
+#define MAX_COMM_BREAK_LENGTH  335

The combination of the above changes seems to detect at 99% accuracy 
with no false positives so far for me.


PPS

On Monday 11 April 2005 11:07 pm, Risto Treksler wrote:
 1) I DO NOT ignore logos in blank frames in STRICT mode

what I meant is that i do not ignore the logo area in strict mode
in effect i do ignore the logo
:)


commercial_skip.updated.diff.bz2
Description: BZip2 compressed data
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Re: [PATCH] Re: [mythtv-users] How well does commercial detection work?

2005-04-12 Thread Risto Treksler
Hmm, 

I sent this last night but it never showed up on the list, 
So I am resending
...
Fixed it myself :)

The patch is attached and it replaces the previous patch and
addresses all four issues.

1) in strict mode - treat frames as blank only if logo is absent
2) more fixes for the long long issue
3) fix for white frames triggering commercials
4) do not detect commercials less than 60 sec long, in the middle of a show


PS
I also highly recommend changing the default max and min comm break lengths

-#define MIN_COMM_BREAK_LENGTH   60
-#define MAX_COMM_BREAK_LENGTH  485
+#define MIN_COMM_BREAK_LENGTH   55
+#define MAX_COMM_BREAK_LENGTH  335

The combination of the above changes seems to detect at 99% accuracy 
with no false positives so far for me.


PPS

On Monday 11 April 2005 11:07 pm, Risto Treksler wrote:
 1) I DO NOT ignore logos in blank frames in STRICT mode

what I meant is that i do not ignore the logo area in strict mode
in effect i do ignore the logo
:)


commercial_skip.updated.diff.bz2
Description: BZip2 compressed data
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


[PATCH] Re: [mythtv-users] How well does commercial detection work?

2005-04-11 Thread Risto Treksler
Hi,

I haven't figured out why the minimum length is still not being honoured 
and so I am going to privately send you the full debug output
from a couple of such shows

NOTE:
I think it's OK to have commercials shorter than 60sec 
right in the beginning of the show!! 
these are detected fine all the time and should continue to be detected as is

however there shouldn't be any really short commercial sections 
in the middle of the show, but it's flagging them nonetheless
- (using method all with strict checking enabled)


ALSO here's a patch that fixes a few things

1) I DO NOT ignore logos in blank frames in STRICT mode

- this alone has eliminated virtually all false positives
- it even works reasonably well with shows that leave the logo up
  i end up having to watch the first or the last commercial, 
  but that's ok b/c there are no false positives.
  (There has got to be a way to: ONLY ignore these logos
   if there are no completely blank frames at all in the show)

2) fix for the messed up data in my previous post 

- long long vs. long
- (long)it.key()  probably would have done it as well
- it didn't like %7lld either

3) fix for white frames triggering false positives

- NOT ONLY  (max - min) = blankFrameMaxDiff
- BUT ALSO max  some reasonable amount



On Monday 11 April 2005 04:07 pm, Chris Pinkham wrote:
  downloaded todays CVS and reflagged
  it detected and flagged an obviously false commercial of just 8 frames
  long
 
  white frames like those in explosions and in scene transitions in Cold
  Case also trigger false positives every time

 If you use the same instructions I gave the others earlier in this thread
 and email me (privately) the debug output, it might help me find and fix
 this.

  2005-04-11 14:31:23.170 Final Commercial Break Map
  2005-04-11 14:31:23.170
  ---
 
  2005-04-11 14:31:23.170 d : 7639 (00:04:00.04) (14)
  2005-04-11 14:31:23.171 d : 7646 (00:05:00.04) (14)
  2005-04-11 14:31:23.171 d : 102549 (00:04:00.56) (58)
  2005-04-11 14:31:23.171 d : 107739 (00:05:00.59) (51)
  2005-04-11 14:31:23.171
  ---

 On second thought, something looks plain weird about this output anyway. 
 The output is all weird.  Have you done a make distclean lately?  If not,
 can you do that then remake and rerun flagging and see if you get the same
 results.

-- 
Risto Treksler
Elkhorn Lodge
Banff, Alberta, Canada


commercial_skip.diff.gz
Description: GNU Zip compressed data
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users