[mythtv] New MPEG2 commercial-cut code ready for testing

Geoffrey Hausheer mythtv0368 at phracturedblue.com
Tue Nov 15 10:45:52 EST 2005

On 11/15/05, Cory Papenfuss wrote:
> Orig (from the beginning):

your original looks like this (in presentation order)
0   ...    7     8    9    10    11
I    ...    B    P    B    B      P
I    ...    I*    I*     B   B      P

where the '*' represents a regenerated frame. This was done correctly
(or, more precisely, as expected)  If the I* frames aren't generated
correctly, then the rest of the GOP is likely to be hosed, as all
further frames (P and B) are generated from frame 8.  This is the
situation in which looking at the orginal B frames, and regenerated I
frames should help.  Your streams seem to have custom quantization
matrices, and that may be influencing the code too.  I have a clip you
sent me earlier, and I'll play with that and see if I can see what you
see.  The 'enc' data still isn't being generated correctly for some
reason, so I can't yet do before-vs-after comparisons.

>         The second I-frame looks blockier than the B-frame it was
> generated from.  Also, the third I-frame (which should be the same as the
> original 7400) look different and more blocky.  Wrong header that gets
> inherited?  By the next GOP, things have cleared up.
See the above explanation.  I hope it explains what is going on.

> The bad heuristic still present:
> "Need to insert 7394 frames > max allowed: 20"
This is caused by cutting on a frame that has no PTS.  I know how to
fix it, but haven't done so yet, as I'm trying to figure out a way to
do it that isn't a hack.  The next release should have this fixed,

And to answer your other email....
>         I would also suggest that keeping a stand-alone version of it
> would be useful.  AFAIK, there doesn't exist a good "cleanup" utility (or
> I would be using it).  Also, I don't do video processing on my mythbox,
> but rather dump the file to USB HD and haul it into my office where I've got a
> machine with more oomph.... having to have a full-blown mythtv install to
> use the code would be a bit overkill.
Yes this is my plan.  I might even be able to get rid of the Qt
requirement (I'm only using it because it has more powerful lists than
C++ does on its own).  While the program is being targeted at myth, I
am doing my best to make sure it can be used stand-aolne as well.


More information about the mythtv-dev mailing list