[mythtv] Ticket #7984: Commercial break detection on H264 progressive recordings off by 2

Chris Pinkham cpinkham at bc2va.org
Sat Feb 27 16:19:15 UTC 2010


* On Sat Feb 27, 2010 at 12:24:13AM -0800, Manuel McLure wrote:
> I'm seeing a very similar problem with 1080p h.264 recordings - my
> commercial breaks are at about 0.78x where they should be (i.e. a
> break that should happen at 1000 seconds into the show actually skips
> to around 780 seconds.) Here's some numbers for a recent recording:
> 
> Real Time      Skipped Time     Ratio
>  7:18 (438)     5:37 (337)      1.3
> 11:19 (679)     8:53 (533)      1.27
> 16:51 (1011)   13:12 (792)      1.28

The commercial flagger works on a frame-count basis, it does not work
on timestamps, and the frame numbers that the flagger uses come directly
from the decoder, so either the decoder is providing incorrect frame
counts during flagging or the ones provided during flagging do not match
up with the ones provided during playback.  Is this current trunk or is
this 0.22-fixes?  I ask because we recently went through a libavcodec sync
that may have had bearing on this.

> If a developer contacts me directly I can send the 1.3G 1/2 hour show
> that gave the above numbers (or at least the first half or so, to

I may not be the right person to fix this since it doesn't appear to be
a commercial flagger issue, but if you want to email me privately with
a link to a download of the first 15 minutes or so, that should easily
be enough to take a look at the issue.

> mysql> select * from recordedmarkup where chanid = 1647 and starttime
> = '2010-02-26 19:30:00';
> +--------+---------------------+-------+------+---------+
> | chanid | starttime           | mark  | type | data    |
> +--------+---------------------+-------+------+---------+
> |   1647 | 2010-02-26 19:30:00 |     0 |    4 |    NULL |
> |   1647 | 2010-02-26 19:30:00 | 10272 |    4 |    NULL |
> |   1647 | 2010-02-26 19:30:00 | 23715 |    4 |    NULL |
> |   1647 | 2010-02-26 19:30:00 | 34225 |    4 |    NULL |
> |   1647 | 2010-02-26 19:30:00 |    82 |    5 |    NULL |
> |   1647 | 2010-02-26 19:30:00 | 15941 |    5 |    NULL |
> |   1647 | 2010-02-26 19:30:00 | 26576 |    5 |    NULL |
> |   1647 | 2010-02-26 19:30:00 | 37081 |    5 |    NULL |
> +--------+---------------------+-------+------+---------+

(non-flagging items deleted from above)

The 'mark' in these rows is the frame number of the commercial start
or end flag.  If your theme provides the frame number in the cutlist
editor, can you see if these line up with the frame numbers you see
from the database query above?

--
Chris


More information about the mythtv-dev mailing list