[mythtv] Lossless MPEG2 editing!

Isaac Richards ijr at case.edu
Wed Jan 19 23:06:41 EST 2005


On Wednesday 19 January 2005 09:54 pm, Nigel Pearson wrote:
>  A fellow Australian, Greg Frost, has coded a utility to cut the
> edit blocks from a recording. It is, in his own words, a bit crude,
> and has only been tested on DVB recorded MPEG2 streams, but it works!

I can't see how, as it's completely disregarding the internal file structure.  
Neither does it actually cut to the desired frame.

>  I would like to put it in contrib ASAP, but decided that a little
> discussion was probably in order:
>
> 1) The program creates a new file that has the edit blocks removed.
>     It uses the recordedmarkup table to locate the byte boundaries.
>     It also creates a new recorded table entry for the new file
>
> 2) Now, I assume that a recordedmarkup entry will always correspond
>     to a sequence header or keyframe, but I am not sure if the
>     audio and video blocks or packets will always align to these
>     byte offsets.

Not true at _all_.  Audio is commonly very roughly aligned with video data - 
this is the reason for the 'extra audio buffering' option for playback.  

> 3) I would eventually like to make this a program like mythtranscode,
>     (e.g. mythchop/mythcut/mythedit) that is invoked from the menu
>     while watching/editing a recording, or the contextual menu in the
>     Watch/Delete Recordings screens.
>     It could also be an inactive item if the recording has no cutlist.
>
>     The alternative would be to shoehorn it into mythtranscode,
>     with a new "lossless" profile for the stream types it supports.
>
>     Given that it doesn't actually transcode, I prefer having
>     a separate program and set of UI actions for it. Thoughts?

It shouldn't be part of anything, but if it has to be, it'd be best part of 
mythtranscode.  Doesn't make sense to have vastly similar functionality part 
of a separate set of options and UI actions.

Isaac


More information about the mythtv-dev mailing list