]> git.sesse.net Git - ffmpeg/blob - doc/ffprobe.xsd
Merge commit '1509c018bd5b054a2354e20021ccbac9c934d213'
[ffmpeg] / doc / ffprobe.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4     targetNamespace="http://www.ffmpeg.org/schema/ffprobe"
5     xmlns:ffprobe="http://www.ffmpeg.org/schema/ffprobe">
6
7     <xsd:element name="ffprobe" type="ffprobe:ffprobeType"/>
8
9     <xsd:complexType name="ffprobeType">
10         <xsd:sequence>
11             <xsd:element name="program_version"  type="ffprobe:programVersionType"  minOccurs="0" maxOccurs="1" />
12             <xsd:element name="library_versions" type="ffprobe:libraryVersionsType" minOccurs="0" maxOccurs="1" />
13             <xsd:element name="pixel_formats"    type="ffprobe:pixelFormatsType"    minOccurs="0" maxOccurs="1" />
14             <xsd:element name="packets"  type="ffprobe:packetsType" minOccurs="0" maxOccurs="1" />
15             <xsd:element name="frames"   type="ffprobe:framesType"  minOccurs="0" maxOccurs="1" />
16             <xsd:element name="packets_and_frames" type="ffprobe:packetsAndFramesType" minOccurs="0" maxOccurs="1" />
17             <xsd:element name="programs" type="ffprobe:programsType" minOccurs="0" maxOccurs="1" />
18             <xsd:element name="streams"  type="ffprobe:streamsType" minOccurs="0" maxOccurs="1" />
19             <xsd:element name="chapters" type="ffprobe:chaptersType" minOccurs="0" maxOccurs="1" />
20             <xsd:element name="format"   type="ffprobe:formatType"  minOccurs="0" maxOccurs="1" />
21             <xsd:element name="error"    type="ffprobe:errorType"   minOccurs="0" maxOccurs="1" />
22         </xsd:sequence>
23     </xsd:complexType>
24
25     <xsd:complexType name="packetsType">
26         <xsd:sequence>
27             <xsd:element name="packet" type="ffprobe:packetType" minOccurs="0" maxOccurs="unbounded"/>
28         </xsd:sequence>
29     </xsd:complexType>
30
31     <xsd:complexType name="framesType">
32         <xsd:sequence>
33             <xsd:choice minOccurs="0" maxOccurs="unbounded">
34                 <xsd:element name="frame" type="ffprobe:frameType" minOccurs="0" maxOccurs="unbounded"/>
35                 <xsd:element name="subtitle" type="ffprobe:subtitleType" minOccurs="0" maxOccurs="unbounded"/>
36             </xsd:choice>
37         </xsd:sequence>
38     </xsd:complexType>
39
40     <xsd:complexType name="packetsAndFramesType">
41         <xsd:sequence>
42             <xsd:choice minOccurs="0" maxOccurs="unbounded">
43                 <xsd:element name="packet" type="ffprobe:packetType" minOccurs="0" maxOccurs="unbounded"/>
44                 <xsd:element name="frame" type="ffprobe:frameType" minOccurs="0" maxOccurs="unbounded"/>
45                 <xsd:element name="subtitle" type="ffprobe:subtitleType" minOccurs="0" maxOccurs="unbounded"/>
46             </xsd:choice>
47         </xsd:sequence>
48     </xsd:complexType>
49
50     <xsd:complexType name="packetType">
51       <xsd:attribute name="codec_type"    type="xsd:string" use="required" />
52       <xsd:attribute name="stream_index"  type="xsd:int" use="required" />
53       <xsd:attribute name="pts"           type="xsd:long"  />
54       <xsd:attribute name="pts_time"      type="xsd:float" />
55       <xsd:attribute name="dts"           type="xsd:long"  />
56       <xsd:attribute name="dts_time"      type="xsd:float" />
57       <xsd:attribute name="duration"      type="xsd:long"  />
58       <xsd:attribute name="duration_time" type="xsd:float" />
59       <xsd:attribute name="convergence_duration"      type="xsd:long"  />
60       <xsd:attribute name="convergence_duration_time" type="xsd:float" />
61       <xsd:attribute name="size"          type="xsd:long" use="required" />
62       <xsd:attribute name="pos"           type="xsd:long"  />
63       <xsd:attribute name="flags"         type="xsd:string" use="required" />
64       <xsd:attribute name="data"          type="xsd:string" />
65       <xsd:attribute name="data_hash"     type="xsd:string" />
66     </xsd:complexType>
67
68     <xsd:complexType name="frameType">
69       <xsd:sequence>
70             <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
71             <xsd:element name="side_data_list" type="ffprobe:frameSideDataListType"   minOccurs="0" maxOccurs="1" />
72       </xsd:sequence>
73
74       <xsd:attribute name="media_type"    type="xsd:string" use="required"/>
75       <xsd:attribute name="key_frame"     type="xsd:int"    use="required"/>
76       <xsd:attribute name="pts"           type="xsd:long" />
77       <xsd:attribute name="pts_time"      type="xsd:float"/>
78       <xsd:attribute name="pkt_pts"       type="xsd:long" />
79       <xsd:attribute name="pkt_pts_time"  type="xsd:float"/>
80       <xsd:attribute name="pkt_dts"       type="xsd:long" />
81       <xsd:attribute name="pkt_dts_time"  type="xsd:float"/>
82       <xsd:attribute name="best_effort_timestamp"      type="xsd:long" />
83       <xsd:attribute name="best_effort_timestamp_time" type="xsd:float" />
84       <xsd:attribute name="pkt_duration"  type="xsd:long" />
85       <xsd:attribute name="pkt_duration_time" type="xsd:float"/>
86       <xsd:attribute name="pkt_pos"       type="xsd:long" />
87       <xsd:attribute name="pkt_size"      type="xsd:int" />
88
89       <!-- audio attributes -->
90       <xsd:attribute name="sample_fmt"             type="xsd:string"/>
91       <xsd:attribute name="nb_samples"             type="xsd:long"  />
92       <xsd:attribute name="channels"               type="xsd:int"   />
93       <xsd:attribute name="channel_layout"         type="xsd:string"/>
94
95       <!-- video attributes -->
96       <xsd:attribute name="width"                  type="xsd:long"  />
97       <xsd:attribute name="height"                 type="xsd:long"  />
98       <xsd:attribute name="pix_fmt"                type="xsd:string"/>
99       <xsd:attribute name="sample_aspect_ratio"    type="xsd:string"/>
100       <xsd:attribute name="pict_type"              type="xsd:string"/>
101       <xsd:attribute name="coded_picture_number"   type="xsd:long"  />
102       <xsd:attribute name="display_picture_number" type="xsd:long"  />
103       <xsd:attribute name="interlaced_frame"       type="xsd:int"   />
104       <xsd:attribute name="top_field_first"        type="xsd:int"   />
105       <xsd:attribute name="repeat_pict"            type="xsd:int"   />
106     </xsd:complexType>
107
108     <xsd:complexType name="frameSideDataListType">
109         <xsd:sequence>
110             <xsd:element name="side_data" type="ffprobe:frameSideDataType" minOccurs="1" maxOccurs="unbounded"/>
111         </xsd:sequence>
112     </xsd:complexType>
113     <xsd:complexType name="frameSideDataType">
114         <xsd:attribute name="side_data_type"              type="xsd:string"/>
115         <xsd:attribute name="side_data_size"              type="xsd:int"   />
116     </xsd:complexType>
117
118     <xsd:complexType name="subtitleType">
119       <xsd:attribute name="media_type"         type="xsd:string" fixed="subtitle" use="required"/>
120       <xsd:attribute name="pts"                type="xsd:long" />
121       <xsd:attribute name="pts_time"           type="xsd:float"/>
122       <xsd:attribute name="format"             type="xsd:int"  />
123       <xsd:attribute name="start_display_time" type="xsd:int"  />
124       <xsd:attribute name="end_display_time"   type="xsd:int"  />
125       <xsd:attribute name="num_rects"          type="xsd:int"  />
126     </xsd:complexType>
127
128     <xsd:complexType name="streamsType">
129         <xsd:sequence>
130             <xsd:element name="stream" type="ffprobe:streamType" minOccurs="0" maxOccurs="unbounded"/>
131         </xsd:sequence>
132     </xsd:complexType>
133
134     <xsd:complexType name="programsType">
135         <xsd:sequence>
136             <xsd:element name="program" type="ffprobe:programType" minOccurs="0" maxOccurs="unbounded"/>
137         </xsd:sequence>
138     </xsd:complexType>
139
140     <xsd:complexType name="streamDispositionType">
141       <xsd:attribute name="default"          type="xsd:int" use="required" />
142       <xsd:attribute name="dub"              type="xsd:int" use="required" />
143       <xsd:attribute name="original"         type="xsd:int" use="required" />
144       <xsd:attribute name="comment"          type="xsd:int" use="required" />
145       <xsd:attribute name="lyrics"           type="xsd:int" use="required" />
146       <xsd:attribute name="karaoke"          type="xsd:int" use="required" />
147       <xsd:attribute name="forced"           type="xsd:int" use="required" />
148       <xsd:attribute name="hearing_impaired" type="xsd:int" use="required" />
149       <xsd:attribute name="visual_impaired"  type="xsd:int" use="required" />
150       <xsd:attribute name="clean_effects"    type="xsd:int" use="required" />
151       <xsd:attribute name="attached_pic"     type="xsd:int" use="required" />
152     </xsd:complexType>
153
154     <xsd:complexType name="streamType">
155       <xsd:sequence>
156         <xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
157         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
158       </xsd:sequence>
159
160       <xsd:attribute name="index"            type="xsd:int" use="required"/>
161       <xsd:attribute name="codec_name"       type="xsd:string" />
162       <xsd:attribute name="codec_long_name"  type="xsd:string" />
163       <xsd:attribute name="profile"          type="xsd:string" />
164       <xsd:attribute name="codec_type"       type="xsd:string" />
165       <xsd:attribute name="codec_time_base"  type="xsd:string" use="required"/>
166       <xsd:attribute name="codec_tag"        type="xsd:string" use="required"/>
167       <xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
168       <xsd:attribute name="extradata"        type="xsd:string" />
169       <xsd:attribute name="extradata_hash"   type="xsd:string" />
170
171       <!-- video attributes -->
172       <xsd:attribute name="width"                type="xsd:int"/>
173       <xsd:attribute name="height"               type="xsd:int"/>
174       <xsd:attribute name="has_b_frames"         type="xsd:int"/>
175       <xsd:attribute name="sample_aspect_ratio"  type="xsd:string"/>
176       <xsd:attribute name="display_aspect_ratio" type="xsd:string"/>
177       <xsd:attribute name="pix_fmt"              type="xsd:string"/>
178       <xsd:attribute name="level"                type="xsd:int"/>
179       <xsd:attribute name="color_range"          type="xsd:string"/>
180       <xsd:attribute name="color_space"          type="xsd:string"/>
181       <xsd:attribute name="color_transfer"       type="xsd:string"/>
182       <xsd:attribute name="color_primaries"      type="xsd:string"/>
183       <xsd:attribute name="chroma_location"      type="xsd:string"/>
184       <xsd:attribute name="timecode"             type="xsd:string"/>
185       <xsd:attribute name="refs"                 type="xsd:int"/>
186
187       <!-- audio attributes -->
188       <xsd:attribute name="sample_fmt"       type="xsd:string"/>
189       <xsd:attribute name="sample_rate"      type="xsd:int"/>
190       <xsd:attribute name="channels"         type="xsd:int"/>
191       <xsd:attribute name="channel_layout"   type="xsd:string"/>
192       <xsd:attribute name="bits_per_sample"  type="xsd:int"/>
193
194       <xsd:attribute name="id"               type="xsd:string"/>
195       <xsd:attribute name="r_frame_rate"     type="xsd:string" use="required"/>
196       <xsd:attribute name="avg_frame_rate"   type="xsd:string" use="required"/>
197       <xsd:attribute name="time_base"        type="xsd:string" use="required"/>
198       <xsd:attribute name="start_pts"        type="xsd:long"/>
199       <xsd:attribute name="start_time"       type="xsd:float"/>
200       <xsd:attribute name="duration_ts"      type="xsd:long"/>
201       <xsd:attribute name="duration"         type="xsd:float"/>
202       <xsd:attribute name="bit_rate"         type="xsd:int"/>
203       <xsd:attribute name="max_bit_rate"     type="xsd:int"/>
204       <xsd:attribute name="bits_per_raw_sample" type="xsd:int"/>
205       <xsd:attribute name="nb_frames"        type="xsd:int"/>
206       <xsd:attribute name="nb_read_frames"   type="xsd:int"/>
207       <xsd:attribute name="nb_read_packets"  type="xsd:int"/>
208     </xsd:complexType>
209
210     <xsd:complexType name="programType">
211       <xsd:sequence>
212         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
213         <xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1"/>
214       </xsd:sequence>
215
216       <xsd:attribute name="program_id"           type="xsd:int"    use="required"/>
217       <xsd:attribute name="program_num"          type="xsd:int"    use="required"/>
218       <xsd:attribute name="nb_streams"           type="xsd:int"    use="required"/>
219       <xsd:attribute name="start_time"           type="xsd:float"/>
220       <xsd:attribute name="start_pts"            type="xsd:long"/>
221       <xsd:attribute name="end_time"             type="xsd:float"/>
222       <xsd:attribute name="end_pts"              type="xsd:long"/>
223       <xsd:attribute name="pmt_pid"              type="xsd:int"    use="required"/>
224       <xsd:attribute name="pcr_pid"              type="xsd:int"    use="required"/>
225     </xsd:complexType>
226
227     <xsd:complexType name="formatType">
228       <xsd:sequence>
229         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
230       </xsd:sequence>
231
232       <xsd:attribute name="filename"         type="xsd:string" use="required"/>
233       <xsd:attribute name="nb_streams"       type="xsd:int"    use="required"/>
234       <xsd:attribute name="nb_programs"      type="xsd:int"    use="required"/>
235       <xsd:attribute name="format_name"      type="xsd:string" use="required"/>
236       <xsd:attribute name="format_long_name" type="xsd:string"/>
237       <xsd:attribute name="start_time"       type="xsd:float"/>
238       <xsd:attribute name="duration"         type="xsd:float"/>
239       <xsd:attribute name="size"             type="xsd:long"/>
240       <xsd:attribute name="bit_rate"         type="xsd:long"/>
241       <xsd:attribute name="probe_score"      type="xsd:int"/>
242     </xsd:complexType>
243
244     <xsd:complexType name="tagType">
245       <xsd:attribute name="key"   type="xsd:string" use="required"/>
246       <xsd:attribute name="value" type="xsd:string" use="required"/>
247     </xsd:complexType>
248
249     <xsd:complexType name="errorType">
250       <xsd:attribute name="code"   type="xsd:int"    use="required"/>
251       <xsd:attribute name="string" type="xsd:string" use="required"/>
252     </xsd:complexType>
253
254     <xsd:complexType name="programVersionType">
255       <xsd:attribute name="version"          type="xsd:string" use="required"/>
256       <xsd:attribute name="copyright"        type="xsd:string" use="required"/>
257       <xsd:attribute name="compiler_ident"   type="xsd:string" use="required"/>
258       <xsd:attribute name="configuration"    type="xsd:string" use="required"/>
259     </xsd:complexType>
260
261     <xsd:complexType name="chaptersType">
262       <xsd:sequence>
263         <xsd:element name="chapter" type="ffprobe:chapterType" minOccurs="0" maxOccurs="unbounded"/>
264       </xsd:sequence>
265     </xsd:complexType>
266
267     <xsd:complexType name="chapterType">
268       <xsd:sequence>
269         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
270       </xsd:sequence>
271
272       <xsd:attribute name="id"         type="xsd:int" use="required"/>
273       <xsd:attribute name="time_base"  type="xsd:string" use="required"/>
274       <xsd:attribute name="start"      type="xsd:int" use="required"/>
275       <xsd:attribute name="start_time" type="xsd:float"/>
276       <xsd:attribute name="end"        type="xsd:int" use="required"/>
277       <xsd:attribute name="end_time"   type="xsd:float" use="required"/>
278     </xsd:complexType>
279
280     <xsd:complexType name="libraryVersionType">
281       <xsd:attribute name="name"        type="xsd:string" use="required"/>
282       <xsd:attribute name="major"       type="xsd:int"    use="required"/>
283       <xsd:attribute name="minor"       type="xsd:int"    use="required"/>
284       <xsd:attribute name="micro"       type="xsd:int"    use="required"/>
285       <xsd:attribute name="version"     type="xsd:int"    use="required"/>
286       <xsd:attribute name="ident"       type="xsd:string" use="required"/>
287     </xsd:complexType>
288
289     <xsd:complexType name="libraryVersionsType">
290         <xsd:sequence>
291           <xsd:element name="library_version" type="ffprobe:libraryVersionType" minOccurs="0" maxOccurs="unbounded"/>
292         </xsd:sequence>
293     </xsd:complexType>
294
295     <xsd:complexType name="pixelFormatFlagsType">
296       <xsd:attribute name="big_endian" type="xsd:int" use="required"/>
297       <xsd:attribute name="palette"    type="xsd:int" use="required"/>
298       <xsd:attribute name="bitstream"  type="xsd:int" use="required"/>
299       <xsd:attribute name="hwaccel"    type="xsd:int" use="required"/>
300       <xsd:attribute name="planar"     type="xsd:int" use="required"/>
301       <xsd:attribute name="rgb"        type="xsd:int" use="required"/>
302       <xsd:attribute name="pseudopal"  type="xsd:int" use="required"/>
303       <xsd:attribute name="alpha"      type="xsd:int" use="required"/>
304     </xsd:complexType>
305
306     <xsd:complexType name="pixelFormatComponentType">
307       <xsd:attribute name="index"      type="xsd:int" use="required"/>
308       <xsd:attribute name="bit_depth"  type="xsd:int" use="required"/>
309     </xsd:complexType>
310
311     <xsd:complexType name="pixelFormatComponentsType">
312       <xsd:sequence>
313         <xsd:element name="component" type="ffprobe:pixelFormatComponentType" minOccurs="0" maxOccurs="unbounded"/>
314       </xsd:sequence>
315     </xsd:complexType>
316
317     <xsd:complexType name="pixelFormatType">
318       <xsd:sequence>
319         <xsd:element name="flags" type="ffprobe:pixelFormatFlagsType" minOccurs="0" maxOccurs="1"/>
320         <xsd:element name="components" type="ffprobe:pixelFormatComponentsType" minOccurs="0" maxOccurs="1"/>
321       </xsd:sequence>
322
323       <xsd:attribute name="name"                type="xsd:string" use="required"/>
324       <xsd:attribute name="nb_components"       type="xsd:int"    use="required"/>
325       <xsd:attribute name="log2_chroma_w"       type="xsd:int"/>
326       <xsd:attribute name="log2_chroma_h"       type="xsd:int"/>
327       <xsd:attribute name="bits_per_pixel"      type="xsd:int"/>
328     </xsd:complexType>
329
330     <xsd:complexType name="pixelFormatsType">
331       <xsd:sequence>
332         <xsd:element name="pixel_format" type="ffprobe:pixelFormatType" minOccurs="0" maxOccurs="unbounded"/>
333       </xsd:sequence>
334     </xsd:complexType>
335 </xsd:schema>