Skip to content

mp4Combine

ameci-iis edited this page Apr 5, 2024 · 1 revision

About

The mmtisobmff repository provides a command-line program that takes multiple MP4 files as input and combines them into a single output MP4 file.

How to build

To build mp4Combine set mmtisobmff_BUILD_BINARIES variable while configuring the project using CMake :

$ cmake -S mmtisobmff -B build -DCMAKE_BUILD_TYPE=Release -Dmmtisobmff_BUILD_BINARIES=ON

Read build instructions to learn how to configure and build the project.

If the build process is successfully finished, mp4Combine can be found in the build/bin folder

Usage

$ build/bin/mp4Combine -if <Input1-URI> [-t <trackIndex0> ... -t <trackIndexN>] ... -if <InputM-URI> [-t <trackIndex0> ... -t <trackIndexN>] -of <OutputFile-URI>

Arguments

-if <path to input file>
relative or absolute path to an input MP4 file. User can specify an arbitrary number of input file URIs
-t <path to input file>
The index of the track(s) in the specified input file (0-based). If the index is not explicitely specified, all tracks of the input file are used
-of <path to input file>
URI of the mp4 out file.

Example

mp4Combine -if input1.mp4 -t 0 -t 2 -if input2.mp4 -if input3.mp4 -t 1 -of output.mp4

The example above takes 3 input files "input1.mp4", "input2.mp4" and "input3.mp4" and remuxes the first and third track from "input1.mp4", all tracks from "input2.mp4" and the second track for "input3.mp4" into the output file "output.mp4".