ffprobe.xsd 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  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:attribute name="side_data_type" type="xsd:string"/>
  136. <xsd:attribute name="side_data_size" type="xsd:int" />
  137. <xsd:attribute name="timecode" type="xsd:string"/>
  138. </xsd:complexType>
  139. <xsd:complexType name="subtitleType">
  140. <xsd:attribute name="media_type" type="xsd:string" fixed="subtitle" use="required"/>
  141. <xsd:attribute name="pts" type="xsd:long" />
  142. <xsd:attribute name="pts_time" type="xsd:float"/>
  143. <xsd:attribute name="format" type="xsd:int" />
  144. <xsd:attribute name="start_display_time" type="xsd:int" />
  145. <xsd:attribute name="end_display_time" type="xsd:int" />
  146. <xsd:attribute name="num_rects" type="xsd:int" />
  147. </xsd:complexType>
  148. <xsd:complexType name="streamsType">
  149. <xsd:sequence>
  150. <xsd:element name="stream" type="ffprobe:streamType" minOccurs="0" maxOccurs="unbounded"/>
  151. </xsd:sequence>
  152. </xsd:complexType>
  153. <xsd:complexType name="programsType">
  154. <xsd:sequence>
  155. <xsd:element name="program" type="ffprobe:programType" minOccurs="0" maxOccurs="unbounded"/>
  156. </xsd:sequence>
  157. </xsd:complexType>
  158. <xsd:complexType name="streamDispositionType">
  159. <xsd:attribute name="default" type="xsd:int" use="required" />
  160. <xsd:attribute name="dub" type="xsd:int" use="required" />
  161. <xsd:attribute name="original" type="xsd:int" use="required" />
  162. <xsd:attribute name="comment" type="xsd:int" use="required" />
  163. <xsd:attribute name="lyrics" type="xsd:int" use="required" />
  164. <xsd:attribute name="karaoke" type="xsd:int" use="required" />
  165. <xsd:attribute name="forced" type="xsd:int" use="required" />
  166. <xsd:attribute name="hearing_impaired" type="xsd:int" use="required" />
  167. <xsd:attribute name="visual_impaired" type="xsd:int" use="required" />
  168. <xsd:attribute name="clean_effects" type="xsd:int" use="required" />
  169. <xsd:attribute name="attached_pic" type="xsd:int" use="required" />
  170. <xsd:attribute name="timed_thumbnails" type="xsd:int" use="required" />
  171. </xsd:complexType>
  172. <xsd:complexType name="streamType">
  173. <xsd:sequence>
  174. <xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
  175. <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
  176. <xsd:element name="side_data_list" type="ffprobe:packetSideDataListType" minOccurs="0" maxOccurs="1" />
  177. </xsd:sequence>
  178. <xsd:attribute name="index" type="xsd:int" use="required"/>
  179. <xsd:attribute name="codec_name" type="xsd:string" />
  180. <xsd:attribute name="codec_long_name" type="xsd:string" />
  181. <xsd:attribute name="profile" type="xsd:string" />
  182. <xsd:attribute name="codec_type" type="xsd:string" />
  183. <xsd:attribute name="codec_time_base" type="xsd:string" use="required"/>
  184. <xsd:attribute name="codec_tag" type="xsd:string" use="required"/>
  185. <xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
  186. <xsd:attribute name="extradata" type="xsd:string" />
  187. <xsd:attribute name="extradata_hash" type="xsd:string" />
  188. <!-- video attributes -->
  189. <xsd:attribute name="width" type="xsd:int"/>
  190. <xsd:attribute name="height" type="xsd:int"/>
  191. <xsd:attribute name="coded_width" type="xsd:int"/>
  192. <xsd:attribute name="coded_height" type="xsd:int"/>
  193. <xsd:attribute name="has_b_frames" type="xsd:int"/>
  194. <xsd:attribute name="sample_aspect_ratio" type="xsd:string"/>
  195. <xsd:attribute name="display_aspect_ratio" type="xsd:string"/>
  196. <xsd:attribute name="pix_fmt" type="xsd:string"/>
  197. <xsd:attribute name="level" type="xsd:int"/>
  198. <xsd:attribute name="color_range" type="xsd:string"/>
  199. <xsd:attribute name="color_space" type="xsd:string"/>
  200. <xsd:attribute name="color_transfer" type="xsd:string"/>
  201. <xsd:attribute name="color_primaries" type="xsd:string"/>
  202. <xsd:attribute name="chroma_location" type="xsd:string"/>
  203. <xsd:attribute name="field_order" type="xsd:string"/>
  204. <xsd:attribute name="timecode" type="xsd:string"/>
  205. <xsd:attribute name="refs" type="xsd:int"/>
  206. <!-- audio attributes -->
  207. <xsd:attribute name="sample_fmt" type="xsd:string"/>
  208. <xsd:attribute name="sample_rate" type="xsd:int"/>
  209. <xsd:attribute name="channels" type="xsd:int"/>
  210. <xsd:attribute name="channel_layout" type="xsd:string"/>
  211. <xsd:attribute name="bits_per_sample" type="xsd:int"/>
  212. <xsd:attribute name="id" type="xsd:string"/>
  213. <xsd:attribute name="r_frame_rate" type="xsd:string" use="required"/>
  214. <xsd:attribute name="avg_frame_rate" type="xsd:string" use="required"/>
  215. <xsd:attribute name="time_base" type="xsd:string" use="required"/>
  216. <xsd:attribute name="start_pts" type="xsd:long"/>
  217. <xsd:attribute name="start_time" type="xsd:float"/>
  218. <xsd:attribute name="duration_ts" type="xsd:long"/>
  219. <xsd:attribute name="duration" type="xsd:float"/>
  220. <xsd:attribute name="bit_rate" type="xsd:int"/>
  221. <xsd:attribute name="max_bit_rate" type="xsd:int"/>
  222. <xsd:attribute name="bits_per_raw_sample" type="xsd:int"/>
  223. <xsd:attribute name="nb_frames" type="xsd:int"/>
  224. <xsd:attribute name="nb_read_frames" type="xsd:int"/>
  225. <xsd:attribute name="nb_read_packets" type="xsd:int"/>
  226. </xsd:complexType>
  227. <xsd:complexType name="programType">
  228. <xsd:sequence>
  229. <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
  230. <xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1"/>
  231. </xsd:sequence>
  232. <xsd:attribute name="program_id" type="xsd:int" use="required"/>
  233. <xsd:attribute name="program_num" type="xsd:int" use="required"/>
  234. <xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
  235. <xsd:attribute name="start_time" type="xsd:float"/>
  236. <xsd:attribute name="start_pts" type="xsd:long"/>
  237. <xsd:attribute name="end_time" type="xsd:float"/>
  238. <xsd:attribute name="end_pts" type="xsd:long"/>
  239. <xsd:attribute name="pmt_pid" type="xsd:int" use="required"/>
  240. <xsd:attribute name="pcr_pid" type="xsd:int" use="required"/>
  241. </xsd:complexType>
  242. <xsd:complexType name="formatType">
  243. <xsd:sequence>
  244. <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
  245. </xsd:sequence>
  246. <xsd:attribute name="filename" type="xsd:string" use="required"/>
  247. <xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
  248. <xsd:attribute name="nb_programs" type="xsd:int" use="required"/>
  249. <xsd:attribute name="format_name" type="xsd:string" use="required"/>
  250. <xsd:attribute name="format_long_name" type="xsd:string"/>
  251. <xsd:attribute name="start_time" type="xsd:float"/>
  252. <xsd:attribute name="duration" type="xsd:float"/>
  253. <xsd:attribute name="size" type="xsd:long"/>
  254. <xsd:attribute name="bit_rate" type="xsd:long"/>
  255. <xsd:attribute name="probe_score" type="xsd:int"/>
  256. </xsd:complexType>
  257. <xsd:complexType name="tagType">
  258. <xsd:attribute name="key" type="xsd:string" use="required"/>
  259. <xsd:attribute name="value" type="xsd:string" use="required"/>
  260. </xsd:complexType>
  261. <xsd:complexType name="errorType">
  262. <xsd:attribute name="code" type="xsd:int" use="required"/>
  263. <xsd:attribute name="string" type="xsd:string" use="required"/>
  264. </xsd:complexType>
  265. <xsd:complexType name="programVersionType">
  266. <xsd:attribute name="version" type="xsd:string" use="required"/>
  267. <xsd:attribute name="copyright" type="xsd:string" use="required"/>
  268. <xsd:attribute name="build_date" type="xsd:string"/>
  269. <xsd:attribute name="build_time" type="xsd:string"/>
  270. <xsd:attribute name="compiler_ident" type="xsd:string" use="required"/>
  271. <xsd:attribute name="configuration" type="xsd:string" use="required"/>
  272. </xsd:complexType>
  273. <xsd:complexType name="chaptersType">
  274. <xsd:sequence>
  275. <xsd:element name="chapter" type="ffprobe:chapterType" minOccurs="0" maxOccurs="unbounded"/>
  276. </xsd:sequence>
  277. </xsd:complexType>
  278. <xsd:complexType name="chapterType">
  279. <xsd:sequence>
  280. <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
  281. </xsd:sequence>
  282. <xsd:attribute name="id" type="xsd:int" use="required"/>
  283. <xsd:attribute name="time_base" type="xsd:string" use="required"/>
  284. <xsd:attribute name="start" type="xsd:int" use="required"/>
  285. <xsd:attribute name="start_time" type="xsd:float"/>
  286. <xsd:attribute name="end" type="xsd:int" use="required"/>
  287. <xsd:attribute name="end_time" type="xsd:float" use="required"/>
  288. </xsd:complexType>
  289. <xsd:complexType name="libraryVersionType">
  290. <xsd:attribute name="name" type="xsd:string" use="required"/>
  291. <xsd:attribute name="major" type="xsd:int" use="required"/>
  292. <xsd:attribute name="minor" type="xsd:int" use="required"/>
  293. <xsd:attribute name="micro" type="xsd:int" use="required"/>
  294. <xsd:attribute name="version" type="xsd:int" use="required"/>
  295. <xsd:attribute name="ident" type="xsd:string" use="required"/>
  296. </xsd:complexType>
  297. <xsd:complexType name="libraryVersionsType">
  298. <xsd:sequence>
  299. <xsd:element name="library_version" type="ffprobe:libraryVersionType" minOccurs="0" maxOccurs="unbounded"/>
  300. </xsd:sequence>
  301. </xsd:complexType>
  302. <xsd:complexType name="pixelFormatFlagsType">
  303. <xsd:attribute name="big_endian" type="xsd:int" use="required"/>
  304. <xsd:attribute name="palette" type="xsd:int" use="required"/>
  305. <xsd:attribute name="bitstream" type="xsd:int" use="required"/>
  306. <xsd:attribute name="hwaccel" type="xsd:int" use="required"/>
  307. <xsd:attribute name="planar" type="xsd:int" use="required"/>
  308. <xsd:attribute name="rgb" type="xsd:int" use="required"/>
  309. <xsd:attribute name="pseudopal" type="xsd:int" use="required"/>
  310. <xsd:attribute name="alpha" type="xsd:int" use="required"/>
  311. </xsd:complexType>
  312. <xsd:complexType name="pixelFormatComponentType">
  313. <xsd:attribute name="index" type="xsd:int" use="required"/>
  314. <xsd:attribute name="bit_depth" type="xsd:int" use="required"/>
  315. </xsd:complexType>
  316. <xsd:complexType name="pixelFormatComponentsType">
  317. <xsd:sequence>
  318. <xsd:element name="component" type="ffprobe:pixelFormatComponentType" minOccurs="0" maxOccurs="unbounded"/>
  319. </xsd:sequence>
  320. </xsd:complexType>
  321. <xsd:complexType name="pixelFormatType">
  322. <xsd:sequence>
  323. <xsd:element name="flags" type="ffprobe:pixelFormatFlagsType" minOccurs="0" maxOccurs="1"/>
  324. <xsd:element name="components" type="ffprobe:pixelFormatComponentsType" minOccurs="0" maxOccurs="1"/>
  325. </xsd:sequence>
  326. <xsd:attribute name="name" type="xsd:string" use="required"/>
  327. <xsd:attribute name="nb_components" type="xsd:int" use="required"/>
  328. <xsd:attribute name="log2_chroma_w" type="xsd:int"/>
  329. <xsd:attribute name="log2_chroma_h" type="xsd:int"/>
  330. <xsd:attribute name="bits_per_pixel" type="xsd:int"/>
  331. </xsd:complexType>
  332. <xsd:complexType name="pixelFormatsType">
  333. <xsd:sequence>
  334. <xsd:element name="pixel_format" type="ffprobe:pixelFormatType" minOccurs="0" maxOccurs="unbounded"/>
  335. </xsd:sequence>
  336. </xsd:complexType>
  337. </xsd:schema>