[mythtv] A prelude to transcoding MPEG2->MPEG2

Geoffrey Hausheer ou401cru02 at sneakemail.com
Mon Dec 8 17:47:53 EST 2003


On Mon, 08 Dec 2003 14:22:20 -0700, "Craig Rindy
developstuff-at-qwest.net |mythtv/1.0-Allow|"
<bl5dhotpoq0t at sneakemail.com> said:
> Jim Paris wrote:
> > GOPchop still has issues with audio sometimes, I've heard.  It doesn't
> > really handle audio -- it apparently just keeps all non-video data
> > along for the ride while doing his chopping and hopes that it works.
> 
> 
> James L. Paul wrote:
> > 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.
> 
> 
> This is quite odd because I've been using GOPchop for a while now to
> archive interview segments from talk shows and cut commercials out of The
> Kids In The Hall, The Simpsons, and South Park.  I've never witnessed a
> missing audio or sync problem using my PVR-250's streams.  It gives a
> warning about the missing header of course, and it has the unavoidable
> MPEG-2 problems of the first and last GOP of each clip.  But those two
> problems are handled by the "Ignore Errors" and "Drop Orphaned Frames"
> options respectively.
Making compliant streams should not be difficult (at least for MPEG2-PS).
I'll post my commercial-cutting prototype when it is actually funtional
(probably a couple more days).  I ran into a snag where my documentation
on stream encapsulation (PES headers) didn't match the actual headers I
was seeing in the stream.  I found a decent reference implementation in
ogle that has helped me get it right.

I'm still having trouble determining how to sync the audio.  The audio
frames do not appear to specify the number of samples in the header, so i
know of no way to determine the audio length without decoding the audio,
which kinda sucks.  All the info needed for frame-rate control on the
video side exists in the header, so there is no need to decode the video
to do the chopping.

Also, I'd really like to get my hands on a MPEG2-TS stream from one of
the HDTV/DVB guys so I can work on making that work too, so if anyone
wants to snip ~5 minutes from such a beast and find a way to get it to
me, that'd help (MPEG2-TS won't be supported otherwise)
 
> The latter option is not a solution to the latter
> problem, just a preference for the user to choose the lesser of two
> evils.  I'm quite happy with cutting on GOPs because I'm archiving stuff
> for myself, not doing production work, so I can tolerate the
> less-than-0.5-second of a commercial on the occasion when there is no
> black frame (in my experience:  ~30%) or when there's reverb in the audio
> along with a black frame.

If using myth to play the streams, it won't be an option, because we can
add 'micro-jumps' to get frame-exact.

Note that I have yet to see a PVR250 stream which is DVD compliant.  DVD
requires either an AC3 or PCM stream to be present, and I'm not aware of
any way to get such a thing from the PVR250.  I've yet to find an AC3
encoder which is really compliant (the one that comes with ffmpeg is not
compatible with my DVD player, and I've had to use commercial encoders in
Windows to get compliant streams).  Anyhow, that isn't really relevant as
it has nothing to do with the issue at hand, I just thought I'd mention
it.

.Geoff


More information about the mythtv-dev mailing list