Skip to content

Other Features

Hinting Options

IsoMedia hinting consists in creating special tracks in the file that contain transport protocol specific information and optionally multiplexing information. These tracks are then used by the server to create the actual packets being sent over the network, in other words they provide the server with hints on how to build packets, hence their names hint tracks.
MP4Box supports creation of hint tracks for RTSP servers supporting these such as QuickTime Streaming Server, DarwinStreaming Server or 3GPP-compliant RTSP servers.
Note: GPAC streaming tools rtp output and rtsp server do not use hint tracks, they use on-the-fly packetization from any media sources, not just MP4

-hint: hint the file for RTP/RTSP
-mtu (int, default: 1450): specify RTP MTU (max size) in bytes (this includes 12 bytes RTP header)
-copy: copy media data to hint track rather than reference (speeds up server but takes much more space)
-multi [maxptime]: enable frame concatenation in RTP packets if possible (with max duration 100 ms or maxptime ms if given)
-rate (int, default: 90000): specify rtp rate in Hz when no default for payload
-mpeg4: force MPEG-4 generic payload whenever possible
-latm: force MPG4-LATM transport for AAC streams
-static: enable static RTP payload IDs whenever possible (by default, dynamic payloads are always used)
-add-sdp (string): add given SDP string to movie (string) or track (tkID:string), tkID being the track ID or the hint track ID
-no-offset: signal no random offset for sequence number and timestamp (support will depend on server)
-unhint: remove all hinting information from file
-group-single: put all tracks in a single hint group
-ocr: force all MPEG-4 streams to be synchronized (MPEG-4 Systems only)
-rap: signal random access points in RTP packets (MPEG-4 Systems)
-ts: signal AU Time Stamps in RTP packets (MPEG-4 Systems)
-size: signal AU size in RTP packets (MPEG-4 Systems)
-idx: signal AU sequence numbers in RTP packets (MPEG-4 Systems)
-iod: prevent systems tracks embedding in IOD (MPEG-4 Systems), not compatible with -isma

Tagging support

Tags are specified as a colon-separated list tag_name=tag_value[:tag2=val2]
Setting a tag with no value or value NULL removes the tag.
Special tag value clear (or reset) removes all tags.
Unsupported tags can be added using their four character code as a tag name, and string value will be assumed.
If the tag name length is 3, the prefix 0xA9 is used to create the four character code.

Tags can also be loaded from a text file using -itags filename. The file must be in UTF8 with:
- lines starting with tag_name=value specify the start of a tag
- other lines specify the remainder of the last declared tag

If tag name starts with WM/, the tag is added to Xtra box (WMA tag, string only).

QT metadata key

The tag is added as a QT metadata key if:
- tag_name starts with QT/
- or tag_name is not recognized and longer than 4 characters

The tag_name can optionally be prefixed with HDLR@, indicating the tag namespace 4CC, the default namespace being mdta.
The tag_value can be prefixed with:
S: force string encoding (must be placed first) instead of parsing the tag value
b: use 8-bit encoding for signed or unsigned int
s: use 16-bit encoding for signed or unsigned int
l: use 32-bit encoding for signed or unsigned int
L: use 64-bit encoding for signed or unsigned int
f: force float encoding for numbers
Numbers are converted by default and stored in variable-size mode.
To force a positive integer to use signed storage, add + in front of the number.

-tags io.gpac.some_tag=s+32
This will force storing value 32 in signed 16 bit format.
The tag_value can also be formatted as:
XxY@WxH: a rectangle type
XxY: a point type
W@H: a size type
A,B,C,D,E,F,G,H,I: a 3x3 matrix
* FNAME: data is loaded from FNAME, type set to jpeg or png if needed

Supported tag names (name, value, type, aliases)

title (A9nam) string (alias name)
artist (A9ART) string
album_artist (aART) string (alias albumArtist)
album (A9alb) string
group (A9grp) string (alias grouping)
composer (A9com) string
writer (A9wrt) string
conductor (A9con) string
comment (A9cmt) string (alias comments)
genre (gnre) string (ID3 genre tag)
created (A9day) string (alias releaseDate)
track (A9trk) string
tracknum (trkn) fraction (syntax: A/B or A, B will be 0)
disk (disk) fraction (syntax: A/B or A, B will be 0)
tempo (tmpo) integer
compilation (cpil) bool (yes or no)
show (tvsh) string (alias tvShow)
episode_id (tven) string (alias tvEpisodeID)
season (tvsn) integer (alias tvSeason)
episode (tves) integer (alias tvEPisode)
network (tvnn) string (alias tvNetwork)
sdesc (desc) string (alias description)
ldesc (ldes) string (alias longDescription)
lyrics (A9lyr) string
sort_name (sonm) string (alias sortName)
sort_artist (soar) string (alias sortArtist)
sort_album_artist (soaa) string (alias sortAlbumArtist)
sort_album (soal) string (alias sortAlbum)
sort_composer (soco) string (alias sortComposer)
sort_show (sosn) string (alias sortShow)
cover (covr) file path (alias artwork)
copyright (cprt) string
tool (A9too) string (alias encodingTool)
encoder (A9enc) string (alias encodedBy)
pdate (purd) string (alias purchaseDate)
podcast (pcst) bool (yes or no)
url (purl) string (alias podcastURL)
keywords (kyyw) string
category (catg) string
hdvideo (hdvd) integer
media (stik) integer (alias mediaType)
rating (rtng) integer (alias contentRating)
gapless (pgap) bool (yes or no)
art_director (A9ard) string
arranger (A9arg) string
lyricist (A9aut) string
acknowledgement (A9cak) string
song_description (A9des) string
director (A9dir) string
equalizer (A9equ) string
liner (A9lnt) string
record_company (A9mak) string
original_artist (A9ope) string
phono_rights (A9phg) string
producer (A9prd) string
performer (A9prf) string
publisher (A9pub) string
sound_engineer (A9sne) string
soloist (A9sol) string
credits (A9src) string
thanks (A9thx) string
online_info (A9url) string
exec_producer (A9xpd) string
genre (A9gen) string (ID3 genre tag)
location (A9xyz) string