mp4dmx
ISOBMFF/QT demultiplexer¶
Register name used to load filter: mp4dmx
This filter may be automatically loaded during graph resolution.
This filter demultiplexes ISOBMF and QT files.
Input ISOBMFF/QT can be regular or fragmented, and available as files or as raw bytestream.
Track Selection¶
The filter can use fragment identifiers of source to select a single track for playback. The allowed fragments are:
- #audio: only use the first audio track
- #video: only use the first video track
- #auxv: only use the first auxiliary video track
- #pict: only use the first picture track
- #text: only use the first text track
- #trackID=VAL: only use the track with given ID
- #itemID=VAL: only use the item with given ID
- #ID=VAL: only use the track/item with given ID
- #VAL: only use the track/item with given ID
Scalable Tracks¶
When scalable tracks are present in a file, the reader can operate in 3 modes using smode option:
- smode=single: resolves all extractors to extract a single bitstream from a scalable set. The highest level is used
In this mode, there is no enhancement decoder config, only a base one resulting from the merge of the layers configurations
- smode=split: all extractors are removed and every track of the scalable set is declared. In this mode, each enhancement track has no base decoder config
and an enhancement decoder config.
- smode=splitx: extractors are kept in the bitstream, and every track of the scalable set is declared. In this mode, each enhancement track has a base decoder config
(copied from base) and an enhancement decoder config. This is mostly used for DASHing content.
Warning: smode=splitx will result in extractor NAL units still present in the output bitstream, which shall only be true if the output is ISOBMFF based
Options¶
src (cstr): local file name of source content (only used when explicitly loading the filter)
allt (bool, default: false): load all tracks even if unknown media type
edits (enum, default: auto): do not use edit lists
- auto: track delay and no edit list when possible
- no: ignore edit list
- strict: use edit list even if only signaling a delay
itt (bool, default: false): convert all items of root meta into a single PID
itemid (bool, default: true): keep item IDs in PID properties
smode (enum, default: split): load mode for scalable/tile tracks
- split: each track is declared, extractors are removed
- splitx: each track is declared, extractors are kept
- single: a single track is declared (highest level for scalable, tile base for tiling)
alltk (bool, default: false): declare disabled tracks
frame_size (uint, default: 1024): frame size for raw audio samples (dispatches frame_size samples per packet)
expart (bool, default: false): expose cover art as a dedicated video PID
sigfrag (bool, default: false): signal fragment and segment boundaries of source on output packets, fails if source is not fragmented
tkid (str): declare only track based on given param
- integer value: declares track with the given ID
- audio: declares first audio track
- video: declares first video track
- 4CC: declares first track with matching 4CC for handler type
stsd (uint, default: 0): only extract sample mapped to the given sample description index (0 means extract all)
nocrypt (bool): signal encrypted tracks as non encrypted (mostly used for export)
mstore_size (uint, default: 1000000): target buffer size in bytes when reading from memory stream (pipe etc...)
mstore_purge (uint, default: 50000): minimum size in bytes between memory purges when reading from memory stream, 0 means purge as soon as possible
mstore_samples (uint, default: 50): minimum number of samples to be present before purging sample tables when reading from memory stream (pipe etc...), 0 means purge as soon as possible
strtxt (bool, default: false): load text tracks (apple/tx3g) as MPEG-4 streaming text tracks
xps_check (enum, default: auto): parameter sets extraction mode from AVC/HEVC/VVC samples
- keep: do not inspect sample (assumes input file is compliant when generating DASH/HLS/CMAF)
- rem: removes all inband xPS and notify configuration changes accordingly
- auto: resolves to
keep
forsmode=splitx
(dasher mode),rem
otherwise
nodata (enum, default: no): control sample data loading
- no: regular load
- yes: skip data loading
- fake: allocate sample but no data copy
lightp (bool, default: false): load minimal set of properties
initseg (str): local init segment name when input is a single ISOBMFF segment
ctso (sint): value to add to CTS offset for tracks using negative ctts
- set to
-1
to use thecslg
box info or the minimum cts offset present in the track - set to
-2
to use the minimum cts offset present in the track (cslg
ignored)
norw (bool, default: false): skip reformating of samples - should only be used when rewriting fragments
keepc (bool, default: false): keep corrupted samples - should only be used in multicast modes