Skip to content


FFmpeg multiplexer

Register name used to load filter: ffmx
This filter may be automatically loaded during graph resolution.

Multiplexes files and open output protocols using FFmpeg.
See FFmpeg documentation ( for more details.
To list all supported multiplexers for your GPAC build, use gpac -h ffmx:*.This will list both supported output formats and protocols.
Output protocols are listed with Description: Output protocol, and the subclass name identifies the protocol scheme.
For example, if ffmx:rtmp is listed as output protocol, this means rtmp:// destination URLs are supported.

Some URL formats may not be sufficient to derive the multiplexing format, you must then use ffmt to specify the desired format.

Unlike other multiplexing filters in GPAC, this filter is a sink filter and does not produce any PID to be redirected in the graph.
The filter can however use template names for its output, using the first input PID to resolve the final name.
The filter watches the property FileNumber on incoming packets to create new files.

All PID properties prefixed with meta: will be added as metadata.


dst (cstr): location of destination file or remote URL
start (dbl, default: 0.0): set playback start offset. A negative value means percent of media duration with -1 equal to duration
speed (dbl, default: 1.0): set playback speed. If negative and start is 0, start is set to -1
ileave (frac, default: 1): interleave window duration in second, a value of 0 disable interleaving
nodisc (bool, default: false): ignore stream configuration changes while multiplexing, may result in broken streams
mime (cstr): set mime type for graph resolution
ffiles (bool, default: false): force complete files to be created for each segment in DASH modes
ffmt (str): force ffmpeg output format for the given URL
block_size (uint, default: 4096): block size used to read file when using avio context
keepts (bool, default: true): do not shift input timeline back to 0
* (str): any possible options defined for AVFormatContext and sub-classes (see gpac -hx ffmx and gpac -hx ffmx:*)