[mythtv] A prelude to transcoding MPEG2->MPEG2

Geoffrey Hausheer ou401cru02 at sneakemail.com
Sat Dec 6 09:39:28 EST 2003


On Fri, 5 Dec 2003 21:32:56 -1000, " James L. Paul" said:
> > Considering the complexiity of keeping an MPEG2 stream compliant, I think
> > the easier approach will be the GOPchop approach.  I was considering just
> > importing it wholesale (it is GPL) but it looks like it'll take a fair
> > amount of work to extract the GUI parts and make a library from it, so it
> > may be easier to just duplicate the GOP modifying functions in myth.  On
> > the flip-side, chopping to exact frames would give a much beter overall
> > solution, but is likely to be challenging to make work for the PVR250,
> > DVB, and HDTV crowds.
> 
> Another observation. I've spent considerable time trying to get GOPchop
> to 
> generate useable streams and have not yet succeeded. I haven't found a 
> multiplexer that can recognize any segments after the first cut. A little 
> over a month ago avidemux2 was patched to recognize PVR250 streams and
> I've 
> been using it since with good results. It's even capable of somewhat
> messy 
> automation via commandline.
> 
Thanks, I'll look into it (I think I did before, and thought it would be
challenging to use, but that was before and this is now)

> > However, if anyone knows where I can find a reasonable spec for the MPEG2
> > stream format, I'd be much obliged.  My google searching has turned up
> > lots of useful stuff, but not enough for me to really understand how to
> > begin (for instance I've been able to find zilch on the actual PES and
> > GOP formats.
> >
> > Also, everything I've looked at has been MPEG2-PS related.  the 'TS'
> > variety seems to be quite a bit more complex, and if DVB uses it (as I
> > suppose it does...'TS' being 'Transport Stream'), it will cause much woe,
> > so if anyone knows anything about that, it'd be useful too. For instance,
> > has anyone tried using GOPchop on a DVB stream?
> 
> As I said, I got it to work on a PVR250 (Freestyle) PS, but the results 
> weren't feedable to other tools like mplex or tcmplex, so it was moot. In 
> fact, even mplayer lost audio at the first cut. This was even after
> trying 
> the gopfixup util intended to fix the broken time indexes caused by
> GOPchop. 
> I'm not sure how useful it would be to use that code wholesale.
> 
> I'm not sure how avidemux and avidemux2 are implemented, but they have
> the 
> ability to output m2v and mp2 between cutpoints in a passthrough kind of 
> mode. I'm able to join the segments together and feed it to other tools
> ok, 
> but I usually leave them seperate and feed them to dvdauthor as chapters
> in a 
> single title.
> 

Thanks for the info.  I really didn't want to demux/remux the audio, but
it seems like this may be needed to get it right.  Yuck.

One thing i just realized is that DVD-Lab (for Windows) has the ability
to set chapters on a per-frame basis.  I wonder how they do that.  Of
course it is probably not releant, since it could just be some tricks in
the headers, but still, it implies that the DVD spec requires that a
player can decode several-frames without displaying them, and pick up at
an arbitrary b/p/i frame.  Or maybe it doesn't really work, I can't say
i've actually used that feature.

.Geoff


More information about the mythtv-dev mailing list