yading@10
|
1 @chapter Metadata
|
yading@10
|
2 @c man begin METADATA
|
yading@10
|
3
|
yading@10
|
4 FFmpeg is able to dump metadata from media files into a simple UTF-8-encoded
|
yading@10
|
5 INI-like text file and then load it back using the metadata muxer/demuxer.
|
yading@10
|
6
|
yading@10
|
7 The file format is as follows:
|
yading@10
|
8 @enumerate
|
yading@10
|
9
|
yading@10
|
10 @item
|
yading@10
|
11 A file consists of a header and a number of metadata tags divided into sections,
|
yading@10
|
12 each on its own line.
|
yading@10
|
13
|
yading@10
|
14 @item
|
yading@10
|
15 The header is a ';FFMETADATA' string, followed by a version number (now 1).
|
yading@10
|
16
|
yading@10
|
17 @item
|
yading@10
|
18 Metadata tags are of the form 'key=value'
|
yading@10
|
19
|
yading@10
|
20 @item
|
yading@10
|
21 Immediately after header follows global metadata
|
yading@10
|
22
|
yading@10
|
23 @item
|
yading@10
|
24 After global metadata there may be sections with per-stream/per-chapter
|
yading@10
|
25 metadata.
|
yading@10
|
26
|
yading@10
|
27 @item
|
yading@10
|
28 A section starts with the section name in uppercase (i.e. STREAM or CHAPTER) in
|
yading@10
|
29 brackets ('[', ']') and ends with next section or end of file.
|
yading@10
|
30
|
yading@10
|
31 @item
|
yading@10
|
32 At the beginning of a chapter section there may be an optional timebase to be
|
yading@10
|
33 used for start/end values. It must be in form 'TIMEBASE=num/den', where num and
|
yading@10
|
34 den are integers. If the timebase is missing then start/end times are assumed to
|
yading@10
|
35 be in milliseconds.
|
yading@10
|
36 Next a chapter section must contain chapter start and end times in form
|
yading@10
|
37 'START=num', 'END=num', where num is a positive integer.
|
yading@10
|
38
|
yading@10
|
39 @item
|
yading@10
|
40 Empty lines and lines starting with ';' or '#' are ignored.
|
yading@10
|
41
|
yading@10
|
42 @item
|
yading@10
|
43 Metadata keys or values containing special characters ('=', ';', '#', '\' and a
|
yading@10
|
44 newline) must be escaped with a backslash '\'.
|
yading@10
|
45
|
yading@10
|
46 @item
|
yading@10
|
47 Note that whitespace in metadata (e.g. foo = bar) is considered to be a part of
|
yading@10
|
48 the tag (in the example above key is 'foo ', value is ' bar').
|
yading@10
|
49 @end enumerate
|
yading@10
|
50
|
yading@10
|
51 A ffmetadata file might look like this:
|
yading@10
|
52 @example
|
yading@10
|
53 ;FFMETADATA1
|
yading@10
|
54 title=bike\\shed
|
yading@10
|
55 ;this is a comment
|
yading@10
|
56 artist=FFmpeg troll team
|
yading@10
|
57
|
yading@10
|
58 [CHAPTER]
|
yading@10
|
59 TIMEBASE=1/1000
|
yading@10
|
60 START=0
|
yading@10
|
61 #chapter ends at 0:01:00
|
yading@10
|
62 END=60000
|
yading@10
|
63 title=chapter \#1
|
yading@10
|
64 [STREAM]
|
yading@10
|
65 title=multi\
|
yading@10
|
66 line
|
yading@10
|
67 @end example
|
yading@10
|
68 @c man end METADATA
|