-
Notifications
You must be signed in to change notification settings - Fork 0
MP4Box tips and tricks with BT and XMT
HOME » MP4Box » BT and XMT tips
When encoding a BIFS or OD ES_Descriptor, MP4Box must find at least:
- The decoderConfigDescriptor with the right streamType set
When encoding an interaction stream descriptor, MP4Box must find at least:
- The decoderConfigDescriptor with the right streamType set
- The UIConfig descriptor with the deviceName field. Note however that most of the time you will need to specify the ES_ID and the OCR_ES_ID of this descriptor to make sure events are not tied to any timeline.
When encoding a regular ES_Descriptor, MP4Box must find at least:
- The MuxInfo descriptor with the fileName (StreamSource in XMT) set.
For systems streams, if the SLConfigDescriptor is not found, MP4Box uses a stream timescale of 1000, otherwise it uses SLConfigDescriptor.timestampResolution
as stream timescale.
When the InitialObjectDescriptor is not found in the BT file, MP4Box will create one for you.
MP4Box can perform non-linear parsing of text files (BT,XMT,VRML,X3D/XML), in other words it understands usage of a node before its definition. This greatly simplifies content authoring, in terms of complexity (for example, 2 conditionals referencing each-other) and readability (you don't have to declare things at specific places). When encoding, node declarations are put back before node referencing (thus the decoded file will not look the same as the original one).
MP4Box can handle redefinition of nodes with the same DEF identifier (ex, "DEF AC AudioClip" and "DEF AC MovieTexture"). However when doing so, the nodes don't have the same binary IDs and only the first DEFed node can be safely used for field replacement. This feature should only be used with care to replace a whole node.
You can make MP4Box use your own binary identifiers for nodes and routes by using the syntax NXX for nodes or RXX for routes, where XX is the desired binary identifier (>=0). In case a node in the scene already has the same binary ID, its ID is changed to a non-conflicting value and MP4Box will print a warning message indicating a node ID has been changed.
MP4Box can use HTML color codes in BT instead of the regular 3 floats SFColor. Since '#' is a comment character in BT/WRL, HTML color codes are signaled by the '$' character, for exampleemissiveColor $FFAAB4
.
MP4Box can use simple macros in BT in order to help authoring. A BT (or WRL) file with such macros cannot be understood by any other tools than MP4Box!.
The macro must be defined on a single line as follows:
#define MACRO_NAME REP LAC E MENT STR ING
The BT parser will simply replace any occurence of the macro by its value.
Here is an example of a BT macro:
#define MYAPP Appearance { material Material2D { emissiveColor 1 0 0 filled TRUE} }
#define MYCOORDS 200 20
Transform2D {
translation MYCOORDS
children [
Shape {
appearance MYAPP
geometry Rectangle { size 20 20 }
}
]
}
General
Overview
Usage
Language tagging
Dump TS streams
DASH
Introduction
Fragmentation
DASH Support
Key-frame alignment
DASH Sequences
HEVC Tile-based adaptation
DASH SRD and HEVC tiling
Fragmented MP4 in HLS
Encryption
Introduction
Common Encryption
ISMACryp
OMA DRM
Subtitles
Introduction
TTXT Format
EBU-TTD
Scene coding
BIFS Textual Format
XMT Format
Scene Commands
BT and XMT tips
Misc Features