[mythtv] [PATCH] MPEG2->MPEG2 commercial cut (myth patch)

Jim Paris jim at jtan.com
Fri Jan 2 21:24:53 EST 2004

> yeah, sorry about that.  it works this way because it is faster to do a
> rename nuv->old, tmp->nuv, rm old than to do a rm num, mv tmp->nuv (less
> time when the user could try to watch a recording that is being swapped).
>  I don't really plan to change it, so the answer is 'don't do that'


     rename(nuv, old);
  rename(tmp, nuv);

will do the trick just as fast, since rename clobbers the destination.

> Well, that's a good question.  Yes I think it should have.  However, the
> mpeg2->mpeg2 stuff isn't very robust as far as changing the cutlist while
> processing.  I'm not sure when myth actually writes the cutlist back to
> the db, but probably not until you stop watching the recording.  So for
> now, you'd need to:

OK, so I tried again on my next recording, this time making sure the
cutlist had been specified for a while before starting transcoding. 
This time, it hung: more details at the end...

> > - If it didn't cut the commercials, why did the file shrink?
> Most likely it pruned out bogus audio/video frames.  If it was recorded
> with a DVB/HDTV card, then it is probably the TS->PS conversion

This is with a PVR-350, DVD Special-2 mode.

> > - The cut file seems to play OK in mplayer and MythTV, but from
> >   within MythTV seeking around is slow, and the total recording time
> >   jumps around, getting closer and closer to the actual time (30 mins)
> >   as I near the end of the recording.  I also can't enter edit-mode
> >   anymore.
> well, we don't rebuild the keyframe index yet, so yeah, you'll see this
> for now.

I suppose running mythcommflag or something would fix that for now.


With my next MPEG, it hangs pretty early on.  This is again from a
PVR-350, DVD special 2, and it hangs at a point where the MPEG is
probably a bit messy (early on, when my cable box is just switching
the channel).

The output of

  mythtranscode -c 1060 -s 2003-12-14T22:00:00 -p autodetect -d -l

with mp2_debug=2 is attached.  I also put the first 600kb of the MPEG


and you should hopefully be able to reproduce the hang with
  mythtranscode -i bad.mpg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugout.gz
Type: application/octet-stream
Size: 2910 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040102/afac336d/debugout.obj

More information about the mythtv-dev mailing list