[mythtv] Lossless MPEG2 editing!

Nick Craig-Wood nick at craig-wood.com
Fri Jan 21 09:37:58 EST 2005


On Fri, Jan 21, 2005 at 07:08:35AM -0500, Cory Papenfuss wrote:
> 	The quick and most accurate answer is probably "No."  I'm not 
> completely sure what you're asking for.  A program for hand-editing out 
> commercials is avidemux... works pretty well.  It doesn't need to 
> reencode, but it can.

I tried the latest version from CVS and it can't open any of my DVB
files.  I guess this is because Mythtv doesn't always start them with
a pack.

gopchop says this about them

parse_MPEG2_program_stream @ 0(0.00%): expecting pack_start_code, got 0x00 0x00 0x01 0xE0
parse_MPEG2_program_stream @ 59433(0.00%): garbage data seen from 0 to 59433.
parse_MPEG2_program_stream @ 59433(0.00%): found long-lost pack_start_code

> 	Regarding lossless MPEG2 cutting, there are a number of issues:
> 
> - Funky MPEG2 streams... [snip]
> - GOP vs. non-GOP accurate edits [snip]
> - GOP length: [snip]
> - Sync: [snip]
>
> 	I'm sure I'm forgetting some things, but those are some that I've 
> run across.  If it were easy, it'd be done by now.... :)

The only editor I can say I've had 100% success with DVB recorded MPEG
streams is ProjectX.  I've tried avidemux, gopchop, replex, mpgtx, but
none of them either deal with the file or keep the sync properly.
Project X's speciality is damaged mpeg streams, and keeping the sync
correct.  It does GOP based editing.

  http://www.lucike.info/page_projectx.htm

Its java, so you'll need the sun jre if you want to try it on linux.
A hint for anyone who uses it: The cut window uses ->, SHIFT ->, CTRL
-> and ALT -> for skipping 1 frame, few seconds, ~ 15s, ~1 m - exactly
what you need for cutting commercials! (I had to read the source code
to discover this though ;-)

Its a bit slow, and an enormous memory hog, but does work.

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick


More information about the mythtv-dev mailing list