This tool is used for people wanting to take sections out of MPEG2-PS files without re-encoding the resulting frames. The idea is to write specific "Group of Pictures" (GOP) sections to a new MPEG2-PS file. These GOPs will decode correctly (in theory), and the gaps won't be noticed.
I wrote this tool to edit commercials out of MPEG2 files produced by my KFir MPEG2 capture card. Using this tool for anything else is really beyond the scope of its design.
This is a *LOSSY* process on MPEGs that have open GOPs. To close a GOP, I must toss B-Frames at the start of a GOP. If you were to mark each frame in an MPEG for splicing in gopchop, you would end up with fewer frames than you started with. To "close" an open GOP, I must toss those B-Frames. To stop this behavior, uncheck the "Drop Orphaned Frames" option in the "Preferences" window.
The basic way to use gopchop is like so:
If you want to save different clips, select "Edit / Clear" and start over at step 3. If you want to use a different source MPEG2, select "File / Close" and start over at step 1.
I scan the MPEG2 for a full list of System packets, then examine the Program Element Stream packets they contain. In the video PES, I look for GOP headers (and Picture headers). Each GOP is then mapped back to the System packets that contain it (a full GOP can span multiple VES packets, and multiple System packets). When a GOP is saved to a new file, the entire System packet list for that GOP is written as a byte-for-byte copy from the source MPEG2. In theory, this will take any audio streams along for the ride. So far, so good. :)
In the "Info" box, the "Offset" column shows the system packet offset (for GOPs) and the video packet offset (for Pictures). The "Bytes" column lists the bytes contained by all the system packets (for the GOP), and all the video packets in a Picture. You'll notice that the Offset plus the Bytes don't add up to the next Picture's Offset. This is because there is stuff between the video packets. :) The GOP "Bytes" and "Offset", however, should add up to the next GOP's "Offset" value.
The settings under the "Preferences" window are automatically saved to ".gopchop/options" in your home directory.
http://www.videohelp.com/forum/archive/t281705.html
> Back in Linux, I use gopchop to edit out the commercials. GOP-level editors > are nice in that you don't need to reencode your edits. I save each segment > to a separate mpeg, because I found if I combined them, I'd get sync issues > later on. These separate files will simply become "chapters" on the dvd.
dvbcut is very good at chopping pieces out of .mpg files AND retaining audio-video sync. It can also splice between key frames. It is a very simple interface/gui. While what it does is limited - what it does do, it does extremely well.
oldcpu posted 2006 Aug 18