[mythtv] Frame accurate MPEG2 commercial cutting

Daniel Kristjansson danielk at cuymedia.net
Fri Jan 13 14:21:02 UTC 2006

On Thu, 2006-01-12 at 20:58 -0800, Geoffrey Hausheer wrote:

> If you observe cases where the cuttig appears to be more than ~1sec
> off, that would likely indeicate a bug, which I'd be interested in
> looking at.

There is a known bug where that would be the case, see #799.
DTVRecorder just scans the packets for sequence and GOP headers,
which usually more or less works, but sometimes there are other
sequences of 4 bytes that match in the packet so we over-count.

We do the same thing in mpegrecorder, but there we never get the
structured error of a frame count doubling because the encoder
simply doesn't insert such data in the packets.

FYI As far as I know there is no deep reason why MARK_GOP_START is
still used instead of MARK_GOP_BYFRAME. The rebuilt maps should
probably always use MARK_GOP_BYFRAME, since we don't know if the
keyframe distance is fixed unless we first scan the entire file.
And it would probably make life easier if MARK_GOP_START just went

-- Daniel

More information about the mythtv-dev mailing list