[mythtv] Ticket #10793: CommFlagger improvements

Mark Spieth mark at digivation.com.au
Fri Oct 19 22:29:37 UTC 2012


On 10/19/2012 9:03 PM, MythTV wrote:
> #10793: CommFlagger improvements
> -----------------------------------+-----------------------------
>   Reporter:  markspieth             |          Owner:  cpinkham
>       Type:  Patch - Feature        |         Status:  new
>   Priority:  minor                  |      Milestone:  unknown
> Component:  MythTV - Mythcommflag  |        Version:  Unspecified
>   Severity:  medium                 |     Resolution:
>   Keywords:                         |  Ticket locked:  0
> -----------------------------------+-----------------------------
>
> Comment (by Wayne McDougall <waynemcdougall@…>):
>
>   In SubtitleChangeDetector.cpp there is the following code:
>   {{{
>               //subtitle.start_display_time;    /* relative to packet pts,
>   in ms */
>               //subtitle.end_display_time;  /* relative to packet pts, in ms
>   */
>               //subtitle.pts;               /* in AV_TIME_BASE, use frame
>   number * fps */
>
>               int start = frameNumber + subtitle.start_display_time * fps /
>   1000;
>               int end   = frameNumber + subtitle.end_display_time * fps /
>   1000;
>   }}}
>   It seems to me this code assumes start_display_time and end_display_time
>   are relative times to the frame number.
you are correct. Remember I have only tested with dvb subtitles.
> Instead in my recordings they are
>   absolutes timecodes in ms, directly related to the timecodes associated
>   with each video frame. And the above code yields incorrect framenumbers,
>   and subtitle detection fails.
Yes it would. Interesting. Which subtitle system is being used?
>   I guess we could subtract the the initial frame's timecode, if we can
>   assume fps is constant for recordings. I'm not sure that is a safe
>   assumption. I suspect the time code wraps around to zero at some point,
>   and that would need to be handled.
>
>   Instead I think it would be safer to follow the pattern of
>   subtitlescreen.cpp which just compares the subtitle start and end
>   timecodes with the frame timecodes.
If subtitlescreen does it well then that would be a good start. I must 
have missed this.
sounds like a good plan. I will test any patches too.
>   Presumably the current code works for some people, although I find it hard
>   to see how. It's entirely possible I'm not understanding something deeper
>   here. Comments welcome. But I'm hoping if I do a good job, the changed
>   code should still work correctly for them and also work for me.
>
I have found that ads can have subtitles. so the benefit of subtitle 
will require some enhanced heuristics to make it useful.
Im glad people are trying it though.

Im still working on improved logo detection but progress has been slow 
due to other factors.

cheers
mark



More information about the mythtv-dev mailing list