VionetoVioneto
Back to the magazine

VIONETO MAGAZINE Playback & technology

When you can join videos without re-encoding

Two MP4 files are not automatically compatible for a lossless merge. A separate FFmpeg test reveals the basic case and its limitations.

An orange and a Turkish film strip join end-to-end to form a continuous strip.
Matching clip boundaries can be combined into a single file. The film strips illustrate the principle.Image: Vioneto · AI-generated illustration

Entire clips can be concatenated together without re-encoding their video stream under suitable conditions. In FFmpeg, this is called streamcopy—copying the already-encoded data. For this to work, the source files must be compatible with each other and with the output container. Simply having both file names end in .mp4 is not sufficient as a check.

First, compare the tracks.

The FFmpeg Concat demuxer reads a list of files and sequentially arranges their packets. The documentation requires that the streams match exactly, including compatible codecs and time bases. Therefore, check beforehand whether the segments contain comparable video and, if applicable, audio streams. Different resolutions, frame rates, or codec settings are warning signs that warrant a more detailed inspection.

FFmpeg: Requirements of the Concat Demuxer

For a typical project involving SmartphoneClip, screen recordings, and separate audio, a shared export from the editing software is often a clearer and more organized approach. There, you can intentionally set image format, transitions, and volume levels. Streamcopy does not apply image filters or overlays. Additionally, selecting the appropriate starting point for a clip segment within a longer video is a different task than the file concatenation demonstrated here.

FFmpeg: What streamcopy copies and what limitations apply

Our simple test with two silent clips

For this article, on November 12, 2026, we used FFmpeg 8.0.1 to generate two custom synthetic clips: two seconds of red area and two seconds of blue area, each with dimensions 320 × 180 pixels, H.264 codec, 25 frames per second, and identical encoding settings. Both files contained only a single video stream. This test deliberately examines a simple, straightforward case.

The liste.txt file contained two lines: file 'teil-1.mp4' and file 'teil-2.mp4'. These names referred to our own clips in the same directory. In this directory, we executed the following command:

ffmpeg -f concat -i liste.txt -map 0:v:0 -c copy zusammen.mp4

The list defines the order. Here, -map 0:v:0 specifically selects the first video stream; -c copy copies it without re-encoding. This command includes no audio. For your own test, use a new output file with simple local filenames. Always verify a file list from an external source before using it as input.

What was actually assessed in the outcome

FFprobe reported a duration of four seconds and 100 decoded image frames. Additionally, we compared the decoded frames against both input sources: the first 50 matched the red clip, and the next 50 matched the blue clip. Full decoding completed without errors. This demonstrates the frame sequence of this test; it does not guarantee compatibility with arbitrary files, additional audio tracks, or every player.

Download the transition and the final file

  1. Play the connection directly before and after the join. Watch out for an unintended jump, black frames, and a wrong start of the second segment.
  2. When working with audio material, additionally verify the track selection, gaps, and synchronization. Mismatched stream lengths or incorrect duration values can affect the transition.
  3. Open the final file in the intended playback environment. A locally compatible file does not ensure successful processing in future stages.
  4. Keep the original files and their order. For transitions, new overlays, or a different image composition, a properly edited export is needed.

Separate project file, raw material, and export

Check frame rates and time stamps before exporting

Topics

Sources and further reading

  1. https://ffmpeg.org/ffmpeg-formats.html#concat
  2. https://ffmpeg.org/ffmpeg.html#Streamcopy