Mar 1, 2024 · Updated Oct 14, 2026

<span aria-hidden="true" id="major-performance-improvements-for-audio-and-video-concatenation"></span>

# Major performance improvements for audio and video concatenation

![Tim Koschützki](/assets/images/teammates/avatar-tim-kos-1.jpg)

**Tim Koschützki**

Co-founder · Berlin, Germany · Show bio

[](https://x.com/tim%5Fkos)[](https://github.com/tim-kos)

We have recently updated our audio and video concatenation Robots to make use of FFmpeg's [concat demuxer](https://trac.ffmpeg.org/wiki/Concatenate#demuxer), resulting in a significant improvement in performance for applicable Assemblies.

For Assemblies to take advantage of the new demuxer, the input files need to meet the following conditions:

* Use the same container format (e.g. all MP4s).
* Use the same codecs for their streams (e.g. H.264 for video and AAC for audio).
* Have the same codec parameters (such as resolution, frame rate for video, or sample rate for audio).

![Transloadit Robots working together to form an Assembly](/_next/static/immutable/media/assembly-line@2x.373f9uwk_w_zu.png)

<span aria-hidden="true" id="why-its-much-faster"></span>

## Why it's much faster

Concatenating with the concat demuxer is much faster than using complex filters and retranscoding for several reasons:

<span aria-hidden="true" id="no-re-encoding-required"></span>

### No re-encoding required

When using the concat demuxer with `-c copy`, FFmpeg doesn't need to decode and then re-encode the streams. Re-encoding is a CPU-intensive process that can significantly increase Assembly execution time, especially for Assemblies processing high-resolution video. By avoiding this step, the concat demuxer avoids unnecessarily re-encoding the files, completing the Assembly much faster.

<span aria-hidden="true" id="direct-data-copying"></span>

### Direct data copying

The concat demuxer essentially allows FFmpeg to directly copy the media data from the source files to the output file. Since there's minimal processing involved (other than parsing the file headers and adjusting timestamps), the operation is limited primarily by the speed of the storage media.

<span aria-hidden="true" id="preserves-quality"></span>

### Preserves quality

Since there's no re-encoding, there's also no quality loss from compression artifacts that might be introduced during the encoding process. This is an added benefit beyond the speed improvement.

In contrast, using complex filters or re-encoding requires FFmpeg to fully decode all streams, process them (which might include scaling, filtering, or other transformations), and then re-encode them into the target format. This not only takes more time but can also degrade quality and increase file size.

This approach is similar to [LosslessCut](https://github.com/mifi/lossless-cut), an open-source video editor created by our own Transloadian [Mikael Finstad](/about.md#mikael). LosslessCut also uses FFmpeg's concat demuxer for fast, lossless video editing.

***

To make the most of this change, make sure to first transcode differing input files to the same container, stream codecs and codec parameters, including video resolution and frame rate and audio sample rate. For best performance here, use `turbo: true` and one of our [presets](/docs/presets/video.md). With both of these, you can greatly improve execution time on your existing Assemblies.

If input files already meet all the matching container, stream codec and codec parameter conditions above, there is no need to add any additional encoding Steps as you should already be noticing the performance improvements by default. However if your files may differ in container, stream codecs or codec parameters (including resolution, frame rate or sample rate), we recommend adding a [/file/filter](/docs/robots/file-filter.md) Step to pass outlier files to an encoding Step, so that you can get the most out of your later concatenation Steps.

[#api](/blog/tags/api.md)[#assembly](/blog/tags/assembly.md)[#workflow](/blog/tags/workflow.md)[#file-filter-robot](/blog/tags/file-filter-robot.md)

### Join 25k+ developers

Sign up for our [monthly newsletter](/newsletters.md) to receive direct links to 3 exclusive tech — and 2 product updates. No less, no more.

Email address

Subscribe

One email a month. Unsubscribe anytime.

## File uploading and encoding. Made simple.

Trusted by Coursera and The New York Times for a reliable API, top-notch support, and open source like [Uppy](https://uppy.io) and [Tus](https://tus.io).

[Try it free](/c/signup/)[Request a demo](/request-demo.md)

No credit card needed · Cancel anytime
