animation 51 KB

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