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