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

Geoffrey Hausheer ou401cru02 at sneakemail.com
Fri Jan 2 20:30:24 EST 2004

On Fri, 2 Jan 2004 17:18:28 -0500, "Jim Paris jim-at-jtan.com
|mythtv/1.0-Allow|" <emf9hqup640t at sneakemail.com> said:
> Hit "x", screen showed "Transcoding", but nothing seemed to happen
> (no mythtranscode running, no new files in /tv).  I hit "x" again
> and it said "Stopped transcoding".  I hit "x" a third time and it
> said "Transcoding", and this time the mythtranscode process was
> running (and a .nuv.tmp showed up in /tv).
The transcoding won't always start until you've stooped watching the
recording (depending on the editing status).  Howver what you probably
saw here was just the delay.  when you hit 'x', it sticks the transcode
on the queue.  The queue is only polled every 60 seconds, so the
transcode won't necessarily start until 60 seconds later.

> The original .nuv was about 770 megs, and the .nuv.tmp grew to about
> 723 megs.  A few seconds later, Myth clobbered (!@#$) my .nuv.old
> and renamed the .nuv.tmp to .nuv.
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'

> Issues
> - I lost my original.  Bad choice of filename I suppose.  Myth should
>   be more careful to not clobber and delete .nuv.old files unnecessarily
>   if SaveTranscodings is 0.
See above

> - It didn't seem to cut any commercials.  Should it have?  It wasn't
>   clear from your mail whether it should, when started from
>   mythfrontend,
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:
load the commerical list into the cutlist.
stop watching the recording
watch the recording
hit 'X'
stop watching the recording.

Yah it sucks, but this is more for getting the mpeg2 stuff right and not
so much the mythtv integration yet

> - 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

> - 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.

> - Mythfrontend spits out errors while playing it and seeking around:
This is probably related to the above

Thanks, it actually sounds like it is working about the best I would
expect at this time :)
if you watch the recoridng with mplayer, you should be able to skip
around and make sure the A/V sync is ok.


More information about the mythtv-dev mailing list