animation 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  1. #------------------------------------------------------------------------------
  2. # $File: animation,v 1.94 2023/06/16 20:06:50 christos Exp $
  3. # animation: file(1) magic for animation/movie formats
  4. #
  5. # animation formats
  6. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  7. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  8. # SGI and Apple formats
  9. 0 string MOVI Silicon Graphics movie file
  10. !:mime video/x-sgi-movie
  11. 4 string moov Apple QuickTime
  12. !:mime video/quicktime
  13. >12 string mvhd \b movie (fast start)
  14. >12 string mdra \b URL
  15. >12 string cmov \b movie (fast start, compressed header)
  16. >12 string rmra \b multiple URLs
  17. 4 string mdat Apple QuickTime movie (unoptimized)
  18. !:mime video/quicktime
  19. 4 string wide Apple QuickTime movie (unoptimized)
  20. !:mime video/quicktime
  21. #4 string skip Apple QuickTime movie (modified)
  22. #!:mime video/quicktime
  23. #4 string free Apple QuickTime movie (modified)
  24. #!:mime video/quicktime
  25. 4 string idsc Apple QuickTime image (fast start)
  26. !:mime image/x-quicktime
  27. #4 string idat Apple QuickTime image (unoptimized)
  28. #!:mime image/x-quicktime
  29. 4 string pckg Apple QuickTime compressed archive
  30. !:mime application/x-quicktime-player
  31. #### MP4 ####
  32. # https://www.ftyps.com/ with local additions
  33. # https://cconcolato.github.io/mp4ra/filetype.html
  34. 4 string ftyp ISO Media
  35. # https://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
  36. >8 string XAVC \b, MPEG v4 system, Sony XAVC Codec
  37. !:mime video/mp4
  38. >>96 string x \b, Audio "%.4s"
  39. >>118 beshort x at %dHz
  40. >>140 string x \b, Video "%.4s"
  41. >>168 beshort x %d
  42. >>170 beshort x \bx%d
  43. >8 string 3g2 \b, MPEG v4 system, 3GPP2
  44. !:mime video/3gpp2
  45. >>11 byte 4 \b v4 (H.263/AMR GSM 6.10)
  46. >>11 byte 5 \b v5 (H.263/AMR GSM 6.10)
  47. >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10)
  48. # https://www.3gpp2.org/Public_html/Specs/C.S0050-B_v1.0_070521.pdf
  49. # Section 8.1.1, corresponds to a, b, c
  50. >>11 byte 0x61 \b C.S0050-0 V1.0
  51. >>11 byte 0x62 \b C.S0050-0-A V1.0.0
  52. >>11 byte 0x63 \b C.S0050-0-B V1.0
  53. >8 string 3ge \b, MPEG v4 system, 3GPP
  54. !:mime video/3gpp
  55. >>11 byte 6 \b, Release %d MBMS Extended Presentations
  56. >>11 byte 7 \b, Release %d MBMS Extended Presentations
  57. >>11 byte 9 \b, Release %d MBMS Extended Presentations
  58. >8 string 3gf \b, MPEG v4 system, 3GPP
  59. >>11 byte 9 \b, Release %d File-delivery profile
  60. >8 string 3gg \b, MPEG v4 system, 3GPP
  61. !:mime video/3gpp
  62. >>11 byte 6 \b, Release %d General Profile
  63. >>11 byte 9 \b, Release %d General Profile
  64. >8 string 3gh \b, MPEG v4 system, 3GPP
  65. !:mime video/3gpp
  66. >>11 byte 9 \b, Release %d Adaptive Streaming Profile
  67. >8 string 3gm \b, MPEG v4 system, 3GPP
  68. !:mime video/3gpp
  69. >>11 byte 9 \b, Release %d Media Segment Profile
  70. >8 string 3gp \b, MPEG v4 system, 3GPP
  71. !:mime video/3gpp
  72. >>11 byte 1 \b, Release %d (non existent)
  73. >>11 byte 2 \b, Release %d (non existent)
  74. >>11 byte 3 \b, Release %d (non existent)
  75. >>11 byte 4 \b, Release %d
  76. >>11 byte 5 \b, Release %d
  77. >>11 byte 6 \b, Release %d
  78. >>11 byte 7 \b, Release %d Streaming Servers
  79. >8 string 3gr \b, MPEG v4 system, 3GPP
  80. !:mime video/3gpp
  81. >>11 byte 6 \b, Release %d Progressive Download Profile
  82. >>11 byte 9 \b, Release %d Progressive Download Profile
  83. >8 string 3gs \b, MPEG v4 system, 3GPP
  84. !:mime video/3gpp
  85. >>11 byte 6 \b, Release %d Streaming Servers
  86. >>11 byte 7 \b, Release %d Streaming Servers
  87. >>11 byte 9 \b, Release %d Streaming Servers
  88. >8 string 3gt \b, MPEG v4 system, 3GPP
  89. !:mime video/3gpp
  90. >>11 byte 8 \b, Release %d Media Stream Recording Profile
  91. >>11 byte 9 \b, Release %d Media Stream Recording Profile
  92. >8 string ARRI \b, MPEG v4 system, ARRI Digital Camera
  93. !:mime video/mp4
  94. >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC [ISO 14496-12:2005]
  95. !:mime video/mp4
  96. >8 string bbxm \b, Blinkbox Master File: H.264 video/16-bit LE LPCM audio
  97. !:mime video/mp4
  98. >8 string/W qt \b, Apple QuickTime movie
  99. !:mime video/quicktime
  100. >8 string CAEP \b, Canon Digital Camera
  101. >8 string caqv \b, Casio Digital Camera
  102. >8 string CDes \b, Convergent Design
  103. >8 string caaa \b, CMAF Media Profile - AAC Adaptive Audio
  104. >8 string caac \b, CMAF Media Profile - AAC Core
  105. >8 string caqv \b, Casio Digital Camera Casio
  106. >8 string ccea \b, CMAF Supplemental Data - CEA-608/708
  107. >8 string ccff \b, Common container file format
  108. >8 string cfhd \b, CMAF Media Profile - AVC HD
  109. >8 string cfsd \b, CMAF Media Profile - AVC SD
  110. >8 string chd1 \b, CMAF Media Profile - HEVC HDR10
  111. >8 string chdf \b, CMAF Media Profile - AVC HDHF
  112. >8 string chhd \b, CMAF Media Profile - HEVC HHD8
  113. >8 string chh1 \b, CMAF Media Profile - HEVC HHD10
  114. >8 string clg1 \b, CMAF Media Profile - HEVC HLG10
  115. >8 string cmfc \b, CMAF Track Format
  116. >8 string cmff \b, CMAF Fragment Format
  117. >8 string cmfl \b, CMAF Chunk Format
  118. >8 string cmfs \b, CMAF Segment Format
  119. >8 string cud1 \b, CMAF Media Profile - HEVC UHD10
  120. >8 string cud8 \b, CMAF Media Profile - HEVC UHD8
  121. >8 string cwvt \b, CMAF Media Profile - WebVTT
  122. >8 string da0a \b, DMB MAF w/ MPEG Layer II aud, MOT slides, DLS, JPG/PNG/MNG
  123. >8 string da0b \b, DMB MAF, ext DA0A, with 3GPP timed text, DID, TVA, REL, IPMP
  124. >8 string da1a \b, DMB MAF audio with ER-BSAC audio, JPG/PNG/MNG images
  125. >8 string da1b \b, DMB MAF, ext da1a, with 3GPP timed text, DID, TVA, REL, IPMP
  126. >8 string da2a \b, DMB MAF aud w/ HE-AAC v2 aud, MOT slides, DLS, JPG/PNG/MNG
  127. >8 string da2b \b, DMB MAF, ext da2a, with 3GPP timed text, DID, TVA, REL, IPMP
  128. >8 string da3a \b, DMB MAF aud with HE-AAC aud, JPG/PNG/MNG images
  129. >8 string da3b \b, DMB MAF, ext da3a w/ BIFS, 3GPP, DID, TVA, REL, IPMP
  130. >8 string dash \b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP
  131. !:mime video/mp4
  132. >8 string dby1 \b, MP4 files with Dolby content
  133. >8 string dsms \b, Media Segment DASH conformant
  134. >8 string dts1 \b, MP4 track file with audio codecs dtsc dtsh or dtse
  135. >8 string dts2 \b, MP4 track file with audio codec dtsx
  136. >8 string dts3 \b, MP4 track file with audio codec dtsy
  137. >8 string dxo$20 \b, DxO ONE camera
  138. >8 string dmb1 \b, DMB MAF supporting all the components defined in the spec
  139. >8 string dmpf \b, Digital Media Project
  140. >8 string drc1 \b, Dirac (wavelet compression), encap in ISO base media (MP4)
  141. >8 string dv1a \b, DMB MAF vid w/ AVC vid, ER-BSAC aud, BIFS, JPG/PNG/MNG, TS
  142. >8 string dv1b \b, DMB MAF, ext dv1a, with 3GPP timed text, DID, TVA, REL, IPMP
  143. >8 string dv2a \b, DMB MAF vid w/ AVC vid, HE-AAC v2 aud, BIFS, JPG/PNG/MNG, TS
  144. >8 string dv2b \b, DMB MAF, ext dv2a, with 3GPP timed text, DID, TVA, REL, IPMP
  145. >8 string dv3a \b, DMB MAF vid w/ AVC vid, HE-AAC aud, BIFS, JPG/PNG/MNG, TS
  146. >8 string dv3b \b, DMB MAF, ext dv3a, with 3GPP timed text, DID, TVA, REL, IPMP
  147. >8 string dvr1 \b, DVB (.DVB) over RTP
  148. !:mime video/vnd.dvb.file
  149. >8 string dvt1 \b, DVB (.DVB) over MPEG-2 Transport Stream
  150. >8 string emsg \b, Event message box present
  151. !:mime video/vnd.dvb.file
  152. >8 string F4V \b, Video for Adobe Flash Player 9+ (.F4V)
  153. !:mime video/mp4
  154. >8 string F4P \b, Protected Video for Adobe Flash Player 9+ (.F4P)
  155. !:mime video/mp4
  156. >8 string F4A \b, Audio for Adobe Flash Player 9+ (.F4A)
  157. !:mime audio/mp4
  158. >8 string F4B \b, Audio Book for Adobe Flash Player 9+ (.F4B)
  159. !:mime audio/mp4
  160. >8 string ifrm \b, Apple iFrame Specification, Version 8.1 Jan 2013
  161. >8 string im1i \b, CMAF Media Profile - IMSC1 Image
  162. >8 string im1t \b, CMAF Media Profile - IMSC1 Text
  163. >8 string isc2 \b, ISMACryp 2.0 Encrypted File
  164. # ?/enc-isoff-generic
  165. >8 string iso \b, MP4 Base Media
  166. !:mime video/mp4
  167. !:ext mp4
  168. >>11 string m v1 [ISO 14496-12:2003]
  169. >>11 string 2 v2 [ISO 14496-12:2005]
  170. >>11 string 4 v4
  171. >>11 string 5 v5
  172. >>11 string 6 v6
  173. >8 string isml \b, MP4 Base Media v2 [ISO 14496-12:2005]
  174. !:mime video/mp4
  175. >8 string J2P0 \b, JPEG2000 Profile 0
  176. >8 string J2P1 \b, JPEG2000 Profile 1
  177. >8 string/W jp2 \b, JPEG 2000
  178. !:mime image/jp2
  179. >8 string JP2 \b, JPEG 2000 Image (.JP2) [ISO 15444-1 ?]
  180. !:mime image/jp2
  181. >8 string JP20 \b, Unknown, from GPAC samples (prob non-existent)
  182. >8 string jpm \b, JPEG 2000 Compound Image (.JPM) [ISO 15444-6]
  183. !:mime image/jpm
  184. >8 string jpsi \b, The JPSearch data interchange format
  185. >8 string jpx \b, JPEG 2000 w/ extensions (.JPX) [ISO 15444-2]
  186. !:mime image/jpx
  187. >8 string KDDI \b, 3GPP2 EZmovie for KDDI 3G cellphones
  188. !:mime video/3gpp2
  189. >8 string LCAG \b, Leica digital camera
  190. >8 string lmsg \b, Last Media Segment indicator for ISO base media file format.
  191. >8 string M4A \b, Apple iTunes ALAC/AAC-LC (.M4A) Audio
  192. !:mime audio/x-m4a
  193. >8 string M4B \b, Apple iTunes ALAC/AAC-LC (.M4B) Audio Book
  194. !:mime audio/mp4
  195. >8 string M4P \b, Apple iTunes ALAC/AAC-LC (.M4P) AES Protected Audio
  196. !:mime video/mp4
  197. >8 string M4V \b, Apple iTunes Video (.M4V) Video
  198. !:mime video/x-m4v
  199. >8 string M4VH \b, Apple TV (.M4V)
  200. !:mime video/x-m4v
  201. >8 string M4VP \b, Apple iPhone (.M4V)
  202. !:mime video/x-m4v
  203. >8 string mj2s \b, Motion JPEG 2000 [ISO 15444-3] Simple Profile
  204. !:mime video/mj2
  205. >8 string mjp2 \b, Motion JPEG 2000 [ISO 15444-3] General Profile
  206. >8 string MFSM \b, Media File for Samsung video Metadata
  207. >8 string MGSV \b, Sony Home and Mobile Multimedia Platform (HMMP)
  208. !:mime video/mj2
  209. >8 string mmp4 \b, MPEG-4/3GPP Mobile Profile (.MP4 / .3GP) (for NTT)
  210. !:mime video/mp4
  211. >8 string mobi \b, MPEG-4, MOBI format
  212. !:mime video/mp4
  213. >8 string mp21 \b, MPEG-21 [ISO/IEC 21000-9]
  214. >8 string mp41 \b, MP4 v1 [ISO 14496-1:ch13]
  215. !:mime video/mp4
  216. >8 string mp42 \b, MP4 v2 [ISO 14496-14]
  217. !:mime video/mp4
  218. >8 string mp71 \b, MP4 w/ MPEG-7 Metadata [per ISO 14496-12]
  219. >8 string mp7t \b, MPEG v4 system, MPEG v7 XML
  220. >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML
  221. >8 string mpuf \b, Compliance with the MMT Processing Unit format
  222. >8 string msdh \b, Media Segment conforming to ISO base media file format.
  223. >8 string msix \b, Media Segment conforming to ISO base media file format.
  224. >8 string mmp4 \b, MPEG v4 system, 3GPP Mobile
  225. !:mime video/mp4
  226. >8 string MPPI \b, Photo Player, MAF [ISO/IEC 23000-3]
  227. >8 string mqt \b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830
  228. !:mime video/quicktime
  229. >8 string MSNV \b, MPEG-4 (.MP4) for SonyPSP
  230. !:mime audio/mp4
  231. >8 string NDAS \b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio
  232. !:mime audio/mp4
  233. >8 string NDSC \b, MPEG-4 (.MP4) Nero Cinema Profile
  234. !:mime video/mp4
  235. >8 string NDSH \b, MPEG-4 (.MP4) Nero HDTV Profile
  236. !:mime video/mp4
  237. >8 string NDSM \b, MPEG-4 (.MP4) Nero Mobile Profile
  238. !:mime video/mp4
  239. >8 string NDSP \b, MPEG-4 (.MP4) Nero Portable Profile
  240. !:mime video/mp4
  241. >8 string NDSS \b, MPEG-4 (.MP4) Nero Standard Profile
  242. !:mime video/mp4
  243. >8 string NDXC \b, H.264/MPEG-4 AVC (.MP4) Nero Cinema Profile
  244. !:mime video/mp4
  245. >8 string NDXH \b, H.264/MPEG-4 AVC (.MP4) Nero HDTV Profile
  246. !:mime video/mp4
  247. >8 string NDXM \b, H.264/MPEG-4 AVC (.MP4) Nero Mobile Profile
  248. !:mime video/mp4
  249. >8 string NDXP \b, H.264/MPEG-4 AVC (.MP4) Nero Portable Profile
  250. !:mime video/mp4
  251. >8 string NDXS \b, H.264/MPEG-4 AVC (.MP4) Nero Standard Profile
  252. >8 string niko \b, Nikon Digital Camera
  253. !:mime video/mp4
  254. >8 string odcf \b, OMA DCF DRM Format 2.0 (OMA-TS-DRM-DCF-V2_0-20060303-A)
  255. >8 string opf2 \b, OMA PDCF DRM Format 2.1 (OMA-TS-DRM-DCF-V2_1-20070724-C)
  256. >8 string opx2 \b, OMA PDCF DRM + XBS ext (OMA-TS-DRM_XBS-V1_0-20070529-C)
  257. >8 string pana \b, Panasonic Digital Camera
  258. >8 string piff \b, Protected Interoperable File Format
  259. >8 string pnvi ]b, Panasonic Video Intercom
  260. >8 string qt \b, Apple QuickTime (.MOV/QT)
  261. !:mime video/quicktime
  262. # HEIF image format
  263. # see https://nokiatech.github.io/heif/technical.html
  264. >8 string mif1 \b, HEIF Image
  265. !:mime image/heif
  266. >8 string msf1 \b, HEIF Image Sequence
  267. !:mime image/heif-sequence
  268. >8 string heic \b, HEIF Image HEVC Main or Main Still Picture Profile
  269. !:mime image/heic
  270. >8 string heix \b, HEIF Image HEVC Main 10 Profile
  271. !:mime image/heic
  272. >8 string hevc \b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile
  273. !:mime image/heic-sequence
  274. >8 string hevx \b, HEIF Image Sequence HEVC Main 10 Profile
  275. !:mime image/heic-sequence
  276. # following HEIF brands are not mentioned in the heif technical info currently (Oct 2017)
  277. # but used in the reference implementation:
  278. # https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp
  279. >8 string heim \b, HEIF Image L-HEVC
  280. !:mime image/heif
  281. >8 string heis \b, HEIF Image L-HEVC
  282. !:mime image/heif
  283. >8 string avic \b, HEIF Image AVC
  284. !:mime image/heif
  285. >8 string hevm \b, HEIF Image Sequence L-HEVC
  286. !:mime image/heif-sequence
  287. >8 string hevs \b, HEIF Image Sequence L-HEVC
  288. !:mime image/heif-sequence
  289. >8 string avcs \b, HEIF Image Sequence AVC
  290. !:mime image/heif-sequence
  291. # AVIF image format
  292. # see https://aomediacodec.github.io/av1-avif/
  293. >8 string avif \b, AVIF Image
  294. !:mime image/avif
  295. >8 string avis \b, AVIF Image Sequence
  296. !:mime image/avif
  297. >8 string risx \b, Representation Index Segment for MPEG-2 TS Segments
  298. >8 string ROSS \b, Ross Video
  299. >8 string sdv \b, SD Memory Card Video
  300. >8 string ssc1 \b, Samsung stereo, single stream (patent pending)
  301. >8 string ssc2 \b, Samsung stereo, dual stream (patent pending)
  302. >8 string SEAU \b, Sony Home and Mobile Multimedia Platform (HMMP)
  303. >8 string SEBK \b, Sony Home and Mobile Multimedia Platform (HMMP)
  304. >8 string senv \b, Video contents Sony Entertainment Network
  305. >8 string sims \b, Media Segment for Sub-Indexed Media Segment format
  306. >8 string sisx \b, Single Index Segment forindex MPEG-2 TS
  307. >8 string ssss \b, Subsegment Index Segment used to index MPEG-2 Segments
  308. >8 string uvvu \b, UltraViolet file brand for DECE Common Format
  309. # MPEG sequences
  310. # Scans for all common MPEG header start codes
  311. 0 belong 0x00000001
  312. >4 byte&0x1F 0x07 JVT NAL sequence, H.264 video
  313. >>5 byte 66 \b, baseline
  314. >>5 byte 77 \b, main
  315. >>5 byte 88 \b, extended
  316. >>7 byte x \b @ L %u
  317. 0 belong&0xFFFFFF00 0x00000100
  318. >3 byte 0xBA MPEG sequence
  319. !:mime video/mpeg
  320. # http://fileformats.archiveteam.org/wiki/Enhanced_VOB
  321. # https://reposcope.com/mimetype/video/mpeg
  322. !:ext vob/evo/mpg/mpeg
  323. >>4 byte &0x40 \b, v2, program multiplex
  324. >>4 byte ^0x40 \b, v1, system multiplex
  325. >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header)
  326. >3 byte&0x1F 0x07 MPEG sequence, H.264 video
  327. >>4 byte 66 \b, baseline
  328. >>4 byte 77 \b, main
  329. >>4 byte 88 \b, extended
  330. >>6 byte x \b @ L %u
  331. # GRR too general as it catches also FoxPro Memo example NG.FPT
  332. >3 byte 0xB0 MPEG sequence, v4
  333. # TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
  334. #>>4 byte !0 MPEG sequence, v4
  335. !:mime video/mpeg4-generic
  336. >>5 belong 0x000001B5
  337. >>>9 byte &0x80
  338. >>>>10 byte&0xF0 16 \b, video
  339. >>>>10 byte&0xF0 32 \b, still texture
  340. >>>>10 byte&0xF0 48 \b, mesh
  341. >>>>10 byte&0xF0 64 \b, face
  342. >>>9 byte&0xF8 8 \b, video
  343. >>>9 byte&0xF8 16 \b, still texture
  344. >>>9 byte&0xF8 24 \b, mesh
  345. >>>9 byte&0xF8 32 \b, face
  346. >>4 byte 1 \b, simple @ L1
  347. >>4 byte 2 \b, simple @ L2
  348. >>4 byte 3 \b, simple @ L3
  349. >>4 byte 4 \b, simple @ L0
  350. >>4 byte 17 \b, simple scalable @ L1
  351. >>4 byte 18 \b, simple scalable @ L2
  352. >>4 byte 33 \b, core @ L1
  353. >>4 byte 34 \b, core @ L2
  354. >>4 byte 50 \b, main @ L2
  355. >>4 byte 51 \b, main @ L3
  356. >>4 byte 53 \b, main @ L4
  357. >>4 byte 66 \b, n-bit @ L2
  358. >>4 byte 81 \b, scalable texture @ L1
  359. >>4 byte 97 \b, simple face animation @ L1
  360. >>4 byte 98 \b, simple face animation @ L2
  361. >>4 byte 99 \b, simple face basic animation @ L1
  362. >>4 byte 100 \b, simple face basic animation @ L2
  363. >>4 byte 113 \b, basic animation text @ L1
  364. >>4 byte 114 \b, basic animation text @ L2
  365. >>4 byte 129 \b, hybrid @ L1
  366. >>4 byte 130 \b, hybrid @ L2
  367. >>4 byte 145 \b, advanced RT simple @ L!
  368. >>4 byte 146 \b, advanced RT simple @ L2
  369. >>4 byte 147 \b, advanced RT simple @ L3
  370. >>4 byte 148 \b, advanced RT simple @ L4
  371. >>4 byte 161 \b, core scalable @ L1
  372. >>4 byte 162 \b, core scalable @ L2
  373. >>4 byte 163 \b, core scalable @ L3
  374. >>4 byte 177 \b, advanced coding efficiency @ L1
  375. >>4 byte 178 \b, advanced coding efficiency @ L2
  376. >>4 byte 179 \b, advanced coding efficiency @ L3
  377. >>4 byte 180 \b, advanced coding efficiency @ L4
  378. >>4 byte 193 \b, advanced core @ L1
  379. >>4 byte 194 \b, advanced core @ L2
  380. >>4 byte 209 \b, advanced scalable texture @ L1
  381. >>4 byte 210 \b, advanced scalable texture @ L2
  382. >>4 byte 211 \b, advanced scalable texture @ L3
  383. >>4 byte 225 \b, simple studio @ L1
  384. >>4 byte 226 \b, simple studio @ L2
  385. >>4 byte 227 \b, simple studio @ L3
  386. >>4 byte 228 \b, simple studio @ L4
  387. >>4 byte 229 \b, core studio @ L1
  388. >>4 byte 230 \b, core studio @ L2
  389. >>4 byte 231 \b, core studio @ L3
  390. >>4 byte 232 \b, core studio @ L4
  391. >>4 byte 240 \b, advanced simple @ L0
  392. >>4 byte 241 \b, advanced simple @ L1
  393. >>4 byte 242 \b, advanced simple @ L2
  394. >>4 byte 243 \b, advanced simple @ L3
  395. >>4 byte 244 \b, advanced simple @ L4
  396. >>4 byte 245 \b, advanced simple @ L5
  397. >>4 byte 247 \b, advanced simple @ L3b
  398. >>4 byte 248 \b, FGS @ L0
  399. >>4 byte 249 \b, FGS @ L1
  400. >>4 byte 250 \b, FGS @ L2
  401. >>4 byte 251 \b, FGS @ L3
  402. >>4 byte 252 \b, FGS @ L4
  403. >>4 byte 253 \b, FGS @ L5
  404. >3 byte 0xB5 MPEG sequence, v4
  405. !:mime video/mpeg4-generic
  406. >>4 byte &0x80
  407. >>>5 byte&0xF0 16 \b, video (missing profile header)
  408. >>>5 byte&0xF0 32 \b, still texture (missing profile header)
  409. >>>5 byte&0xF0 48 \b, mesh (missing profile header)
  410. >>>5 byte&0xF0 64 \b, face (missing profile header)
  411. >>4 byte&0xF8 8 \b, video (missing profile header)
  412. >>4 byte&0xF8 16 \b, still texture (missing profile header)
  413. >>4 byte&0xF8 24 \b, mesh (missing profile header)
  414. >>4 byte&0xF8 32 \b, face (missing profile header)
  415. >3 byte 0xB3 MPEG sequence
  416. !:mime video/mpeg
  417. >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  418. >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  419. >>12 belong 0x000001B5 \b, v2,
  420. >>>16 byte&0x0F 1 \b HP
  421. >>>16 byte&0x0F 2 \b Spt
  422. >>>16 byte&0x0F 3 \b SNR
  423. >>>16 byte&0x0F 4 \b MP
  424. >>>16 byte&0x0F 5 \b SP
  425. >>>17 byte&0xF0 64 \b@HL
  426. >>>17 byte&0xF0 96 \b@H-14
  427. >>>17 byte&0xF0 128 \b@ML
  428. >>>17 byte&0xF0 160 \b@LL
  429. >>>17 byte &0x08 \b progressive
  430. >>>17 byte ^0x08 \b interlaced
  431. >>>17 byte&0x06 2 \b Y'CbCr 4:2:0 video
  432. >>>17 byte&0x06 4 \b Y'CbCr 4:2:2 video
  433. >>>17 byte&0x06 6 \b Y'CbCr 4:4:4 video
  434. >>11 byte &0x02
  435. >>>75 byte &0x01
  436. >>>>140 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  437. >>>>140 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  438. >>>>140 belong 0x000001B5 \b, v2,
  439. >>>>>144 byte&0x0F 1 \b HP
  440. >>>>>144 byte&0x0F 2 \b Spt
  441. >>>>>144 byte&0x0F 3 \b SNR
  442. >>>>>144 byte&0x0F 4 \b MP
  443. >>>>>144 byte&0x0F 5 \b SP
  444. >>>>>145 byte&0xF0 64 \b@HL
  445. >>>>>145 byte&0xF0 96 \b@H-14
  446. >>>>>145 byte&0xF0 128 \b@ML
  447. >>>>>145 byte&0xF0 160 \b@LL
  448. >>>>>145 byte &0x08 \b progressive
  449. >>>>>145 byte ^0x08 \b interlaced
  450. >>>>>145 byte&0x06 2 \b Y'CbCr 4:2:0 video
  451. >>>>>145 byte&0x06 4 \b Y'CbCr 4:2:2 video
  452. >>>>>145 byte&0x06 6 \b Y'CbCr 4:4:4 video
  453. >>76 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  454. >>76 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  455. >>76 belong 0x000001B5 \b, v2,
  456. >>>80 byte&0x0F 1 \b HP
  457. >>>80 byte&0x0F 2 \b Spt
  458. >>>80 byte&0x0F 3 \b SNR
  459. >>>80 byte&0x0F 4 \b MP
  460. >>>80 byte&0x0F 5 \b SP
  461. >>>81 byte&0xF0 64 \b@HL
  462. >>>81 byte&0xF0 96 \b@H-14
  463. >>>81 byte&0xF0 128 \b@ML
  464. >>>81 byte&0xF0 160 \b@LL
  465. >>>81 byte &0x08 \b progressive
  466. >>>81 byte ^0x08 \b interlaced
  467. >>>81 byte&0x06 2 \b Y'CbCr 4:2:0 video
  468. >>>81 byte&0x06 4 \b Y'CbCr 4:2:2 video
  469. >>>81 byte&0x06 6 \b Y'CbCr 4:4:4 video
  470. >>4 belong&0xFFFFFF00 0x78043800 \b, HD-TV 1920P
  471. >>>7 byte&0xF0 0x10 \b, 16:9
  472. >>4 belong&0xFFFFFF00 0x50002D00 \b, SD-TV 1280I
  473. >>>7 byte&0xF0 0x10 \b, 16:9
  474. >>4 belong&0xFFFFFF00 0x30024000 \b, PAL Capture
  475. >>>7 byte&0xF0 0x10 \b, 4:3
  476. >>4 beshort&0xFFF0 0x2C00 \b, 4CIF
  477. >>>5 beshort&0x0FFF 0x01E0 \b NTSC
  478. >>>5 beshort&0x0FFF 0x0240 \b PAL
  479. >>>7 byte&0xF0 0x20 \b, 4:3
  480. >>>7 byte&0xF0 0x30 \b, 16:9
  481. >>>7 byte&0xF0 0x40 \b, 11:5
  482. >>>7 byte&0xF0 0x80 \b, PAL 4:3
  483. >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
  484. >>4 belong&0xFFFFFF00 0x2801E000 \b, LD-TV 640P
  485. >>>7 byte&0xF0 0x10 \b, 4:3
  486. >>4 belong&0xFFFFFF00 0x1400F000 \b, 320x240
  487. >>>7 byte&0xF0 0x10 \b, 4:3
  488. >>4 belong&0xFFFFFF00 0x0F00A000 \b, 240x160
  489. >>>7 byte&0xF0 0x10 \b, 4:3
  490. >>4 belong&0xFFFFFF00 0x0A007800 \b, 160x120
  491. >>>7 byte&0xF0 0x10 \b, 4:3
  492. >>4 beshort&0xFFF0 0x1600 \b, CIF
  493. >>>5 beshort&0x0FFF 0x00F0 \b NTSC
  494. >>>5 beshort&0x0FFF 0x0120 \b PAL
  495. >>>7 byte&0xF0 0x20 \b, 4:3
  496. >>>7 byte&0xF0 0x30 \b, 16:9
  497. >>>7 byte&0xF0 0x40 \b, 11:5
  498. >>>7 byte&0xF0 0x80 \b, PAL 4:3
  499. >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
  500. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  501. >>>>7 byte&0xF0 0x20 \b, 4:3
  502. >>>>7 byte&0xF0 0x30 \b, 16:9
  503. >>>>7 byte&0xF0 0x40 \b, 11:5
  504. >>4 beshort&0xFFF0 0x2D00 \b, CCIR/ITU
  505. >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
  506. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  507. >>>7 byte&0xF0 0x20 \b, 4:3
  508. >>>7 byte&0xF0 0x30 \b, 16:9
  509. >>>7 byte&0xF0 0x40 \b, 11:5
  510. >>4 beshort&0xFFF0 0x1E00 \b, SVCD
  511. >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
  512. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  513. >>>7 byte&0xF0 0x20 \b, 4:3
  514. >>>7 byte&0xF0 0x30 \b, 16:9
  515. >>>7 byte&0xF0 0x40 \b, 11:5
  516. >>7 byte&0x0F 1 \b, 23.976 fps
  517. >>7 byte&0x0F 2 \b, 24 fps
  518. >>7 byte&0x0F 3 \b, 25 fps
  519. >>7 byte&0x0F 4 \b, 29.97 fps
  520. >>7 byte&0x0F 5 \b, 30 fps
  521. >>7 byte&0x0F 6 \b, 50 fps
  522. >>7 byte&0x0F 7 \b, 59.94 fps
  523. >>7 byte&0x0F 8 \b, 60 fps
  524. >>11 byte &0x04 \b, Constrained
  525. # MPEG ADTS Audio (*.mpx/mxa/aac)
  526. # from dreesen@math.fu-berlin.de
  527. # modified to fully support MPEG ADTS
  528. # MP3, M1A
  529. # modified by Joerg Jenderek
  530. # GRR the original test are too common for many DOS files
  531. # so don't accept as MP3 until we've tested the rate
  532. # But also beat GEMDOS fonts
  533. 0 beshort&0xFFFE 0xFFFA
  534. # rates
  535. >2 byte&0xF0 !0
  536. >>2 byte&0xF0 !0xF0 MPEG ADTS, layer III, v1
  537. !:strength +20
  538. !:mime audio/mpeg
  539. >2 byte&0xF0 0x10 \b, 32 kbps
  540. >2 byte&0xF0 0x20 \b, 40 kbps
  541. >2 byte&0xF0 0x30 \b, 48 kbps
  542. >2 byte&0xF0 0x40 \b, 56 kbps
  543. >2 byte&0xF0 0x50 \b, 64 kbps
  544. >2 byte&0xF0 0x60 \b, 80 kbps
  545. >2 byte&0xF0 0x70 \b, 96 kbps
  546. >2 byte&0xF0 0x80 \b, 112 kbps
  547. >2 byte&0xF0 0x90 \b, 128 kbps
  548. >2 byte&0xF0 0xA0 \b, 160 kbps
  549. >2 byte&0xF0 0xB0 \b, 192 kbps
  550. >2 byte&0xF0 0xC0 \b, 224 kbps
  551. >2 byte&0xF0 0xD0 \b, 256 kbps
  552. >2 byte&0xF0 0xE0 \b, 320 kbps
  553. # timing
  554. >2 byte&0x0C 0x00 \b, 44.1 kHz
  555. >2 byte&0x0C 0x04 \b, 48 kHz
  556. >2 byte&0x0C 0x08 \b, 32 kHz
  557. # channels/options
  558. >3 byte&0xC0 0x00 \b, Stereo
  559. >3 byte&0xC0 0x40 \b, JntStereo
  560. >3 byte&0xC0 0x80 \b, 2x Monaural
  561. >3 byte&0xC0 0xC0 \b, Monaural
  562. #>1 byte ^0x01 \b, Data Verify
  563. #>2 byte &0x02 \b, Packet Pad
  564. #>2 byte &0x01 \b, Custom Flag
  565. #>3 byte &0x08 \b, Copyrighted
  566. #>3 byte &0x04 \b, Original Source
  567. #>3 byte&0x03 1 \b, NR: 50/15 ms
  568. #>3 byte&0x03 3 \b, NR: CCIT J.17
  569. # MP2, M1A
  570. 0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1
  571. !:mime audio/mpeg
  572. # rates
  573. >2 byte&0xF0 0x10 \b, 32 kbps
  574. >2 byte&0xF0 0x20 \b, 48 kbps
  575. >2 byte&0xF0 0x30 \b, 56 kbps
  576. >2 byte&0xF0 0x40 \b, 64 kbps
  577. >2 byte&0xF0 0x50 \b, 80 kbps
  578. >2 byte&0xF0 0x60 \b, 96 kbps
  579. >2 byte&0xF0 0x70 \b, 112 kbps
  580. >2 byte&0xF0 0x80 \b, 128 kbps
  581. >2 byte&0xF0 0x90 \b, 160 kbps
  582. >2 byte&0xF0 0xA0 \b, 192 kbps
  583. >2 byte&0xF0 0xB0 \b, 224 kbps
  584. >2 byte&0xF0 0xC0 \b, 256 kbps
  585. >2 byte&0xF0 0xD0 \b, 320 kbps
  586. >2 byte&0xF0 0xE0 \b, 384 kbps
  587. # timing
  588. >2 byte&0x0C 0x00 \b, 44.1 kHz
  589. >2 byte&0x0C 0x04 \b, 48 kHz
  590. >2 byte&0x0C 0x08 \b, 32 kHz
  591. # channels/options
  592. >3 byte&0xC0 0x00 \b, Stereo
  593. >3 byte&0xC0 0x40 \b, JntStereo
  594. >3 byte&0xC0 0x80 \b, 2x Monaural
  595. >3 byte&0xC0 0xC0 \b, Monaural
  596. #>1 byte ^0x01 \b, Data Verify
  597. #>2 byte &0x02 \b, Packet Pad
  598. #>2 byte &0x01 \b, Custom Flag
  599. #>3 byte &0x08 \b, Copyrighted
  600. #>3 byte &0x04 \b, Original Source
  601. #>3 byte&0x03 1 \b, NR: 50/15 ms
  602. #>3 byte&0x03 3 \b, NR: CCIT J.17
  603. # MPA, M1A
  604. # updated by Joerg Jenderek
  605. # GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
  606. # GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
  607. # FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
  608. #0 beshort&0xFFFE 0xFFFE
  609. #>2 ubyte&0xF0 >0x0F
  610. #>>2 ubyte&0xF0 <0xE1 MPEG ADTS, layer I, v1
  611. ## rate
  612. #>>>2 byte&0xF0 0x10 \b, 32 kbps
  613. #>>>2 byte&0xF0 0x20 \b, 64 kbps
  614. #>>>2 byte&0xF0 0x30 \b, 96 kbps
  615. #>>>2 byte&0xF0 0x40 \b, 128 kbps
  616. #>>>2 byte&0xF0 0x50 \b, 160 kbps
  617. #>>>2 byte&0xF0 0x60 \b, 192 kbps
  618. #>>>2 byte&0xF0 0x70 \b, 224 kbps
  619. #>>>2 byte&0xF0 0x80 \b, 256 kbps
  620. #>>>2 byte&0xF0 0x90 \b, 288 kbps
  621. #>>>2 byte&0xF0 0xA0 \b, 320 kbps
  622. #>>>2 byte&0xF0 0xB0 \b, 352 kbps
  623. #>>>2 byte&0xF0 0xC0 \b, 384 kbps
  624. #>>>2 byte&0xF0 0xD0 \b, 416 kbps
  625. #>>>2 byte&0xF0 0xE0 \b, 448 kbps
  626. ## timing
  627. #>>>2 byte&0x0C 0x00 \b, 44.1 kHz
  628. #>>>2 byte&0x0C 0x04 \b, 48 kHz
  629. #>>>2 byte&0x0C 0x08 \b, 32 kHz
  630. ## channels/options
  631. #>>>3 byte&0xC0 0x00 \b, Stereo
  632. #>>>3 byte&0xC0 0x40 \b, JntStereo
  633. #>>>3 byte&0xC0 0x80 \b, 2x Monaural
  634. #>>>3 byte&0xC0 0xC0 \b, Monaural
  635. ##>1 byte ^0x01 \b, Data Verify
  636. ##>2 byte &0x02 \b, Packet Pad
  637. ##>2 byte &0x01 \b, Custom Flag
  638. ##>3 byte &0x08 \b, Copyrighted
  639. ##>3 byte &0x04 \b, Original Source
  640. ##>3 byte&0x03 1 \b, NR: 50/15 ms
  641. ##>3 byte&0x03 3 \b, NR: CCIT J.17
  642. # MP3, M2A
  643. 0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2
  644. !:mime audio/mpeg
  645. # rate
  646. >2 byte&0xF0 0x10 \b, 8 kbps
  647. >2 byte&0xF0 0x20 \b, 16 kbps
  648. >2 byte&0xF0 0x30 \b, 24 kbps
  649. >2 byte&0xF0 0x40 \b, 32 kbps
  650. >2 byte&0xF0 0x50 \b, 40 kbps
  651. >2 byte&0xF0 0x60 \b, 48 kbps
  652. >2 byte&0xF0 0x70 \b, 56 kbps
  653. >2 byte&0xF0 0x80 \b, 64 kbps
  654. >2 byte&0xF0 0x90 \b, 80 kbps
  655. >2 byte&0xF0 0xA0 \b, 96 kbps
  656. >2 byte&0xF0 0xB0 \b, 112 kbps
  657. >2 byte&0xF0 0xC0 \b, 128 kbps
  658. >2 byte&0xF0 0xD0 \b, 144 kbps
  659. >2 byte&0xF0 0xE0 \b, 160 kbps
  660. # timing
  661. >2 byte&0x0C 0x00 \b, 22.05 kHz
  662. >2 byte&0x0C 0x04 \b, 24 kHz
  663. >2 byte&0x0C 0x08 \b, 16 kHz
  664. # channels/options
  665. >3 byte&0xC0 0x00 \b, Stereo
  666. >3 byte&0xC0 0x40 \b, JntStereo
  667. >3 byte&0xC0 0x80 \b, 2x Monaural
  668. >3 byte&0xC0 0xC0 \b, Monaural
  669. #>1 byte ^0x01 \b, Data Verify
  670. #>2 byte &0x02 \b, Packet Pad
  671. #>2 byte &0x01 \b, Custom Flag
  672. #>3 byte &0x08 \b, Copyrighted
  673. #>3 byte &0x04 \b, Original Source
  674. #>3 byte&0x03 1 \b, NR: 50/15 ms
  675. #>3 byte&0x03 3 \b, NR: CCIT J.17
  676. # MP2, M2A
  677. 0 beshort&0xFFFE 0xFFF4 MPEG ADTS, layer II, v2
  678. !:mime audio/mpeg
  679. # rate
  680. >2 byte&0xF0 0x10 \b, 8 kbps
  681. >2 byte&0xF0 0x20 \b, 16 kbps
  682. >2 byte&0xF0 0x30 \b, 24 kbps
  683. >2 byte&0xF0 0x40 \b, 32 kbps
  684. >2 byte&0xF0 0x50 \b, 40 kbps
  685. >2 byte&0xF0 0x60 \b, 48 kbps
  686. >2 byte&0xF0 0x70 \b, 56 kbps
  687. >2 byte&0xF0 0x80 \b, 64 kbps
  688. >2 byte&0xF0 0x90 \b, 80 kbps
  689. >2 byte&0xF0 0xA0 \b, 96 kbps
  690. >2 byte&0xF0 0xB0 \b, 112 kbps
  691. >2 byte&0xF0 0xC0 \b, 128 kbps
  692. >2 byte&0xF0 0xD0 \b, 144 kbps
  693. >2 byte&0xF0 0xE0 \b, 160 kbps
  694. # timing
  695. >2 byte&0x0C 0x00 \b, 22.05 kHz
  696. >2 byte&0x0C 0x04 \b, 24 kHz
  697. >2 byte&0x0C 0x08 \b, 16 kHz
  698. # channels/options
  699. >3 byte&0xC0 0x00 \b, Stereo
  700. >3 byte&0xC0 0x40 \b, JntStereo
  701. >3 byte&0xC0 0x80 \b, 2x Monaural
  702. >3 byte&0xC0 0xC0 \b, Monaural
  703. #>1 byte ^0x01 \b, Data Verify
  704. #>2 byte &0x02 \b, Packet Pad
  705. #>2 byte &0x01 \b, Custom Flag
  706. #>3 byte &0x08 \b, Copyrighted
  707. #>3 byte &0x04 \b, Original Source
  708. #>3 byte&0x03 1 \b, NR: 50/15 ms
  709. #>3 byte&0x03 3 \b, NR: CCIT J.17
  710. # MPA, M2A
  711. 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2
  712. !:mime audio/mpeg
  713. # rate
  714. >2 byte&0xF0 0x10 \b, 32 kbps
  715. >2 byte&0xF0 0x20 \b, 48 kbps
  716. >2 byte&0xF0 0x30 \b, 56 kbps
  717. >2 byte&0xF0 0x40 \b, 64 kbps
  718. >2 byte&0xF0 0x50 \b, 80 kbps
  719. >2 byte&0xF0 0x60 \b, 96 kbps
  720. >2 byte&0xF0 0x70 \b, 112 kbps
  721. >2 byte&0xF0 0x80 \b, 128 kbps
  722. >2 byte&0xF0 0x90 \b, 144 kbps
  723. >2 byte&0xF0 0xA0 \b, 160 kbps
  724. >2 byte&0xF0 0xB0 \b, 176 kbps
  725. >2 byte&0xF0 0xC0 \b, 192 kbps
  726. >2 byte&0xF0 0xD0 \b, 224 kbps
  727. >2 byte&0xF0 0xE0 \b, 256 kbps
  728. # timing
  729. >2 byte&0x0C 0x00 \b, 22.05 kHz
  730. >2 byte&0x0C 0x04 \b, 24 kHz
  731. >2 byte&0x0C 0x08 \b, 16 kHz
  732. # channels/options
  733. >3 byte&0xC0 0x00 \b, Stereo
  734. >3 byte&0xC0 0x40 \b, JntStereo
  735. >3 byte&0xC0 0x80 \b, 2x Monaural
  736. >3 byte&0xC0 0xC0 \b, Monaural
  737. #>1 byte ^0x01 \b, Data Verify
  738. #>2 byte &0x02 \b, Packet Pad
  739. #>2 byte &0x01 \b, Custom Flag
  740. #>3 byte &0x08 \b, Copyrighted
  741. #>3 byte &0x04 \b, Original Source
  742. #>3 byte&0x03 1 \b, NR: 50/15 ms
  743. #>3 byte&0x03 3 \b, NR: CCIT J.17
  744. # MP3, M25A
  745. 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5
  746. !:mime audio/mpeg
  747. # rate
  748. >2 byte&0xF0 0x10 \b, 8 kbps
  749. >2 byte&0xF0 0x20 \b, 16 kbps
  750. >2 byte&0xF0 0x30 \b, 24 kbps
  751. >2 byte&0xF0 0x40 \b, 32 kbps
  752. >2 byte&0xF0 0x50 \b, 40 kbps
  753. >2 byte&0xF0 0x60 \b, 48 kbps
  754. >2 byte&0xF0 0x70 \b, 56 kbps
  755. >2 byte&0xF0 0x80 \b, 64 kbps
  756. >2 byte&0xF0 0x90 \b, 80 kbps
  757. >2 byte&0xF0 0xA0 \b, 96 kbps
  758. >2 byte&0xF0 0xB0 \b, 112 kbps
  759. >2 byte&0xF0 0xC0 \b, 128 kbps
  760. >2 byte&0xF0 0xD0 \b, 144 kbps
  761. >2 byte&0xF0 0xE0 \b, 160 kbps
  762. # timing
  763. >2 byte&0x0C 0x00 \b, 11.025 kHz
  764. >2 byte&0x0C 0x04 \b, 12 kHz
  765. >2 byte&0x0C 0x08 \b, 8 kHz
  766. # channels/options
  767. >3 byte&0xC0 0x00 \b, Stereo
  768. >3 byte&0xC0 0x40 \b, JntStereo
  769. >3 byte&0xC0 0x80 \b, 2x Monaural
  770. >3 byte&0xC0 0xC0 \b, Monaural
  771. #>1 byte ^0x01 \b, Data Verify
  772. #>2 byte &0x02 \b, Packet Pad
  773. #>2 byte &0x01 \b, Custom Flag
  774. #>3 byte &0x08 \b, Copyrighted
  775. #>3 byte &0x04 \b, Original Source
  776. #>3 byte&0x03 1 \b, NR: 50/15 ms
  777. #>3 byte&0x03 3 \b, NR: CCIT J.17
  778. # AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
  779. # Stored AAC streams (instead of the MP4 format)
  780. 0 string ADIF MPEG ADIF, AAC
  781. !:mime audio/x-hx-aac-adif
  782. >4 byte &0x80
  783. >>13 byte &0x10 \b, VBR
  784. >>13 byte ^0x10 \b, CBR
  785. >>16 byte&0x1E 0x02 \b, single stream
  786. >>16 byte&0x1E 0x04 \b, 2 streams
  787. >>16 byte&0x1E 0x06 \b, 3 streams
  788. >>16 byte &0x08 \b, 4 or more streams
  789. >>16 byte &0x10 \b, 8 or more streams
  790. >>4 byte &0x80 \b, Copyrighted
  791. >>13 byte &0x40 \b, Original Source
  792. >>13 byte &0x20 \b, Home Flag
  793. >4 byte ^0x80
  794. >>4 byte &0x10 \b, VBR
  795. >>4 byte ^0x10 \b, CBR
  796. >>7 byte&0x1E 0x02 \b, single stream
  797. >>7 byte&0x1E 0x04 \b, 2 streams
  798. >>7 byte&0x1E 0x06 \b, 3 streams
  799. >>7 byte &0x08 \b, 4 or more streams
  800. >>7 byte &0x10 \b, 8 or more streams
  801. >>4 byte &0x40 \b, Original Stream(s)
  802. >>4 byte &0x20 \b, Home Source
  803. # Live or stored single AAC stream (used with MPEG-2 systems)
  804. 0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC
  805. !:mime audio/x-hx-aac-adts
  806. >1 byte &0x08 \b, v2
  807. >1 byte ^0x08 \b, v4
  808. # profile
  809. >>2 byte &0xC0 \b LTP
  810. >2 byte&0xc0 0x00 \b Main
  811. >2 byte&0xc0 0x40 \b LC
  812. >2 byte&0xc0 0x80 \b SSR
  813. # timing
  814. >2 byte&0x3c 0x00 \b, 96 kHz
  815. >2 byte&0x3c 0x04 \b, 88.2 kHz
  816. >2 byte&0x3c 0x08 \b, 64 kHz
  817. >2 byte&0x3c 0x0c \b, 48 kHz
  818. >2 byte&0x3c 0x10 \b, 44.1 kHz
  819. >2 byte&0x3c 0x14 \b, 32 kHz
  820. >2 byte&0x3c 0x18 \b, 24 kHz
  821. >2 byte&0x3c 0x1c \b, 22.05 kHz
  822. >2 byte&0x3c 0x20 \b, 16 kHz
  823. >2 byte&0x3c 0x24 \b, 12 kHz
  824. >2 byte&0x3c 0x28 \b, 11.025 kHz
  825. >2 byte&0x3c 0x2c \b, 8 kHz
  826. # channels
  827. >2 beshort&0x01c0 0x0040 \b, monaural
  828. >2 beshort&0x01c0 0x0080 \b, stereo
  829. >2 beshort&0x01c0 0x00c0 \b, stereo + center
  830. >2 beshort&0x01c0 0x0100 \b, stereo+center+LFE
  831. >2 beshort&0x01c0 0x0140 \b, surround
  832. >2 beshort&0x01c0 0x0180 \b, surround + LFE
  833. >2 beshort &0x01C0 \b, surround + side
  834. #>1 byte ^0x01 \b, Data Verify
  835. #>2 byte &0x02 \b, Custom Flag
  836. #>3 byte &0x20 \b, Original Stream
  837. #>3 byte &0x10 \b, Home Source
  838. #>3 byte &0x08 \b, Copyrighted
  839. # Live MPEG-4 audio streams (instead of RTP FlexMux)
  840. 0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS
  841. !:mime audio/x-mp4a-latm
  842. #>1 beshort&0x1FFF x \b, %hu byte packet
  843. >3 byte&0xE0 0x40
  844. >>4 byte&0x3C 0x04 \b, single stream
  845. >>4 byte&0x3C 0x08 \b, 2 streams
  846. >>4 byte&0x3C 0x0C \b, 3 streams
  847. >>4 byte &0x08 \b, 4 or more streams
  848. >>4 byte &0x20 \b, 8 or more streams
  849. >3 byte&0xC0 0
  850. >>4 byte&0x78 0x08 \b, single stream
  851. >>4 byte&0x78 0x10 \b, 2 streams
  852. >>4 byte&0x78 0x18 \b, 3 streams
  853. >>4 byte &0x20 \b, 4 or more streams
  854. >>4 byte &0x40 \b, 8 or more streams
  855. # This magic isn't strong enough (matches plausible ISO-8859-1 text)
  856. #0 beshort 0x4DE1 MPEG-4 LO-EP audio stream
  857. #!:mime audio/x-mp4a-latm
  858. # Summary: FLI animation format
  859. # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
  860. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
  861. 4 leshort 0xAF11
  862. # standard FLI always has 320x200 resolution and 8 bit color
  863. >8 leshort 320
  864. >>10 leshort 200
  865. >>>12 leshort 8 FLI animation, 320x200x8
  866. !:mime video/x-fli
  867. >>>>6 leshort x \b, %d frames
  868. # frame speed is multiple of 1/70s
  869. >>>>16 leshort x \b, %d/70s per frame
  870. # Summary: FLC animation format
  871. # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
  872. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
  873. 4 leshort 0xAF12
  874. # standard FLC always use 8 bit color
  875. >12 leshort 8 FLC animation
  876. !:mime video/x-flc
  877. >>8 leshort x \b, %d
  878. >>10 leshort x \bx%dx8
  879. >>6 uleshort x \b, %d frames
  880. >>16 uleshort x \b, %dms per frame
  881. # DL animation format
  882. # XXX - collision with most `mips' magic
  883. #
  884. # I couldn't find a real magic number for these, however, this
  885. # -appears- to work. Note that it might catch other files, too, so be
  886. # careful!
  887. #
  888. # Note that title and author appear in the two 20-byte chunks
  889. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  890. # 255 (hex FF)! The DL format is really bad.
  891. #
  892. #0 byte 1 DL version 1, medium format (160x100, 4 images/screen)
  893. #!:mime video/x-unknown
  894. #>42 byte x - %d screens,
  895. #>43 byte x %d commands
  896. #0 byte 2 DL version 2
  897. #!:mime video/x-unknown
  898. #>1 byte 1 - large format (320x200,1 image/screen),
  899. #>1 byte 2 - medium format (160x100,4 images/screen),
  900. #>1 byte >2 - unknown format,
  901. #>42 byte x %d screens,
  902. #>43 byte x %d commands
  903. # Based on empirical evidence, DL version 3 have several nulls following the
  904. # \003. Most of them start with non-null values at hex offset 0x34 or so.
  905. #0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3
  906. # iso 13818 transport stream
  907. #
  908. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
  909. # syncbyte 8 bit 0x47
  910. # error_ind 1 bit -
  911. # payload_start 1 bit 1
  912. # priority 1 bit -
  913. # PID 13 bit 0x0000
  914. # scrambling 2 bit -
  915. # adaptfld_ctrl 2 bit 1 or 3
  916. # conti_count 4 bit -
  917. 0 belong&0xFF5FFF10 0x47400010
  918. >188 byte 0x47 MPEG transport stream data
  919. !:mime video/MP2T
  920. !:ext ts
  921. # Blu-ray disc Audio-Video MPEG-2 transport stream
  922. # From: Alexandre Iooss <erdnaxe@crans.org>
  923. # URL: https://en.wikipedia.org/wiki/MPEG_transport_stream
  924. # Note: similar to ISO 13818.1 but with 4 extra bytes per packets
  925. 4 belong&0xFF5FFF10 =0x47400010
  926. >196 byte =0x47 BDAV MPEG-2 Transport Stream (M2TS)
  927. !:mime video/MP2T
  928. !:ext m2ts/mts
  929. # DIF digital video file format <mpruett@sgi.com>
  930. 0 belong&0xffffff00 0x1f070000 DIF
  931. !:mime video/x-dv
  932. >4 byte &0x01 (DVCPRO) movie file
  933. >4 byte ^0x01 (DV) movie file
  934. >3 byte &0x80 (PAL)
  935. >3 byte ^0x80 (NTSC)
  936. # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  937. 0 string \x8aMNG MNG video data,
  938. !:mime video/x-mng
  939. >4 belong !0x0d0a1a0a CORRUPTED,
  940. >4 belong 0x0d0a1a0a
  941. >>16 belong x %d x
  942. >>20 belong x %d
  943. # JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  944. 0 string \x8bJNG JNG video data,
  945. !:mime video/x-jng
  946. >4 belong !0x0d0a1a0a CORRUPTED,
  947. >4 belong 0x0d0a1a0a
  948. >>16 belong x %d x
  949. >>20 belong x %d
  950. # Vivo video (Wolfram Kleff)
  951. 3 string \x0D\x0AVersion:Vivo Vivo video data
  952. # ABC (alembic.io 3d models)
  953. 0 string 0gawa ABC 3d model
  954. #---------------------------------------------------------------------------
  955. # HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
  956. # From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
  957. #
  958. 0 string HVQM4 %s
  959. >6 string >\0 v%s
  960. >0 byte x GameCube movie,
  961. >0x34 ubeshort x %d x
  962. >0x36 ubeshort x %d,
  963. >0x26 ubeshort x %dus,
  964. >0x42 ubeshort 0 no audio
  965. >0x42 ubeshort >0 %dHz audio
  966. # From: Stefan A. Haubenthal <polluks@sdf.lonestar.org>
  967. # Update: Joerg Jenderek
  968. # URL: https://en.wikipedia.org/wiki/VOB
  969. 0 string DVDVIDEO-VTS Video title set,
  970. !:mime video/x-ifo
  971. !:ext ifo/bup
  972. >0x21 byte x v%x
  973. 0 string DVDVIDEO-VMG Video manager,
  974. !:mime video/x-ifo
  975. !:ext ifo/bup
  976. >0x21 byte x v%x
  977. # From: Stefan A. Haubenthal <polluks@sdf.lonestar.org>
  978. 0 string xMovieSetter MovieSetter movie
  979. 0 string xSceneEditor MovieSetter movie
  980. # From: Behan Webster <behanw@websterwood.com>
  981. # NuppelVideo used by Mythtv (*.nuv)
  982. # Note: there are two identical stanzas here differing only in the
  983. # initial string matched. It used to be done with a regex, but we're
  984. # trying to get rid of those.
  985. 0 string NuppelVideo MythTV NuppelVideo
  986. >12 string x v%s
  987. >20 lelong x (%d
  988. >24 lelong x \bx%d),
  989. >36 string P \bprogressive,
  990. >36 string I \binterlaced,
  991. >40 ledouble x \baspect:%.2f,
  992. >48 ledouble x \bfps:%.2f
  993. 0 string MythTV MythTV NuppelVideo
  994. >12 string x v%s
  995. >20 lelong x (%d
  996. >24 lelong x \bx%d),
  997. >36 string P \bprogressive,
  998. >36 string I \binterlaced,
  999. >40 ledouble x \baspect:%.2f,
  1000. >48 ledouble x \bfps:%.2f
  1001. # MPEG file
  1002. # MPEG sequences
  1003. # FIXME: This section is from the old magic.mime file and needs
  1004. # integrating with the rest
  1005. #0 belong 0x000001BA
  1006. #>4 byte &0x40
  1007. #!:mime video/mp2p
  1008. #>4 byte ^0x40
  1009. #!:mime video/mpeg
  1010. #0 belong 0x000001BB
  1011. #!:mime video/mpeg
  1012. #0 belong 0x000001B0
  1013. #!:mime video/mp4v-es
  1014. #0 belong 0x000001B5
  1015. #!:mime video/mp4v-es
  1016. #0 belong 0x000001B3
  1017. #!:mime video/mpv
  1018. #0 belong&0xFF5FFF10 0x47400010
  1019. #!:mime video/mp2t
  1020. #0 belong 0x00000001
  1021. #>4 byte&0x1F 0x07
  1022. #!:mime video/h264
  1023. # Type: Bink Video
  1024. # Extension: .bik
  1025. # URL: https://wiki.multimedia.cx/index.php?title=Bink_Container
  1026. # From: <hoehle@users.sourceforge.net> 2008-07-18
  1027. 0 name bik
  1028. #>4 ulelong x size %d
  1029. >20 ulelong x \b, %d
  1030. >24 ulelong x \bx%d
  1031. >8 ulelong x \b, %d frames
  1032. >32 ulelong x at rate %d/
  1033. >28 ulelong >1 \b%d
  1034. >40 ulelong =0 \b, no audio
  1035. >40 ulelong !0 \b, %d audio track
  1036. >>40 ulelong !1 \bs
  1037. # follow properties of the first audio track only
  1038. >>48 uleshort x %dHz
  1039. >>51 byte&0x20 0 mono
  1040. >>51 byte&0x20 !0 stereo
  1041. #>>51 byte&0x10 0 FFT
  1042. #>>51 byte&0x10 !0 DCT
  1043. 0 string BIK
  1044. >3 regex =[bdfghi] Bink Video rev.%s
  1045. >>0 use bik
  1046. 0 string KB2
  1047. >3 regex =[adfghi] Bink Video 2 rev.%s
  1048. >>0 use bik
  1049. # Type: NUT Container
  1050. # URL: https://wiki.multimedia.cx/index.php?title=NUT
  1051. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1052. 0 string nut/multimedia\ container\0 NUT multimedia container
  1053. # Type: Nullsoft Video (NSV)
  1054. # URL: https://wiki.multimedia.cx/index.php?title=Nullsoft_Video
  1055. # From: Mike Melanson <mike@multimedia.cx>
  1056. 0 string NSVf Nullsoft Video
  1057. # Type: REDCode Video
  1058. # URL: https://www.red.com/ ; https://wiki.multimedia.cx/index.php?title=REDCode
  1059. # From: Mike Melanson <mike@multimedia.cx>
  1060. 4 string RED1 REDCode Video
  1061. # Type: MTV Multimedia File
  1062. # URL: https://wiki.multimedia.cx/index.php?title=MTV
  1063. # From: Mike Melanson <mike@multimedia.cx>
  1064. 0 string AMVS MTV Multimedia File
  1065. # Type: ARMovie
  1066. # URL: https://wiki.multimedia.cx/index.php?title=ARMovie
  1067. # From: Mike Melanson <mike@multimedia.cx>
  1068. 0 string ARMovie\012 ARMovie
  1069. # Type: Interplay MVE Movie
  1070. # URL: https://wiki.multimedia.cx/index.php?title=Interplay_MVE
  1071. # From: Mike Melanson <mike@multimedia.cx>
  1072. 0 string Interplay\040MVE\040File\032 Interplay MVE Movie
  1073. # Type: Windows Television DVR File
  1074. # URL: https://wiki.multimedia.cx/index.php?title=WTV
  1075. # From: Mike Melanson <mike@mutlimedia.cx>
  1076. # This takes the form of a Windows-style GUID
  1077. 0 bequad 0xB7D800203749DA11
  1078. >8 bequad 0xA64E0007E95EAD8D Windows Television DVR Media
  1079. # Type: Sega FILM/CPK Multimedia
  1080. # URL: https://wiki.multimedia.cx/index.php?title=Sega_FILM
  1081. # From: Mike Melanson <mike@multimedia.cx>
  1082. 0 string FILM Sega FILM/CPK Multimedia,
  1083. >32 belong x %d x
  1084. >28 belong x %d
  1085. # Type: Nintendo THP Multimedia
  1086. # URL: https://wiki.multimedia.cx/index.php?title=THP
  1087. # From: Mike Melanson <mike@multimedia.cx>
  1088. 0 string THP\0 Nintendo THP Multimedia
  1089. # Type: BBC Dirac Video
  1090. # URL: https://wiki.multimedia.cx/index.php?title=Dirac
  1091. # From: Mike Melanson <mike@multimedia.cx>
  1092. 0 string BBCD BBC Dirac Video
  1093. # Type: RAD Game Tools Smacker Multimedia
  1094. # URL: https://wiki.multimedia.cx/index.php?title=Smacker
  1095. # From: Mike Melanson <mike@multimedia.cx>
  1096. 0 string SMK RAD Game Tools Smacker Multimedia
  1097. >3 byte x version %c,
  1098. >4 lelong x %d x
  1099. >8 lelong x %d,
  1100. >12 lelong x %d frames
  1101. # Material Exchange Format
  1102. # More information:
  1103. # https://en.wikipedia.org/wiki/Material_Exchange_Format
  1104. # http://www.freemxf.org/
  1105. 0 string \x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02 Material exchange container format
  1106. !:ext mxf
  1107. !:mime application/mxf
  1108. # Recognize LucasArts Smush video files (cf.
  1109. # https://wiki.multimedia.cx/index.php/Smush)
  1110. 0 string ANIM
  1111. >8 string AHDR LucasArts Smush Animation Format (SAN) video
  1112. 0 string SANM
  1113. >8 string SHDR LucasArts Smush v2 (SANM) video
  1114. # Type: Scaleform video
  1115. # Extension: .usm
  1116. # URL: https://wiki.multimedia.cx/index.php/USM
  1117. # From: David Korth <gerbilsoft@gerbilsoft.com>
  1118. 0 string CRID
  1119. >32 string @UTF Scaleform video
  1120. # http://www.jerrysguide.com/tips/demystify-tvs-file-format.html
  1121. 0 string TVS\015\012
  1122. >&0 string Version\040 TeamViewer Session File
  1123. >>&0 string x \b, version %s
  1124. # SER file format - simple uncompressed video format for astronomical use
  1125. # Initially developed by Lucam Recorder,
  1126. # as of 2021 maintained by Heiko Wilkens, Grischa Hahn
  1127. # Typical extensions: .SER
  1128. # http://www.grischa-hahn.homepage.t-online.de/astro/ser/SER%20Doc%20V3b.pdf
  1129. 0 string LUCAM-RECORDER SER video sequence
  1130. !:ext ser
  1131. >18 lelong 0 \b, bayer: mono
  1132. >18 lelong 8 \b, bayer: RGGB
  1133. >18 lelong 9 \b, bayer: GRBG
  1134. >18 lelong 10 \b, bayer: GBRG
  1135. >18 lelong 11 \b, bayer: BGGR
  1136. >18 lelong 16 \b, bayer: CYYM
  1137. >18 lelong 17 \b, bayer: YCMY
  1138. >18 lelong 18 \b, bayer: YMCY
  1139. >18 lelong 19 \b, bayer: MYYC
  1140. >18 lelong 100 \b, bayer: RGB
  1141. >18 lelong 101 \b, bayer: BGR
  1142. >22 lelong 0 \b, big-endian
  1143. >22 lelong 1 \b, little-endian
  1144. >26 lelong x \b, width: %d
  1145. >30 lelong x \b, height: %d
  1146. >34 lelong x \b, %d bit
  1147. >38 lelong x \b, frames: %d
  1148. # https://wiki.multimedia.cx/index.php/Duck_IVF
  1149. 0 string DKIF Duck IVF video file
  1150. !:mime video/x-ivf
  1151. >4 leshort >0 \b, version %d
  1152. >8 string x \b, codec %s
  1153. >12 leshort x \b, %d
  1154. >14 leshort x \bx%d
  1155. >24 lelong >0 \b, %d frames