This is an old revision of the document!
If you are editing a file with variable bitrate audio, run Audio→Build VBR Time Map before you do any editing. Otherwise your audio will be out of sync.
Video edits are done inside of marked sections, from the start and end of a selection. Markers A and B are used to set the start and end of a sequence. You can set them using the and
buttons.
You can also jump to marker A or B using the Go→Go to Marker A or Go→Go to Marker B menu entries.
Marker positions are also displayed at the bottom of the screen, under the Selection section:
Obviously, marker A can't come after marker B. If you try to set marker A to a frame after marker B, Avidemux will set marker B to that point, and marker A to the frame after where marker B used to be. So, for example, if marker A is at frame 0 and marker B is at frame 10, then you set marker A to frame 20, Avidemux will actually put marker A at frame 11 and marker B at frame 20.
You can save part of a stream by going to File→Save→Save Video. Every frame from marker A to marker B will be saved, excluding the frame at marker B. Mathematically speaking, the set of frames saved is [A,B).
The Edit→Delete menu entry will remove frames from [A,B) from the stream. It can be used, for example, to remove commercials from a video capture. Avidemux will make sure to keep the audio in the stream in sync with the video, unless you have an external audio source.
When doing cutting or deleting, if the video has an external audio source, Avidemux will not cut sections of the external audio to synchronize or match the video timing.
There are two options for getting your external audio source to sync properly with Avidemux when you are cutting/deleting video frames:
This section only applies when video is in copy mode (encoder is set to Copy). In process mode (an encoder is selected for encoding), Avidemux internals ensure everything is alright.
Warning: When Format is set to “AVI, unpack VOP”, Avidemux will use copy mode for all frames (including the “broken” ones) even if a video encoder is selected for encoding. SmartCopy mode will not work either, because SmartCopy needs to re-encode the broken frames.
Usually, each frame of video isn't that different from the one before(nbsp)(ndash) someone's mouth moves a bit, the background shifts around, etc. Most video codecs use this fact to save space, by saving a complete frame every few seconds, and making the other frames simply a modification of the reference frame. Complete frames are referred to as Intra frames, or sometimes I-frames or keyframes.
Markers don't have to be at key frames, so your stream might look like this:
abAdeIghBjklInop
Where lowercase letters are intermediate frames, A and B are marked frames, and I is an intra frame. When you cut frames [A,B), you will end up with:
abjklInop
Where frames jkl are broken, because they specify changes relative to an I-frame that no longer exists. There are two ways of dealing with that:
Frames can be copied and pasted by doing Ctrl-C and Ctrl-V. When copying, you must make sure the first frame you copy is an I-frame; when pasting, the frame after the insert point must be I-frame. Smart copy will work in that case, but not with streams containing B-frames.
1. If you are editing a file with variable bitrate audio, run Audio→Build VBR Time Map before you do any editing. Otherwise your audio will be out of sync.
2. Use the Marker A button to set the start of what you want to edit.
3. Use the Mark B buttons to set the end of what you want to edit.
You can confirm the start and end edit positions the frame displayed at the bottom of the screen, under the Selection section:
4. The Edit→Delete menu entry will remove frames from [A,B) from the stream.
5. Save the video with the section deleted. You can use the menu File→Save→Save Video. You may be able to use Video Copy and Audio Copy modes to do this edit, but you may not and you may have to encode the video.
Using File→AVI Muxer Options, you can specify a file size in megabytes. Each time that file size is reached and an intra frame is present, Avidemux will create a new file. You will end up with foo.avi.1, foo.avi.2 etc.
As the new file must begin at an I-frame, the file size you specify is only accurate to within about 5 megabytes.