yading@10: @chapter Metadata yading@10: @c man begin METADATA yading@10: yading@10: FFmpeg is able to dump metadata from media files into a simple UTF-8-encoded yading@10: INI-like text file and then load it back using the metadata muxer/demuxer. yading@10: yading@10: The file format is as follows: yading@10: @enumerate yading@10: yading@10: @item yading@10: A file consists of a header and a number of metadata tags divided into sections, yading@10: each on its own line. yading@10: yading@10: @item yading@10: The header is a ';FFMETADATA' string, followed by a version number (now 1). yading@10: yading@10: @item yading@10: Metadata tags are of the form 'key=value' yading@10: yading@10: @item yading@10: Immediately after header follows global metadata yading@10: yading@10: @item yading@10: After global metadata there may be sections with per-stream/per-chapter yading@10: metadata. yading@10: yading@10: @item yading@10: A section starts with the section name in uppercase (i.e. STREAM or CHAPTER) in yading@10: brackets ('[', ']') and ends with next section or end of file. yading@10: yading@10: @item yading@10: At the beginning of a chapter section there may be an optional timebase to be yading@10: used for start/end values. It must be in form 'TIMEBASE=num/den', where num and yading@10: den are integers. If the timebase is missing then start/end times are assumed to yading@10: be in milliseconds. yading@10: Next a chapter section must contain chapter start and end times in form yading@10: 'START=num', 'END=num', where num is a positive integer. yading@10: yading@10: @item yading@10: Empty lines and lines starting with ';' or '#' are ignored. yading@10: yading@10: @item yading@10: Metadata keys or values containing special characters ('=', ';', '#', '\' and a yading@10: newline) must be escaped with a backslash '\'. yading@10: yading@10: @item yading@10: Note that whitespace in metadata (e.g. foo = bar) is considered to be a part of yading@10: the tag (in the example above key is 'foo ', value is ' bar'). yading@10: @end enumerate yading@10: yading@10: A ffmetadata file might look like this: yading@10: @example yading@10: ;FFMETADATA1 yading@10: title=bike\\shed yading@10: ;this is a comment yading@10: artist=FFmpeg troll team yading@10: yading@10: [CHAPTER] yading@10: TIMEBASE=1/1000 yading@10: START=0 yading@10: #chapter ends at 0:01:00 yading@10: END=60000 yading@10: title=chapter \#1 yading@10: [STREAM] yading@10: title=multi\ yading@10: line yading@10: @end example yading@10: @c man end METADATA