Repository navigation
Lossless Video Editing
Edit (E) on a video or a sound file trims it, takes out its sound or turns it, without re-encoding anything: the video and sound are copied packet for packet into a new file - re-muxed - so nothing is lost and saving takes seconds rather than minutes. The website shows editing videos and sound; this page explains how the copy is made and where it stops.
Combining clips, adding titles and captions, or changing size or format means re-encoding, which is Movie mixer's work.
| Edit | Formats |
|---|---|
| Trim - the handles at each end of the scrubber, or I and O at the frame shown | Every format below |
| Remove the sound | Every video format below |
| Rotate left or right | The MP4 and QuickTime family: MP4, MOV, M4V and 3GP |
A copy is written in the file's own format when it is one of these: MP4, QuickTime (MOV), M4V, 3GP, M4A, Matroska (MKV), WebM, MPEG-TS, AVI, WMV, WMA, FLV, MP3, AAC, FLAC, Ogg, Opus, WAV and AIFF. Any other format FFmpeg reads, such as an MPEG program stream (MPG, VOB), is saved as an MP4 beside it, named <name>-edit.mp4. Save As offers the file's own format under each of its extensions, and MP4 wherever an MP4 can hold what the file holds.
A SID tune or a tracker module is a program rather than a recording, with no packets to copy, so Edit does not open one. Nothing is written until you save; the player shows the edit as it will be saved - the scrubber dims what the trim leaves out, playback stops where it ends, and the video plays silent or turned - and the status bar lists the changes.
A video is stored mostly as changes from the frames before it. Only its key frames are stored whole, and a copy that does not re-encode must start from one: a phone stores about one a second, a film one every few seconds.
- MP4 and QuickTime copies start on the exact frame you chose. The copy keeps the frames from the key frame before it, and an edit list in the file tells players to begin at your frame.
- Every other format has no edit list, so its copy starts at the key frame before your frame, and may begin a moment early. The panel says so.
The copy ends where you chose, after the frame shown. Sound is cut to the nearest of its packets, within a few hundredths of a second.
The copy keeps the file's tags, its XMP metadata, rating and tags, the chapters within the trim, its timecode, and its cover art where the format holds one. A subtitle file beside the video is left as it is.
A stream the format cannot hold - an Apple metadata track, a GoPro data track, a QuickTime file's cover - is left out. The panel names what would be left out before anything is saved, and what an MP4 would leave out besides, when Save As offers one.
Saving rebuilds a file's index, sizes and timestamps, so Save As with no changes makes a clean copy of a file whose structure is broken. Two save options shape a copy:
- Write MP4s with their index at the front moves an MP4's index before its media, so it starts playing while it downloads. A file that already had it there keeps it there.
- Attempt to fix damaged files reads on past what cannot be read, leaves out packets whose timing cannot be mended, and says what it left out and where the copy ends.
A file FFmpeg cannot read at all is said to be so, and is neither edited nor repaired.
A save is staged in a new file, which replaces the original only once it is complete. Until then it can be cancelled, and a cancelled or failed save leaves the original as it was.
- A file that cannot be read to its end fails, saying where, unless Attempt to fix damaged files is on.
- A file whose timing starts again part way - a recording, or clips joined end to end - fails, saying where.
- A repaired copy that left part of the file out replaces the original only behind a backup. Otherwise use Save As, or turn on the backup.
The backup. With When overwriting a file with irreversible changes make an original backup copy on, in Options, a save keeps the original beside the copy as <name>.original.<ext>, and never overwrites a backup already there.
- Edits do not re-encode, so they cannot crop, resize, change the frame rate or convert codecs.
- A trimmed copy in a format other than MP4 or QuickTime may begin up to a key frame early.
- A player that ignores MP4 edit lists shows the frames before the start you chose.
- Rotation sets the angle players turn the video by; a player that ignores it shows the video as it was recorded.
- One trim a file: Edit keeps one stretch, from one start to one end. To join stretches, use Movie mixer.
Using Diffractor
- Search reference
- Formats and codecs
- Metadata
- Name templates
- Faces
- Lossless video editing
- Movie projects (.dfv)
- Commodore 64
Automating
Behind the scenes