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

Cory Papenfuss papenfuss at juneau.me.vt.edu
Fri Jun 3 13:54:57 UTC 2005

>> 	It took me awhile to work up the ambition to anally insert Java
>> enough to make ProjectX go.  Once I did, I was surprised at how much
>> functionality it had.  It will do cutting, and when it does so it parses
>> the stream and tries to correct varying A/V offsets after the first cut.
>> Looked really good, but like I said, some folks have been having subtle
>> issues with the sync of cut streams.
> Frankly, at this point, I would be happy with a cutting program that was
> given the leeway to move cutpoints to nearby I-frames or A/V sync points so
> that there is no rebuilding to be done, and no risk of loss of sync.
 	That's all ProjectX does.  The rebuilding I'm referring to is the 
APTS and VPTS.  If an MPEG2 stream is cut, there's a gap in the PTS 
(presentation time stamp).  Also, the fundamental problem causing the sync 
hiccups with avidemux et al is that the ivtv cards will munge the APTS 
different from the VPTS when there's a glitch in the signal.  Avidemux can 
deal with a *static* offset between video and audio time, but when it 
*changes* in the way ivtv does with glitchy captures, the result is slowly 
varying sync offsets.  ProjectX tries to rebuild the timestamps of the 
output streams it generates.

> For a full fledged editing studio, you need to edit to exact frames, but
> for elmination of commercials or extra snippets at the start and end of
> recordings, a little leeway is fine.
 	Sure, but even that does not work reliably in all cases yet. 
Nuvexport/avidemux does well for 90% of the people who use it.  Bad signal 
sources (particularly tape captures) almost never work correctly.

> Particularly if, for example, you just have a series of programs that
> you will not be watching for several months, programs that have a cutlist
> so you won't watch the cut parts if you watch them now, and you just want
> to delete the stuff you would not have watched anyway from your disk.
 	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.

> I will check into project X, the web examples did not imply an easy cutting
> interface.  Myth has a reasonably decent cutting interface, though if I
> were designing it I would add mouse/trackball support to make it really
> easy to slide and search through the program for the cutpoints you want.
 	I agree... the mythtv interface to cutting is great.  My gripe (as 
mentioned above) is the all-or-nothing transcoding.  Maybe I'm too 
ignorant of the way to run mythtv, but I AIUI, for mythtv, transcoding 
(from mpeg2 capture) == mpeg4.  IIRC, the projectX cutlist was pretty 
simple.  Converting the mythtv cutlist to it wouldn't be hard, and I think 
it's been done.

> I can imagine a nice mouse interface that went like this:
>    a) Click to start hunting.  Roll mouse, picture zooms by very fast.
>       The screen's worth of movement covers the entire video.
>       Get close to your cutpoint.
>    b) Click again and now the mouse movement moves more slowly, the full
>      screen of movement covers just a minute or two.  Get closer
>    c) Click again and the full sweep is now just a few seconds
>    d) Click again and the sweep is just 30 frames or so.  Ideally
>        the frames are actually displayed as thumbs.  Final double
>        click to pick frame.  right click to go back up.
> I bet with an interface like this I could move to any frame I wanted
> in a little back and forth of the mouse, in very short time.
> Beyond what myth needs, though.
 	That's similar to how professional video editing stations work. 
Shuttle/jog, etc.  The Mythtv cutter is similar, but within the confines 
of a remote control.  For me, the mythbox is almost completely 
stand-alone, settop.  Having to pull up a command window, or grab a mouse 
is not really acceptable.


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

More information about the mythtv-users mailing list