Gopdit
(Version 0.2.9)
Introduction
gopdit (GOP accurate editor) is a simple program that
allows you to cut and merge MPEG2-PS files at GOP boundaries without
reencoding. That's
it. No other file types! No other operations! Its use is mainly
for removing commercials out of tv recordings.
The state of this program is more or less beta. It is usable, when you
know, what works and when you have MPEG2 files like the ones I use.
The interface isn't much tested yet. So if you are doing something
unexpected - and currently nearly everything is unexpected - this could
result in strange behaviour!
As for MPEG2 file formats - currently I work only with two different
types resulting from ATI and Hauppauge encoders. So I don't know, how
this program will behave on other formats. Encoders that encode with closed GOPs are preferable, because
the resulting transitions are usually smoother.
The program can also be called without X.
Please tell me (Reinhard.Enders@gmx.de) about your suggestions,
program errors and strange behaviour!
Usage
- open a mpeg2 file (file -> open ... )
- navigate to the beginning of your wanted clip (via playing,
scrolling, keyboard accelerators)
- click the 'clip begin' button left below the clip table
- navigate to the end of your wanted clip
- click the 'clip end' button right below the clip table - the clip
will now appear in the table
- you can repeat steps 2-5 or 1-5
- save the concatenated clips to a new mpeg2 file (file -> save
as ...)
Using the keyboard
instead of mouseclicks usually improves your navigation speed (after
you get used to it) - i.e. you can keep the arrow keys pressed for
scrolling forwards and backwards.

