• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:choice minOccurs="0" maxOccurs="unbounded">
33            <xsd:element name="frame"    type="ffprobe:frameType"/>
34            <xsd:element name="subtitle" type="ffprobe:subtitleType"/>
35        </xsd:choice>
36    </xsd:complexType>
37
38    <xsd:complexType name="packetsAndFramesType">
39        <xsd:choice minOccurs="0" maxOccurs="unbounded">
40            <xsd:element name="packet"   type="ffprobe:packetType"/>
41            <xsd:element name="frame"    type="ffprobe:frameType"/>
42            <xsd:element name="subtitle" type="ffprobe:subtitleType"/>
43        </xsd:choice>
44    </xsd:complexType>
45
46    <xsd:complexType name="packetType">
47      <xsd:sequence>
48        <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
49        <xsd:element name="side_data_list" type="ffprobe:packetSideDataListType"   minOccurs="0" maxOccurs="1" />
50      </xsd:sequence>
51
52      <xsd:attribute name="codec_type"    type="xsd:string" use="required" />
53      <xsd:attribute name="stream_index"  type="xsd:int" use="required" />
54      <xsd:attribute name="pts"           type="xsd:long"  />
55      <xsd:attribute name="pts_time"      type="xsd:float" />
56      <xsd:attribute name="dts"           type="xsd:long"  />
57      <xsd:attribute name="dts_time"      type="xsd:float" />
58      <xsd:attribute name="duration"      type="xsd:long"  />
59      <xsd:attribute name="duration_time" type="xsd:float" />
60      <xsd:attribute name="size"          type="xsd:long" use="required" />
61      <xsd:attribute name="pos"           type="xsd:long"  />
62      <xsd:attribute name="flags"         type="xsd:string" use="required" />
63      <xsd:attribute name="data"          type="xsd:string" />
64      <xsd:attribute name="data_hash"     type="xsd:string" />
65    </xsd:complexType>
66
67    <xsd:complexType name="packetSideDataListType">
68        <xsd:sequence>
69            <xsd:element name="side_data" type="ffprobe:packetSideDataType" minOccurs="1" maxOccurs="unbounded"/>
70        </xsd:sequence>
71    </xsd:complexType>
72    <xsd:complexType name="packetSideDataType">
73        <xsd:attribute name="side_data_type"              type="xsd:string"/>
74        <xsd:attribute name="side_data_size"              type="xsd:int"   />
75    </xsd:complexType>
76
77    <xsd:complexType name="frameType">
78      <xsd:sequence>
79            <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
80            <xsd:element name="logs" type="ffprobe:logsType" minOccurs="0" maxOccurs="1"/>
81            <xsd:element name="side_data_list" type="ffprobe:frameSideDataListType"   minOccurs="0" maxOccurs="1" />
82      </xsd:sequence>
83
84      <xsd:attribute name="media_type"    type="xsd:string" use="required"/>
85      <xsd:attribute name="stream_index"  type="xsd:int"  />
86      <xsd:attribute name="key_frame"     type="xsd:int"    use="required"/>
87      <xsd:attribute name="pts"           type="xsd:long" />
88      <xsd:attribute name="pts_time"      type="xsd:float"/>
89      <xsd:attribute name="pkt_dts"       type="xsd:long" />
90      <xsd:attribute name="pkt_dts_time"  type="xsd:float"/>
91      <xsd:attribute name="best_effort_timestamp"      type="xsd:long" />
92      <xsd:attribute name="best_effort_timestamp_time" type="xsd:float" />
93      <xsd:attribute name="pkt_duration"  type="xsd:long" />
94      <xsd:attribute name="pkt_duration_time" type="xsd:float"/>
95      <xsd:attribute name="pkt_pos"       type="xsd:long" />
96      <xsd:attribute name="pkt_size"      type="xsd:int" />
97
98      <!-- audio attributes -->
99      <xsd:attribute name="sample_fmt"             type="xsd:string"/>
100      <xsd:attribute name="nb_samples"             type="xsd:long"  />
101      <xsd:attribute name="channels"               type="xsd:int"   />
102      <xsd:attribute name="channel_layout"         type="xsd:string"/>
103
104      <!-- video attributes -->
105      <xsd:attribute name="width"                  type="xsd:long"  />
106      <xsd:attribute name="height"                 type="xsd:long"  />
107      <xsd:attribute name="pix_fmt"                type="xsd:string"/>
108      <xsd:attribute name="sample_aspect_ratio"    type="xsd:string"/>
109      <xsd:attribute name="pict_type"              type="xsd:string"/>
110      <xsd:attribute name="coded_picture_number"   type="xsd:long"  />
111      <xsd:attribute name="display_picture_number" type="xsd:long"  />
112      <xsd:attribute name="interlaced_frame"       type="xsd:int"   />
113      <xsd:attribute name="top_field_first"        type="xsd:int"   />
114      <xsd:attribute name="repeat_pict"            type="xsd:int"   />
115      <xsd:attribute name="color_range"            type="xsd:string"/>
116      <xsd:attribute name="color_space"            type="xsd:string"/>
117      <xsd:attribute name="color_primaries"        type="xsd:string"/>
118      <xsd:attribute name="color_transfer"         type="xsd:string"/>
119      <xsd:attribute name="chroma_location"        type="xsd:string"/>
120    </xsd:complexType>
121
122    <xsd:complexType name="logsType">
123        <xsd:sequence>
124            <xsd:element name="log" type="ffprobe:logType" minOccurs="1" maxOccurs="unbounded"/>
125        </xsd:sequence>
126    </xsd:complexType>
127    <xsd:complexType name="logType">
128        <xsd:attribute name="context"                     type="xsd:string"/>
129        <xsd:attribute name="level"                       type="xsd:int"   />
130        <xsd:attribute name="category"                    type="xsd:int"   />
131        <xsd:attribute name="parent_context"              type="xsd:string"/>
132        <xsd:attribute name="parent_category"             type="xsd:int"   />
133        <xsd:attribute name="message"                     type="xsd:string"/>
134    </xsd:complexType>
135
136    <xsd:complexType name="frameSideDataListType">
137        <xsd:sequence>
138            <xsd:element name="side_data" type="ffprobe:frameSideDataType" minOccurs="1" maxOccurs="unbounded"/>
139        </xsd:sequence>
140    </xsd:complexType>
141    <xsd:complexType name="frameSideDataType">
142        <xsd:sequence>
143            <xsd:element name="timecodes" type="ffprobe:frameSideDataTimecodeList" minOccurs="0" maxOccurs="1"/>
144        </xsd:sequence>
145
146        <xsd:attribute name="side_data_type"              type="xsd:string"/>
147        <xsd:attribute name="side_data_size"              type="xsd:int"   />
148        <xsd:attribute name="timecode"                    type="xsd:string"/>
149    </xsd:complexType>
150
151    <xsd:complexType name="frameSideDataTimecodeList">
152        <xsd:sequence>
153            <xsd:element name="timecode" type="ffprobe:frameSideDataTimecodeType" minOccurs="0" maxOccurs="unbounded"/>
154        </xsd:sequence>
155    </xsd:complexType>
156
157    <xsd:complexType name="frameSideDataTimecodeType">
158        <xsd:attribute name="value"              type="xsd:string"/>
159    </xsd:complexType>
160
161    <xsd:complexType name="subtitleType">
162      <xsd:attribute name="media_type"         type="xsd:string" fixed="subtitle" use="required"/>
163      <xsd:attribute name="pts"                type="xsd:long" />
164      <xsd:attribute name="pts_time"           type="xsd:float"/>
165      <xsd:attribute name="format"             type="xsd:int"  />
166      <xsd:attribute name="start_display_time" type="xsd:int"  />
167      <xsd:attribute name="end_display_time"   type="xsd:int"  />
168      <xsd:attribute name="num_rects"          type="xsd:int"  />
169    </xsd:complexType>
170
171    <xsd:complexType name="streamsType">
172        <xsd:sequence>
173            <xsd:element name="stream" type="ffprobe:streamType" minOccurs="0" maxOccurs="unbounded"/>
174        </xsd:sequence>
175    </xsd:complexType>
176
177    <xsd:complexType name="programsType">
178        <xsd:sequence>
179            <xsd:element name="program" type="ffprobe:programType" minOccurs="0" maxOccurs="unbounded"/>
180        </xsd:sequence>
181    </xsd:complexType>
182
183    <xsd:complexType name="streamDispositionType">
184      <xsd:attribute name="default"          type="xsd:int" use="required" />
185      <xsd:attribute name="dub"              type="xsd:int" use="required" />
186      <xsd:attribute name="original"         type="xsd:int" use="required" />
187      <xsd:attribute name="comment"          type="xsd:int" use="required" />
188      <xsd:attribute name="lyrics"           type="xsd:int" use="required" />
189      <xsd:attribute name="karaoke"          type="xsd:int" use="required" />
190      <xsd:attribute name="forced"           type="xsd:int" use="required" />
191      <xsd:attribute name="hearing_impaired" type="xsd:int" use="required" />
192      <xsd:attribute name="visual_impaired"  type="xsd:int" use="required" />
193      <xsd:attribute name="clean_effects"    type="xsd:int" use="required" />
194      <xsd:attribute name="attached_pic"     type="xsd:int" use="required" />
195      <xsd:attribute name="timed_thumbnails" type="xsd:int" use="required" />
196      <xsd:attribute name="captions"         type="xsd:int" use="required" />
197      <xsd:attribute name="descriptions"     type="xsd:int" use="required" />
198      <xsd:attribute name="metadata"         type="xsd:int" use="required" />
199      <xsd:attribute name="dependent"        type="xsd:int" use="required" />
200      <xsd:attribute name="still_image"      type="xsd:int" use="required" />
201    </xsd:complexType>
202
203    <xsd:complexType name="streamType">
204      <xsd:sequence>
205        <xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
206        <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
207        <xsd:element name="side_data_list" type="ffprobe:packetSideDataListType"   minOccurs="0" maxOccurs="1" />
208      </xsd:sequence>
209
210      <xsd:attribute name="index"            type="xsd:int" use="required"/>
211      <xsd:attribute name="codec_name"       type="xsd:string" />
212      <xsd:attribute name="codec_long_name"  type="xsd:string" />
213      <xsd:attribute name="profile"          type="xsd:string" />
214      <xsd:attribute name="codec_type"       type="xsd:string" />
215      <xsd:attribute name="codec_tag"        type="xsd:string" use="required"/>
216      <xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
217      <xsd:attribute name="extradata"        type="xsd:string" />
218      <xsd:attribute name="extradata_size"   type="xsd:int"    />
219      <xsd:attribute name="extradata_hash"   type="xsd:string" />
220
221      <!-- video attributes -->
222      <xsd:attribute name="width"                type="xsd:int"/>
223      <xsd:attribute name="height"               type="xsd:int"/>
224      <xsd:attribute name="coded_width"          type="xsd:int"/>
225      <xsd:attribute name="coded_height"         type="xsd:int"/>
226      <xsd:attribute name="closed_captions"      type="xsd:boolean"/>
227      <xsd:attribute name="film_grain"           type="xsd:boolean"/>
228      <xsd:attribute name="has_b_frames"         type="xsd:int"/>
229      <xsd:attribute name="sample_aspect_ratio"  type="xsd:string"/>
230      <xsd:attribute name="display_aspect_ratio" type="xsd:string"/>
231      <xsd:attribute name="pix_fmt"              type="xsd:string"/>
232      <xsd:attribute name="level"                type="xsd:int"/>
233      <xsd:attribute name="color_range"          type="xsd:string"/>
234      <xsd:attribute name="color_space"          type="xsd:string"/>
235      <xsd:attribute name="color_transfer"       type="xsd:string"/>
236      <xsd:attribute name="color_primaries"      type="xsd:string"/>
237      <xsd:attribute name="chroma_location"      type="xsd:string"/>
238      <xsd:attribute name="field_order"          type="xsd:string"/>
239      <xsd:attribute name="refs"                 type="xsd:int"/>
240
241      <!-- audio attributes -->
242      <xsd:attribute name="sample_fmt"       type="xsd:string"/>
243      <xsd:attribute name="sample_rate"      type="xsd:int"/>
244      <xsd:attribute name="channels"         type="xsd:int"/>
245      <xsd:attribute name="channel_layout"   type="xsd:string"/>
246      <xsd:attribute name="bits_per_sample"  type="xsd:int"/>
247
248      <xsd:attribute name="id"               type="xsd:string"/>
249      <xsd:attribute name="r_frame_rate"     type="xsd:string" use="required"/>
250      <xsd:attribute name="avg_frame_rate"   type="xsd:string" use="required"/>
251      <xsd:attribute name="time_base"        type="xsd:string" use="required"/>
252      <xsd:attribute name="start_pts"        type="xsd:long"/>
253      <xsd:attribute name="start_time"       type="xsd:float"/>
254      <xsd:attribute name="duration_ts"      type="xsd:long"/>
255      <xsd:attribute name="duration"         type="xsd:float"/>
256      <xsd:attribute name="bit_rate"         type="xsd:int"/>
257      <xsd:attribute name="max_bit_rate"     type="xsd:int"/>
258      <xsd:attribute name="bits_per_raw_sample" type="xsd:int"/>
259      <xsd:attribute name="nb_frames"        type="xsd:int"/>
260      <xsd:attribute name="nb_read_frames"   type="xsd:int"/>
261      <xsd:attribute name="nb_read_packets"  type="xsd:int"/>
262    </xsd:complexType>
263
264    <xsd:complexType name="programType">
265      <xsd:sequence>
266        <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
267        <xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1"/>
268      </xsd:sequence>
269
270      <xsd:attribute name="program_id"           type="xsd:int"    use="required"/>
271      <xsd:attribute name="program_num"          type="xsd:int"    use="required"/>
272      <xsd:attribute name="nb_streams"           type="xsd:int"    use="required"/>
273      <xsd:attribute name="pmt_pid"              type="xsd:int"    use="required"/>
274      <xsd:attribute name="pcr_pid"              type="xsd:int"    use="required"/>
275    </xsd:complexType>
276
277    <xsd:complexType name="formatType">
278      <xsd:sequence>
279        <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
280      </xsd:sequence>
281
282      <xsd:attribute name="filename"         type="xsd:string" use="required"/>
283      <xsd:attribute name="nb_streams"       type="xsd:int"    use="required"/>
284      <xsd:attribute name="nb_programs"      type="xsd:int"    use="required"/>
285      <xsd:attribute name="format_name"      type="xsd:string" use="required"/>
286      <xsd:attribute name="format_long_name" type="xsd:string"/>
287      <xsd:attribute name="start_time"       type="xsd:float"/>
288      <xsd:attribute name="duration"         type="xsd:float"/>
289      <xsd:attribute name="size"             type="xsd:long"/>
290      <xsd:attribute name="bit_rate"         type="xsd:long"/>
291      <xsd:attribute name="probe_score"      type="xsd:int"/>
292    </xsd:complexType>
293
294    <xsd:complexType name="tagType">
295      <xsd:attribute name="key"   type="xsd:string" use="required"/>
296      <xsd:attribute name="value" type="xsd:string" use="required"/>
297    </xsd:complexType>
298
299    <xsd:complexType name="errorType">
300      <xsd:attribute name="code"   type="xsd:int"    use="required"/>
301      <xsd:attribute name="string" type="xsd:string" use="required"/>
302    </xsd:complexType>
303
304    <xsd:complexType name="programVersionType">
305      <xsd:attribute name="version"          type="xsd:string" use="required"/>
306      <xsd:attribute name="copyright"        type="xsd:string" use="required"/>
307      <xsd:attribute name="build_date"       type="xsd:string"/>
308      <xsd:attribute name="build_time"       type="xsd:string"/>
309      <xsd:attribute name="compiler_ident"   type="xsd:string" use="required"/>
310      <xsd:attribute name="configuration"    type="xsd:string" use="required"/>
311    </xsd:complexType>
312
313    <xsd:complexType name="chaptersType">
314      <xsd:sequence>
315        <xsd:element name="chapter" type="ffprobe:chapterType" minOccurs="0" maxOccurs="unbounded"/>
316      </xsd:sequence>
317    </xsd:complexType>
318
319    <xsd:complexType name="chapterType">
320      <xsd:sequence>
321        <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
322      </xsd:sequence>
323
324      <xsd:attribute name="id"         type="xsd:int" use="required"/>
325      <xsd:attribute name="time_base"  type="xsd:string" use="required"/>
326      <xsd:attribute name="start"      type="xsd:int" use="required"/>
327      <xsd:attribute name="start_time" type="xsd:float"/>
328      <xsd:attribute name="end"        type="xsd:int" use="required"/>
329      <xsd:attribute name="end_time"   type="xsd:float" use="required"/>
330    </xsd:complexType>
331
332    <xsd:complexType name="libraryVersionType">
333      <xsd:attribute name="name"        type="xsd:string" use="required"/>
334      <xsd:attribute name="major"       type="xsd:int"    use="required"/>
335      <xsd:attribute name="minor"       type="xsd:int"    use="required"/>
336      <xsd:attribute name="micro"       type="xsd:int"    use="required"/>
337      <xsd:attribute name="version"     type="xsd:int"    use="required"/>
338      <xsd:attribute name="ident"       type="xsd:string" use="required"/>
339    </xsd:complexType>
340
341    <xsd:complexType name="libraryVersionsType">
342        <xsd:sequence>
343          <xsd:element name="library_version" type="ffprobe:libraryVersionType" minOccurs="0" maxOccurs="unbounded"/>
344        </xsd:sequence>
345    </xsd:complexType>
346
347    <xsd:complexType name="pixelFormatFlagsType">
348      <xsd:attribute name="big_endian" type="xsd:int" use="required"/>
349      <xsd:attribute name="palette"    type="xsd:int" use="required"/>
350      <xsd:attribute name="bitstream"  type="xsd:int" use="required"/>
351      <xsd:attribute name="hwaccel"    type="xsd:int" use="required"/>
352      <xsd:attribute name="planar"     type="xsd:int" use="required"/>
353      <xsd:attribute name="rgb"        type="xsd:int" use="required"/>
354      <xsd:attribute name="alpha"      type="xsd:int" use="required"/>
355    </xsd:complexType>
356
357    <xsd:complexType name="pixelFormatComponentType">
358      <xsd:attribute name="index"      type="xsd:int" use="required"/>
359      <xsd:attribute name="bit_depth"  type="xsd:int" use="required"/>
360    </xsd:complexType>
361
362    <xsd:complexType name="pixelFormatComponentsType">
363      <xsd:sequence>
364        <xsd:element name="component" type="ffprobe:pixelFormatComponentType" minOccurs="0" maxOccurs="unbounded"/>
365      </xsd:sequence>
366    </xsd:complexType>
367
368    <xsd:complexType name="pixelFormatType">
369      <xsd:sequence>
370        <xsd:element name="flags" type="ffprobe:pixelFormatFlagsType" minOccurs="0" maxOccurs="1"/>
371        <xsd:element name="components" type="ffprobe:pixelFormatComponentsType" minOccurs="0" maxOccurs="1"/>
372      </xsd:sequence>
373
374      <xsd:attribute name="name"                type="xsd:string" use="required"/>
375      <xsd:attribute name="nb_components"       type="xsd:int"    use="required"/>
376      <xsd:attribute name="log2_chroma_w"       type="xsd:int"/>
377      <xsd:attribute name="log2_chroma_h"       type="xsd:int"/>
378      <xsd:attribute name="bits_per_pixel"      type="xsd:int"/>
379    </xsd:complexType>
380
381    <xsd:complexType name="pixelFormatsType">
382      <xsd:sequence>
383        <xsd:element name="pixel_format" type="ffprobe:pixelFormatType" minOccurs="0" maxOccurs="unbounded"/>
384      </xsd:sequence>
385    </xsd:complexType>
386</xsd:schema>
387