[mythtv] Frame accurate MPEG2 commercial cutting

Geoffrey Hausheer mythtv0368 at phracturedblue.com
Fri Jan 13 04:58:49 UTC 2006

So it turns out that for 0.19, frame accurate comercial cutting just
isn't realistic.  While there isn't anything wrong with the code in
mythtranscode (that I'm aware of), it turns out that myth just doesn't
count frames in exactly the same way.  In addition, the way the index
is generated in myth isn't very reliable (a cutpoint will happen at a
different point depending on whether you watch the video from the
beginning or whether you use fast-forward/rewind), and myth's
different ways of storing them (the dvbrecorder and ivtv recorders
don't use exactly the same algorithm to generate the index, and using
mythcommflag to rebuild the index results in yet another answer).  the
above only applies to MPEG2 as far as I can tell.

I'll take a look at this after 0.19 is out the door, but it is likely
that to get everything is sync may need some invasive changes, so I'm
not going to start now.

For the time being, the following solutions may work:
1) regenerate the key-frame index using 'mythtranscode -b' before
selecting cut points
2) run mythtranscode without a cutlist before generating the cut points
3) leave at least 1 sec extra to prevent excessive cutting

Either 1) or 2) should result in frame accurate cutting, though I
still can't gaurantee it.

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.


More information about the mythtv-dev mailing list