Media Converter

Tools

FAQ

Loading

How to Trim, Split and Merge Videos Without Re-encoding

Updated

Cutting a few seconds off a video sounds like it should be instant and lossless, and sometimes it is. Other times the tool decodes and re-compresses the whole clip, which takes longer and costs a little quality. The difference comes down to two techniques, stream copy and re-encoding, and to how compressed video is built out of keyframes.

This guide explains both, shows when a lossless cut is possible, and is upfront about which of our tools copy streams and which re-encode.

Stream copy vs re-encoding

Stream copy (also called remuxing, or passthrough) takes the already-compressed video and audio packets and writes them into a new file without decoding them. It is very fast, because no compression happens, and it is lossless, because the packets are bit-for-bit identical to the original. Its limitation is that you can only keep or discard whole packets; you cannot change the codec, resolution, bitrate or orientation of the pixels.

Re-encoding decodes the video to individual frames and compresses them again. It is slower, and with lossy codecs every re-encode discards a little more detail, but it can start and end on any frame and can change anything about the video.

Why lossless cuts snap to keyframes

Modern codecs do not store every frame as a complete picture. A keyframe (I-frame) is a full image; the frames after it mostly store only what changed, referring back to earlier frames. A group of frames that starts with a keyframe is called a GOP, and in phone and camera footage a keyframe typically appears every one to a few seconds.

A frame in the middle of a GOP cannot be displayed without the frames it depends on. So a stream-copy cut can only start cleanly on a keyframe. Tools that cut losslessly either move your start point to the nearest keyframe, which is why the cut can land a second or two away from where you asked, or include the earlier frames and hide them, which some players ignore. Ending a clip is easier, because you can stop after any frame.

Some editors use smart rendering: they re-encode only the few frames between your cut point and the next keyframe and stream-copy the rest. That gives frame accuracy with almost no quality loss, but it requires careful matching of the encoder settings to the original.

Merging without re-encoding

Joining files by stream copy works only when every clip has the same codec, resolution, frame rate, pixel format and audio format, for example several clips recorded back to back on the same camera. If anything differs, such as a phone clip joined to a screen recording, the parts have to be re-encoded to a common format, and the tool has to decide how to handle different sizes, usually by adding black bars.

What our tools do

All of these run in your browser, so the file is not uploaded. Here is how each handles re-encoding on its main engine, which uses your browser's built-in WebCodecs support. When a browser cannot process a particular file that way, the tools fall back to a WebAssembly build of ffmpeg, which re-encodes the video.

  • Video Cutter, Trim mode: when the part you keep starts at the very beginning of the video and the output format supports the source codecs, the video and audio are stream-copied. When the kept part starts later, the video is re-encoded, which makes the cut frame-accurate rather than snapping to a keyframe; the audio is re-encoded too.
  • Video Cutter, Cut mode (removing a section from the middle): both remaining pieces are re-encoded with the same settings and then joined without a further re-encode. If the removed section touches the start or end, it behaves like a trim.
  • Video Splitter: each part is produced as a separate trim, so the first part can be stream-copied and every later part is re-encoded. You can split by number of parts, by duration, or at custom points, with MP4, MOV, MKV or WebM output.
  • Merging: the Video Merger opens the Video Editor, where you arrange clips on a timeline. Export always renders a new video at the resolution, frame rate and bitrate you choose, so clips with different sizes or codecs can be combined.
  • Video Rotator: in the classic rotator, rotating an MP4 or MOV whose codec that container supports is done without re-encoding, by setting the rotation flag the player reads. Flips, rotation to MKV or WebM output, and every rotation the AI assistant makes re-encode the pixels.

Keeping quality when a re-encode is unavoidable

A single re-encode at a sensible bitrate is very hard to see. Quality problems come from repeating the process, or from squeezing the bitrate too low.

  • Cut from the original file, not from an export of an export.
  • Do all your trimming in one pass where you can, rather than trimming, then splitting, then trimming again.
  • Keep the output resolution the same as the source unless you also want a smaller file.
  • Choose the same container as the source when you do not need a different one; that gives the tool the best chance of copying streams where possible.

When you need a fully lossless keyframe cut

If you have a very long recording and want to lop off the start without touching the rest, a desktop tool that works purely by stream copy is the right choice. The open-source LosslessCut app is built for this, and the ffmpeg command line can do it with its copy option, for example: ffmpeg -ss 00:01:00 -i input.mp4 -t 30 -c copy output.mp4. Expect the start to snap to the nearest keyframe before the time you give.

For everyday clips, where frame accuracy matters more than avoiding one re-encode, the Video Cutter is quicker to use and needs no installation. To reduce size at the same time, finish with the Video Compressor.

Tools used in this guide

Frequently Asked Questions

01

Does trimming a video reduce its quality?

Not if the tool uses stream copy, which is lossless. If it re-encodes, there is a small loss that is very hard to see at a sensible bitrate, in exchange for a frame-accurate cut.

02

Why does my lossless cut start a little early?

Stream-copy cuts can only start on a keyframe, so the tool moves the start back to the nearest keyframe before the point you chose.

03

Can I merge videos with different resolutions?

Yes, but they must be re-encoded to a common format. In the Video Editor, the export renders every clip at the resolution you choose.