PDA

View Full Version : How to cut commercials from extracted .mpg?



malefactor
10-21-2002, 12:38 PM
I'm 90% of the way there.

Using various combos of TMPGenc, xmuxer, mplex, tytool5, winamp, etc, I can successfully yank multiplexed mpeg2 video from my Tivo.

It is, however, BIG. ~4gig/hour. At this size, cutting away commercials is not only convenient, it helps on the space problem.

I can't, though, find a way to cut commercials out of an mpg2 stream without re-encoding (and losing quality most likely). I've tried taking mpg2 down to mpg1; I've tried taking high quality (high bandwidth) mpeg2 and reencoding into divx 3/5; etc.. Always, the quality takes a hit and it takes forever to do it.

Virtualdub looked promising with its 'direct stream copy' mode, which is why i tried using mpg1, but it didn't work.

What am I missing? Surely there must be a tool that could help me cut pieces out of an mpg2 file? Suggestions?

As an aside, it seems like a properly tweaked TMPGenc can reencode the tivo files (with no changes to size/quality/etc) with very minimal (to my eye) quality loss, but drop the size by half.

Thanks in advance.

malefactor

lmurray
10-21-2002, 01:51 PM
i'm sure u'll get a lot of suggestions here. I personally use the MPEG tools option from TMPGEnc (in the File menu).

I select the mege and cut option, and add the mpeg. Then goto edit, and cut the commercial. I've heard some people say that they have sync problems using this, but it's worked well for me.

http://nickyguides.digital-digest.com/cut-join-mpeg.htm

Check that website out for a more detailed description.

enjoy
-lloyd-

chjones
10-23-2002, 01:19 AM
I've found two decent ways to do it, both somewhat time consuming and less-than-satisfactory. The first is what lmurray mentions above; the problem I end up with is that the resultant mpeg file is somehow not to spec (why? because Windows Media Player searches for a codec, has an error, and then plays the file just fine.) Entire process=~20 minutes. It doesn't transcode the video, so quality should be almost exactly the same. Don't expect perfection, though.

The second way I've done it is in VirtualDub--it's a bit long and drawn out, but essentially I use GordianKnot to set up a frameserver (but NOT encode) and get ideal bitrates (see doom9.org's guide to Gordian Knot). If you simply encode, you're likely to not get keyframes at spots you want them (i.e., at commercial breaks). I'm working on that one. For now, having a plethora of hard disk space, I'm doing lossless "compression" into Huffyuv's codec---getting about 25GB per hour (yes, 25, not 2.5). Then I do the editing (every frame's a keyframe!) and encode into DivX 5 pro (using settings garnered from Gordian, but just using Virtual dub). Entire process (mostly due to all the hard disk writing and then transcoding)=~6h per hour of video. YMMV. Quality is less, but not really noticable unless I'm looking for it. File size gives me about 1cd/hour, and bitrate is in the range of 1500kbps. Note that this is way more complicated than it should be; I'm still working on other alternatives.
CDJ