[mythtv-users] Re: Getting good audio sync in nuvexport/transcodings w/cutlist?

Cory Papenfuss papenfuss at juneau.me.vt.edu
Sat Jun 4 16:50:25 UTC 2005

On Sat, 4 Jun 2005, Paul Andreassen wrote:

> On Fri, 3 Jun 2005 11:54 pm, Cory Papenfuss wrote:
>>  	Yeah, wouldn't that be nice.... :)  The "perfect" way it would
>> work would be what you describe... lossless/bugless MPEG2 cutting of the
>> original stream in the mythtv database.  No point in wasting space storing
>> commercials if it's going to be on the box for awhile.  They way it is
>> now, however, it's an all or nothing thing.  If you want to save space,
>> you *MUST* transcode and store in MPEG4.  Not acceptable for me, I'm
>> afraid... I make settop-playable DVD's of lots of my captures.
>>  	Ideally, the lossless cutting could become the "commercial-free
>> master" and live within mythtv.  From that, one could export MPEG4's, or
>> denoise and size/bitrate reduce MPEG2's without losing the master.
> Hi Cory,
> Whats wrong with GOPchop or GOPDIT?
> http://gopchop.org/
> http://hoohol.homepage.t-online.de/gopdit/
> I haven't tried them but they sound like what I want.  The FAQ
> (http://gopchop.org/faq.php) explains the differences between them and also
> avidemux.
 	If you try them, you'll see.  They do tend to work, but seem to 
produce slightly broken streams.  In particular, there are video artifacts 
around the cutpoints, and seeking doesn't work right.  I'm pretty sure the 
video artifacts are because the players I used to decode them (both 
mplayer and xine I've tried) do not honor the 'broken GOP' flag.  The 
seeking thing is most likely due to the gap in the timestamps after a cut 
is made.  If set to 0:00 (in the prefs), it changes the behavior, but it's 
still not what's really needed.

 	In short, it appears that all of the gizmos for lossless MPEG2 
cutting still have some bugs in them.  It's a very difficult problem, 
because MPEG2 is relatively easy to do on a simple file, but can get very 
complicated very quickly.  Most opensource MPEG munging utils assume very 
simplistic and error-free streams.  Captures from ivtv cards are really 
neither.... they've got PES'd chunks rather than simple streams, and 
varying audio and video timestamps throughout.

 	In an ideal world, the lossless mpeg cutter would be:
- GOP-based cutting, but with some fixups to correct for
 	- Funky streams (PU chunks and too much padding).  Make simple,
 		program-streams with single A and V in one PU.
 	- Timestamp-corrected... both for the offsets produced by the
 		card, and gaps produced by cutting.
 	- Ideally reencode the frames in the GOPs around the cut to make
 		non-broken streams.  This could also allow for
 		frame-accurated editing.
- Integrated into mythtv as a "transcode" option for archiving without 
commercials, but without transcoding.


* Cory Papenfuss                                                        *
* Electrical Engineering candidate Ph.D. graduate student               *
* Virginia Polytechnic Institute and State University                   *

More information about the mythtv-users mailing list