Skip to content

mp4box meta opts

jeanlf edited this page Jul 24, 2019 · 9 revisions

HOME » MP4Box » Meta and HEIF/IFF

Meta and HEIF Options

IsoMedia files can be used as generic meta-data containers, for examples storing XML information and sample images for a movie. The resulting file may not always contain a movie as is the case with some HEIF files or MPEG-21 files.

These information can be stored at the file root level, as is the case for HEIF/IFF and MPEG-21 file formats, or at the moovie or track level for a regular movie.

-set-meta ABCD[:tk=tkID] (string): set meta box type, with ABCD the four char meta type (NULL or 0 to remove meta)

  • tk not set: use root (file) meta
  • tkID == 0: use moov meta
  • tkID != 0: use meta of given track

-add-items (string): add resource to meta, with parameter syntax file_path[:opt1:optN]

  • file_path this or self: item is the file itself
  • tk=tkID: meta location (file, moov, track)
  • name=str: item name
  • type=itype: item 4cc type (not needed if mime is provided)
  • mime=mtype: item mime type
  • encoding=enctype: item content-encoding type
  • id=ID: item ID
  • ref=4cc,id: reference of type 4cc to an other item

-add-image (string): add the given file (with parameters) as HEIF image item. Same syntax as -add-item

  • name=str: see -add-item
  • id=id: see -add-item
  • ref=4cc, id: see -add-item
  • primary: indicate that this item should be the primary item
  • time=t: use the next sync sample after time t (float, in sec, default 0). A negative time imports ALL frames as items
  • split_tiles: for an HEVC tiled image, each tile is stored as a separate item
  • rotation=a: set the rotation angle for this image to 90*a degrees anti-clockwise
  • hidden: indicate that this image item should be hidden
  • icc_path: path to icc to add as colr
  • alpha: indicate that the image is an alpha image (should use ref=auxl also)
  • any other option will be passed as options to the media importer, see -add

-rem-item item_ID[:tk=tkID] (string): remove resource from meta
-set-primary item_ID[:tk=tkID] (string): set item as primary for meta
-set-xml xml_file_path[:tk=tkID][:binary] (string): set meta XML data
-rem-xml [tk=tkID] (string): remove meta XML data
-dump-xml file_path[:tk=tkID] (string): dump meta XML to file
-dump-item item_ID[:tk=tkID][:path=fileName] (string): dump item to file
-package (string): package input XML file into an ISO container, all media referenced except hyperlinks are added to file
-package (string): package input XML file into an MPEG-U widget with ISO container, all files contained in the current folder are added to the widget package

Clone this wiki locally
You can’t perform that action at this time.