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 (https://ffmpeg.org/documentation.html) 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.
The proto flag will disable FFmpeg muxer and use GPAC instead. Default format is MPEG-2 TS and can be specified using ext or mime.
Example
gpac -i SRC -o srt://127.0.0.1:1234:gpac:proto[:ext=mp4:frag]This will use the SRT protocol handler but GPAC m2ts multiplexer or mp4 muxer if `ext=mp4:frag` is set
Options¶
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
proto (bool, default: false): use protocol only: do not try to mux (useful when sending a SRT stream with remuxing)
psleep (uint, default: 1000): in protocol only mode, sleep for given amount of ms before EOS (do not kill connection right away for some protocols)
* (str): any possible options defined for AVFormatContext and sub-classes (see gpac -hx ffmx and gpac -hx ffmx:*)