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

Geoffrey Hausheer ou401cru02 at sneakemail.com
Wed Dec 17 09:27:02 EST 2003


Here is a second version of my MPEG2->MPEG2 commercial-cutting program.

It once again requires CVS ffmpeg (or at least libavformat from CVS), as
that contains a patch I submitted to allow encodingof ac3 audio to work.

New features:
ac3 streams are now supported
DVB/HDTV streams are now supported (MPEG-TS)
audio/video syncing has been implemented
streams with broken frames should work ok.

Known issues:
There may still be issues with the last frame or 2 of video.
The code is still a real mess
For some reason, parsing ac3 VOBs doesn't work right.

In general, I think this release is working pretty well.

My plans are to rewrite this tool in c++ and incorporate it into
mythtranscode.
With x-mas coming up, that's probably a week or two out.

Build directions:
untar the archive somewhere
get the cvs version of ffpmeg (ffmpeg.sf.net)
build ffmpeg (or at least libav*)
modify the Makefile and set LIBAV to point at your ffmpeg root dir. 
make

Usage:
./mpeg2cut -i <infile> -o <outfile> -c "<cutlist>"

The cutlist is specified as a space separated list of start-end pairs
(separated by a '-')
for example:
./mpeg2cut -i /varlib/myth/3_20031212120000_20031212123000.nuv -o
test.mpg -c "0-179 300-500 50000-999999"
(note the frames for the cutlist are the actual frame numbers, not the
gop/keyframe count)

Feel free to test it. I am now open to any bug-reports.

.Geoff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpeg2cut-0.2.tgz
Type: application/x-gtar
Size: 7889 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031217/21dc9a96/mpeg2cut-0.2.tgz


More information about the mythtv-dev mailing list