[mythtv] [PATCH] MPEG2->MPEG2 commercial cut (alpha verson 0.1)

Geoffrey Hausheer ou401cru02 at sneakemail.com
Fri Dec 12 15:48:35 EST 2003


On Fri, 12 Dec 2003 13:02:08 -0600, "Geoffrey Hausheer
ou401cru02-at-sneakemail.com |mythtv/1.0-Allow|"
<khm9hhqgzu0t at sneakemail.com> said:
> I am including a very primitive MPEG2 commercial cutting application.
> 
> After a week of learning about MPEG2 and several different approaches, I
> have one which shows promise.
> 
> This has the benefit that MPEG2-PS should work out
> of the box....
That should have been MPEG2-TS, i.e. DVB, and I now have one stream that
does indeed work well, so that is pretty cool.

Other things I forgot to mention:
The audio MUST be in mp2.  if it is in PCM, mpeg-layer1, mp3, or ac3, it
wont work (yet)
The current implementation should allow for doing processing on
vidoo/audio frames (if you can stand the quality loss).  this should
allow down-sampling, as well as audio conversion (mp2->ac3 seems like
it'd be useful...though as I said before I have yet to see an OS ac3
encoder that is fully compliant).  None of this is implemented yet, but
it shouldn't be hard.
Only 1 audio stream is currently supported.  If your stream has multiple
audio streams, all bets are off.
new A/V streams that begin (or end) in the middle of the mpg are not
allowed.

And in case it isn't obvious, there will be no quality loss from using
this app to clip commercials (assuming it is working correctly).  It
works on encoded frames, which are just sent from the demuxer to the
re-muxer after determining if clipping is needed.

The '-c' option is not required.  This app should be capable of turning
MPEG2-TS into MPEG2-PS without any clipping.

Oh well, that's enough propoganda for now.

.Geoff


More information about the mythtv-dev mailing list