Description
- Movie
Screen - the screen where images are displayed has reduced pal
dimensions - so other standards are distorted. If your system doesn't
have the xvlib extension working,
you might only see the upper left part of the recorded pictures.
- Play
Control - the usual control buttons: stop, play/pause, one gop
backward, one gop forward
- Clip Table
- a table that contains the selected clips
- Clip
- beginning, end and mpeg file are displayed
- single clicking will just select the field for possible
replacement
- double clicking the beginning or end field of a clip will move
the current position to the beginning or end of this clip (you might to
have zoomed in a bit for obtaining the exact position)
- Clip Begin
- mark the current position as the beginning of a new clip
- Clip End
- mark the current position as the end of the current clip and insert
it into the clip table
- Clip
Replace
- replaces the content of a selected begin or end field of a clip
with the current position
- Movie
Slider - allows navigation inside the movie; its range depends
on the current zoom level. Be aware that you can also use the keyboard for moving the slider
- Zoom
Control - control buttons for toggling zoom, zooming in and
zooming
out
- Movie
Selector - allows to change between the mpeg2 files that are
currently open
- Menu
- File
- Open... open a new
mpeg2 file
- Close close the
current mpeg2 file - as a side effect all clips in the clip table are
removed
- Save concatenate all
the clips and save them in the current save file (if defined)
- Save As... select a
file and save the concatenated clips
- Import... import an editlist
- Export As... export
an editlist
- Exit exit the program
- Edit
- Cut cuts the selected
clips
- Copy copies the
selected clips
- Paste pastes the cut
or copied clips
- Toggle Zoom
- Zoom In
- Zoom Out
- Preferences... edit
your preferences
- Help
- Contents...
diplays this help file
- About displays
general program information
Preferences
Currently there are four preference tabs:
- General
- Time Scale, time is
multiplied by this parameter value before it is displayed (can be used,
when the time scale of another program (like xine) doesn't agree with
gopdit.
- Split before actual frame, if
checked, the
spliting point is located at the gop before the actual frame
- Show only I-frames if checked,
only I-frames are shown. As
fewer images
are displayed, the traffic is substantially reduced, which might be
useful for wireless remote usage.
- Display file offset instead of time:
when true, display the raw byte offset, otherwise it displayes the time
information it finds in the gop data structure.
- Number of zoom steps when togglig: number of
zoom steps, when zoom is toggled
- Postprocessing - as the cut and
merge
operations might result in bad files (depending on the actual MPEG-2
multiplexing), it might be a good idea to add some post processing
filter (i.e. mencoder).
- Save clips separately,
when checked, Save and Save As... save each clip to a different file.
These files are numbered, starting with 00.
- Adjust GOP timing, a
simple filter that adjusts the timing information of the GOP block
(currently not recommended, as it seems to corrupt files)
- Activate postprocessing filter, if
checked executes
the filter command below
- Postprocessing filter command: any
filter you like.
The input of the filter must be stdin,
the output must be written to a file. The file name is indicated by "%s". See the default value for
calling mencoder as an example. (Note that you have to install mplayer,
if
you want to use that filter!) The following formal parameters can be
used in the command:
- $FILE_OUT the name of the
output file (same as %s above)
- $FILE_LENGTH the size in
bytes of the concatenated clips (before postprocessing)
- Edit
Lists
- Edit Point Adjustment when
reading in an edit file, time points can be adjusted by this value
- Display Commercials if
selected,
there will be a clip of any time point pair - no distinction, if it's
the beginning or ending of a "non-commercial" clip
- Suppress when in 'Display
Commercials' mode, clips shorter than this parameter value aren't
created
- Color Mark Clips if selected,
there
will be a color pixmap displayed with each clip. The color of the clip
depends on the clip length (available colors are red, yellow and
green). Which color is displayed depends on the length of the clip and
the valud of the parameters defined below.
- Red clips shorter than this
parameter value are displayed in red
- Yellow clips shorter than this
parameter value (and larger than RED)
are displaye in yellow. Clips long than this parameter value are
displayed in green.
- Miscellaneous
- Adjust File MTime the timestamp of
the output mpeg file is modified to the recording time (in contrast to
the editing time, which is the default)
- Mpeg File Extensions you can you can define your
preferred file extensions for MPEG-2 files, which will show up in the
file selector dialogs. The format is the usual QT-style: lines are
separated by two semicolons (beware of superfluous blanks).
- Edit List File Extensions you can define your
preferred file extensions for importing edit list files, which will
show up in the
file selector dialogs. The format is the usual QT-style: lines are
separated by two semicolons (beware of superfluous blanks).
Control Keys
Playing:
- b play one gop backward
- f play one gop
forward
- <space>
play/pause
Slider
(has to have the focus):
- <left> move
backward
- <right> move
forward:
- <page up>
move backward fast
- <page down>
move forward fast
Clip table:
- <del> delete
the selected clips
- <ins> insert
copied clips at the end of the clip list
- <up> move
a selected clip upward
- <down> move
a selected clip downward
- r replace the
content of the selected begin or end field of a clip with the current
gop
Clip selection:
- [ mark current gop
as clip begin
- ] mark current gop
as clip end and enter the clip into the clip table
Zooming:
- z toggle zoom
- + zoom in one step
- - zoom out
one step
Miscellaneous:
In order to speed up the search for the correct cut point, you can zoom in: the slider will then range
over a smaller section of the
file.
The numbers displayed aren't really GOP or picture numbers, they are
simply file offsets divided by 1000000. They should give you some
idea of where you are.
The time displayed is just the time found in the GOP structure.
Scriptable Version
There is also the possibility to call gopdit without firing up X:
# gopdit [<options>] -x
[<mpegin>] <editlist> <mpegout>
<editlist> and <mpegout> can be replaces by '-' for stdin and stdout respectively.
When calling gopdit with -x,
parameters are read from .gopditrc, but can be overriden by options
(see gopdit -h). When <mpegin> isn't specified, the
<editlist> must contain
commands for opening mpeg files.
Personal/Financial Notes
If you're already a PayPal member, and find gopdit really
useful, you could donate a small sum of money, for which I would be
extremely grateful (see also the gopdit homepage:
"http://gopdit.ath.cx").
Reinhard.Enders@gmx.de