[mythtv] A prelude to transcoding MPEG2->MPEG2
James L. Paul
james at mauibay.net
Mon Dec 8 18:36:43 EST 2003
-----BEGIN PGP SIGNED MESSAGE-----
On Monday 08 December 2003 12:47, Geoffrey Hausheer wrote:
> 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's not true that only AC3 and PCM are DVD-Video compliant. The common mp2
audio that we have is also well supported. There are the compliant types of
audio streams for DVD-Video:
* Dolby Digital (AC-3): 1 to 5.1 channels
* MPEG-2 audio: 1 to 5.1 or 7.1 channels
* PCM: 1 to 8 channels.
Assuming I use a compliant video resolution and bitrate, and compliant audio
frequency and rate, I believe the output of the PVR250 is acceptably
DVD-Video compliant. :) My practical results with a variety of standalone
players reflects this as well, so far. :)
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the mythtv-dev