ffprobe.xsd 21 KB

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