1 #------------------------------------------------------------------------------
2 # audio: file(1) magic for sound formats (see also "iff")
4 # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
9 0 string .snd Sun/NeXT audio data:
10 >12 belong 1 8-bit ISDN mu-law,
12 >12 belong 2 8-bit linear PCM [REF-PCM],
14 >12 belong 3 16-bit linear PCM,
16 >12 belong 4 24-bit linear PCM,
18 >12 belong 5 32-bit linear PCM,
20 >12 belong 6 32-bit IEEE floating point,
22 >12 belong 7 64-bit IEEE floating point,
24 >12 belong 8 Fragmented sample data,
25 >12 belong 10 DSP program,
26 >12 belong 11 8-bit fixed point,
27 >12 belong 12 16-bit fixed point,
28 >12 belong 13 24-bit fixed point,
29 >12 belong 14 32-bit fixed point,
30 >12 belong 18 16-bit linear with emphasis,
31 >12 belong 19 16-bit linear compressed,
32 >12 belong 20 16-bit linear with emphasis and compression,
33 >12 belong 21 Music kit DSP commands,
34 >12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
36 >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
37 >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
38 >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
39 >12 belong 27 8-bit A-law (CCITT G.711),
45 # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
46 # that uses little-endian encoding and has a different magic number
47 0 lelong 0x0064732E DEC audio data:
48 >12 lelong 1 8-bit ISDN mu-law,
49 !:mime audio/x-dec-basic
50 >12 lelong 2 8-bit linear PCM [REF-PCM],
51 !:mime audio/x-dec-basic
52 >12 lelong 3 16-bit linear PCM,
53 !:mime audio/x-dec-basic
54 >12 lelong 4 24-bit linear PCM,
55 !:mime audio/x-dec-basic
56 >12 lelong 5 32-bit linear PCM,
57 !:mime audio/x-dec-basic
58 >12 lelong 6 32-bit IEEE floating point,
59 !:mime audio/x-dec-basic
60 >12 lelong 7 64-bit IEEE floating point,
61 !:mime audio/x-dec-basic
62 >12 belong 8 Fragmented sample data,
63 >12 belong 10 DSP program,
64 >12 belong 11 8-bit fixed point,
65 >12 belong 12 16-bit fixed point,
66 >12 belong 13 24-bit fixed point,
67 >12 belong 14 32-bit fixed point,
68 >12 belong 18 16-bit linear with emphasis,
69 >12 belong 19 16-bit linear compressed,
70 >12 belong 20 16-bit linear with emphasis and compression,
71 >12 belong 21 Music kit DSP commands,
72 >12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
73 !:mime audio/x-dec-basic
74 >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
75 >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
76 >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
77 >12 belong 27 8-bit A-law (CCITT G.711),
83 # Creative Labs AUDIO stuff
84 0 string MThd Standard MIDI data
86 >8 beshort x (format %d)
87 >10 beshort x using %d track
89 >12 beshort&0x7fff x at 1/%d
90 >12 beshort&0x8000 >0 SMPTE
92 0 string CTMF Creative Music (CMF) data
93 !:mime audio/x-unknown
94 0 string SBI SoundBlaster instrument data
95 !:mime audio/x-unknown
96 0 string Creative\ Voice\ File Creative Labs voice data
97 !:mime audio/x-unknown
98 # is this next line right? it came this way...
100 >23 byte >0 - version %d
103 # first entry is also the string "NTRK"
104 0 belong 0x4e54524b MultiTrack sound data
105 >4 belong x - version %ld
107 # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
108 # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
109 0 string EMOD Extended MOD sound data,
110 >4 byte&0xf0 x version %d
111 >4 byte&0x0f x \b.%d,
112 >45 byte x %d instruments
116 # Real Audio (Magic .ra\0375)
117 0 belong 0x2e7261fd RealAudio sound file
118 !:mime audio/x-pn-realaudio
119 0 string .RMF RealMedia file
120 !:mime application/vnd.rn-realmedia
121 #video/x-pn-realvideo
122 #video/vnd.rn-realvideo
123 #application/vnd.rn-realmedia
124 # sigh, there are many mimes for that but the above are the most common.
126 # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
128 # fixed by <doj@cubic.org> 2003-06-24
130 #0 string MTM MultiTracker Module sound file
131 #0 string if Composer 669 Module sound data
132 #0 string JN Composer 669 Module sound data (extended format)
133 0 string MAS_U ULT(imate) Module sound data
135 #0 string FAR Module sound data
136 #>4 string >\15 Title: "%s"
138 0x2c string SCRM ScreamTracker III Module sound data
139 >0 string >\0 Title: "%s"
141 # Gravis UltraSound patches
142 # From <ache@nagual.ru>
144 0 string GF1PATCH110\0ID#000002\0 GUS patch
145 0 string GF1PATCH100\0ID#000002\0 Old GUS patch
147 # mime types according to http://www.geocities.com/nevilo/mod.htm:
149 # audio/x-zipped-it .itz
150 # audio/xm fasttracker modules
151 # audio/x-s3m screamtracker modules
152 # audio/s3m screamtracker modules
153 # audio/x-zipped-mod mdz
155 # audio/x-mod All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
158 # Taken from loader code from mikmod version 2.14
159 # by Steve McIntyre (stevem@chiark.greenend.org.uk)
160 # <doj@cubic.org> added title printing on 2003-06-24
161 0 string MAS_UTrack_V00
162 >14 string >/0 ultratracker V1.%.1s module sound data
164 #audio/x-tracker-module
166 0 string UN05 MikMod UNI format module sound data
168 0 string Extended\ Module: Fasttracker II module sound data
170 #audio/x-tracker-module
171 >17 string >\0 Title: "%s"
173 21 string/c =!SCREAM! Screamtracker 2 module sound data
175 #audio/x-screamtracker-module
176 21 string BMOD2STM Screamtracker 2 module sound data
178 #audio/x-screamtracker-module
179 1080 string M.K. 4-channel Protracker module sound data
181 #audio/x-protracker-module
182 >0 string >\0 Title: "%s"
183 1080 string M!K! 4-channel Protracker module sound data
185 #audio/x-protracker-module
186 >0 string >\0 Title: "%s"
187 1080 string FLT4 4-channel Startracker module sound data
189 #audio/x-startracker-module
190 >0 string >\0 Title: "%s"
191 1080 string FLT8 8-channel Startracker module sound data
193 #audio/x-startracker-module
194 >0 string >\0 Title: "%s"
195 1080 string 4CHN 4-channel Fasttracker module sound data
197 #audio/x-fasttracker-module
198 >0 string >\0 Title: "%s"
199 1080 string 6CHN 6-channel Fasttracker module sound data
201 #audio/x-fasttracker-module
202 >0 string >\0 Title: "%s"
203 1080 string 8CHN 8-channel Fasttracker module sound data
205 #audio/x-fasttracker-module
206 >0 string >\0 Title: "%s"
207 1080 string CD81 8-channel Octalyser module sound data
209 #audio/x-octalysertracker-module
210 >0 string >\0 Title: "%s"
211 1080 string OKTA 8-channel Octalyzer module sound data
213 #audio/x-octalysertracker-module
214 >0 string >\0 Title: "%s"
217 #>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
218 1080 string 16CN 16-channel Taketracker module sound data
220 #audio/x-taketracker-module
221 >0 string >\0 Title: "%s"
222 1080 string 32CN 32-channel Taketracker module sound data
224 #audio/x-taketracker-module
225 >0 string >\0 Title: "%s"
227 # TOC sound files -Trevor Johnson <trevor@jpj.net>
229 0 string TOC TOC sound file
231 # sidfiles <pooka@iki.fi>
232 # added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
233 0 string SIDPLAY\ INFOFILE Sidplay info file
235 0 string PSID PlaySID v2.2+ (AMIGA) sidtune
236 >4 beshort >0 w/ header v%d,
237 >14 beshort =1 single song,
238 >14 beshort >1 %d songs,
239 >16 beshort >0 default song: %d
240 >0x16 string >\0 name: "%s"
241 >0x36 string >\0 author: "%s"
242 >0x56 string >\0 copyright: "%s"
244 0 string RSID RSID sidtune PlaySID compatible
245 >4 beshort >0 w/ header v%d,
246 >14 beshort =1 single song,
247 >14 beshort >1 %d songs,
248 >16 beshort >0 default song: %d
249 >0x16 string >\0 name: "%s"
250 >0x36 string >\0 author: "%s"
251 >0x56 string >\0 copyright: "%s"
253 # IRCAM <mpruett@sgi.com>
254 # VAX and MIPS files are little-endian; Sun and NeXT are big-endian
255 0 belong 0x64a30100 IRCAM file (VAX)
256 0 belong 0x64a30200 IRCAM file (Sun)
257 0 belong 0x64a30300 IRCAM file (MIPS little-endian)
258 0 belong 0x64a30400 IRCAM file (NeXT)
260 # NIST SPHERE <mpruett@sgi.com>
261 0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file
263 # Sample Vision <mpruett@sgi.com>
264 0 string SOUND\ SAMPLE\ DATA\ Sample Vision file
266 # Audio Visual Research <tonigonenstein@users.sourceforge.net>
267 0 string 2BIT Audio Visual Research file,
269 >12 beshort =-1 stereo,
270 >14 beshort x %d bits
271 >16 beshort =0 unsigned,
272 >16 beshort =-1 signed,
273 >22 belong&0x00ffffff x %d Hz,
274 >18 beshort =0 no loop,
275 >18 beshort =-1 loop,
276 >21 ubyte <128 note %d,
277 >22 byte =0 replay 5.485 KHz
278 >22 byte =1 replay 8.084 KHz
279 >22 byte =2 replay 10.971 Khz
280 >22 byte =3 replay 16.168 Khz
281 >22 byte =4 replay 21.942 KHz
282 >22 byte =5 replay 32.336 KHz
283 >22 byte =6 replay 43.885 KHz
284 >22 byte =7 replay 47.261 KHz
286 # SGI SoundTrack <mpruett@sgi.com>
287 0 string _SGI_SoundTrack SGI SoundTrack project file
288 # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
289 0 string ID3 Audio file with ID3 version 2
292 >>5 byte &0x80 \b, unsynchronized frames
293 >>5 byte &0x40 \b, extended header
294 >>5 byte &0x20 \b, experimental
295 >>5 byte &0x10 \b, footer present
296 >(6.I) indirect x \b, contains:
298 # NSF (NES sound file) magic
299 0 string NESM\x1a NES Sound File
300 >14 string >\0 ("%s" by
301 >46 string >\0 %s, copyright
303 >5 byte x version %d,
305 >122 byte&0x2 =1 dual PAL/NTSC
307 >122 byte&0x1 =0 NTSC
309 # Impulse tracker module (audio/x-it)
310 0 string IMPM Impulse Tracker module sound data -
313 >40 leshort !0 compatible w/ITv%x
314 >42 leshort !0 created w/ITv%x
316 # Imago Orpheus module (audio/x-imf)
317 60 string IM10 Imago Orpheus module sound data -
320 # From <collver1@attbi.com>
321 # These are the /etc/magic entries to decode modules, instruments, and
322 # samples in Impulse Tracker's native format.
324 0 string IMPS Impulse Tracker Sample
329 0 string IMPI Impulse Tracker Instrument
331 >30 byte !0 %d samples
333 # Yamaha TX Wave: file(1) magic for Yamaha TX Wave audio files
334 # From <collver1@attbi.com>
335 0 string LM8953 Yamaha TX Wave
337 >22 byte 0xC9 non-looped
342 # scream tracker: file(1) magic for Scream Tracker sample files
344 # From <collver1@attbi.com>
345 76 string SCRS Scream Tracker Sample
347 >0 byte 2 adlib melody
348 >0 byte >2 adlib drum
351 >31 byte &4 16bit little endian
357 # From: Cory Dikkers <cdikkers@swbell.net>
358 0 string MMD0 MED music file, version 0
359 0 string MMD1 OctaMED Pro music file, version 1
360 0 string MMD3 OctaMED Soundstudio music file, version 3
361 0 string OctaMEDCmpr OctaMED Soundstudio compressed file
362 0 string MED MED_Song
363 0 string SymM Symphonie SymMOD music file
365 0 string THX AHX version
366 >3 byte =0 1 module data
367 >3 byte =1 2 module data
369 0 string OKTASONG Oktalyzer module data
371 0 string DIGI\ Booster\ module\0 %s
376 >610 string >\0 \b, "%s"
378 0 string DBM0 DIGI Booster Pro Module
381 >16 string >\0 \b, "%s"
383 0 string FTMN FaceTheMusic module
384 >16 string >\0d \b, "%s"
386 # From: <doj@cubic.org> 2003-06-24
387 0 string AMShdr\32 Velvet Studio AMS Module v2.2
388 0 string Extreme Extreme Tracker AMS Module v1.3
389 0 string DDMF Xtracker DMF Module
391 >0xD string >\0 Title: "%s"
392 >0x2B string >\0 Composer: "%s"
393 0 string DSM\32 Dynamic Studio Module DSM
394 0 string SONG DigiTrekker DTM Module
395 0 string DMDL DigiTrakker MDL Module
396 0 string PSM\32 Protracker Studio PSM Module
397 44 string PTMF Poly Tracker PTM Module
398 >0 string >\32 Title: "%s"
399 0 string MT20 MadTracker 2.0 Module MT2
400 0 string RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
401 0 string RTMM RTM Module
402 0x426 string MaDoKaN96 XMS Adlib Module
403 >0 string >\0 Composer: "%s"
404 0 string AMF AMF Module
405 >4 string >\0 Title: "%s"
406 0 string MODINFO1 Open Cubic Player Module Inforation MDZ
407 0 string Extended\40Instrument: Fast Tracker II Instrument
409 # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
410 # NOA Nancy Codec file
411 0 string \210NOA\015\012\032 NOA Nancy Codec Movie file
413 0 string MMMD Yamaha SMAF file
414 # Sharp Jisaku Melody format for PDC
415 0 string \001Sharp\040JisakuMelody SHARP Cell-Phone ringing Melody
416 >20 string Ver01.00 Ver. 1.00
417 >>32 byte x , %d tracks
419 # Free lossless audio codec <http://flac.sourceforge.net>
420 # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
421 0 string fLaC FLAC audio bitstream data
423 >4 byte&0x7f >0 \b, unknown version
425 # some common bits/sample values
426 >>20 beshort&0x1f0 0x030 \b, 4 bit
427 >>20 beshort&0x1f0 0x050 \b, 6 bit
428 >>20 beshort&0x1f0 0x070 \b, 8 bit
429 >>20 beshort&0x1f0 0x0b0 \b, 12 bit
430 >>20 beshort&0x1f0 0x0f0 \b, 16 bit
431 >>20 beshort&0x1f0 0x170 \b, 24 bit
432 >>20 byte&0xe 0x0 \b, mono
433 >>20 byte&0xe 0x2 \b, stereo
434 >>20 byte&0xe 0x4 \b, 3 channels
435 >>20 byte&0xe 0x6 \b, 4 channels
436 >>20 byte&0xe 0x8 \b, 5 channels
437 >>20 byte&0xe 0xa \b, 6 channels
438 >>20 byte&0xe 0xc \b, 7 channels
439 >>20 byte&0xe 0xe \b, 8 channels
440 # some common sample rates
441 >>17 belong&0xfffff0 0x0ac440 \b, 44.1 kHz
442 >>17 belong&0xfffff0 0x0bb800 \b, 48 kHz
443 >>17 belong&0xfffff0 0x07d000 \b, 32 kHz
444 >>17 belong&0xfffff0 0x056220 \b, 22.05 kHz
445 >>17 belong&0xfffff0 0x05dc00 \b, 24 kHz
446 >>17 belong&0xfffff0 0x03e800 \b, 16 kHz
447 >>17 belong&0xfffff0 0x02b110 \b, 11.025 kHz
448 >>17 belong&0xfffff0 0x02ee00 \b, 12 kHz
449 >>17 belong&0xfffff0 0x01f400 \b, 8 kHz
450 >>17 belong&0xfffff0 0x177000 \b, 96 kHz
451 >>17 belong&0xfffff0 0x0fa000 \b, 64 kHz
452 >>21 byte&0xf >0 \b, >4G samples
454 >>>22 belong >0 \b, %u samples
455 >>>22 belong 0 \b, length unknown
457 # (ISDN) VBOX voice message file (Wolfram Kleff)
458 0 string VBOX VBOX voice message data
460 # ReBorn Song Files (.rbs)
461 # David J. Singer <doc@deadvirgins.org.uk>
462 8 string RB40 RBS Song file
463 >29 string ReBorn created by ReBorn
464 >37 string Propellerhead created by ReBirth
466 # Synthesizer Generator and Kimwitu share their file format
467 0 string A#S#C#S#S#L#V#3 Synthesizer Generator or Kimwitu data
468 # Kimwitu++ uses a slightly different magic
469 0 string A#S#C#S#S#L#HUB Kimwitu++ data
472 0 string TFMX-SONG TFMX module sound data
474 # Monkey's Audio compressed audio format (.ape)
475 # From danny.milo@gmx.net (Danny Milosavljevic)
476 # New version from Abel Cheung <abel (@) oaka.org>
477 0 string MAC\040 Monkey's Audio compressed format
478 >4 uleshort >0x0F8B version %d
479 >>(0x08.l) uleshort =1000 with fast compression
480 >>(0x08.l) uleshort =2000 with normal compression
481 >>(0x08.l) uleshort =3000 with high compression
482 >>(0x08.l) uleshort =4000 with extra high compression
483 >>(0x08.l) uleshort =5000 with insane compression
484 >>(0x08.l+18) uleshort =1 \b, mono
485 >>(0x08.l+18) uleshort =2 \b, stereo
486 >>(0x08.l+20) ulelong x \b, sample rate %d
487 >4 uleshort <0x0F8C version %d
488 >>6 uleshort =1000 with fast compression
489 >>6 uleshort =2000 with normal compression
490 >>6 uleshort =3000 with high compression
491 >>6 uleshort =4000 with extra high compression
492 >>6 uleshort =5000 with insane compression
493 >>10 uleshort =1 \b, mono
494 >>10 uleshort =2 \b, stereo
495 >>12 ulelong x \b, sample rate %d
498 # From Gürkan Sengün <gurkan@linuks.mine.nu>, http://www.linuks.mine.nu
499 0 string RAWADATA RdosPlay RAW
501 1068 string RoR AMUSIC Adlib Tracker
505 0 string mpu401tr MPU-401 Trakker
507 0 string SAdT Surprise! Adlib Tracker
510 0 string XAD! eXotic ADlib
512 0 string ofTAZ! eXtra Simple Music
514 # Spectrum 128 tunes (.ay files).
515 # From: Emanuel Haupt <ehaupt@critical.ch>
516 0 string ZXAYEMUL Spectrum 128 tune
518 0 string \0BONK BONK,
519 #>5 byte x version %d
520 >14 byte x %d channel(s),
521 >15 byte =1 lossless,
525 384 string LockStream LockStream Embedded file (mostly MP3 on old Nokia phones)
527 # format VQF (proprietary codec for sound)
528 # some infos on the header file available at :
529 # http://www.twinvq.org/english/technology_format.html
530 0 string TWIN97012000 VQF data
532 >27 short 1 \b, Stereo
533 >31 short >0 \b, %d kbit/s
534 >35 short >0 \b, %d kHz
536 # Nelson A. de Oliveira (naoliv@gmail.com)
538 0 string Winamp\ EQ\ library\ file %s
539 # it will match only versions like v<digit>.<digit>
540 # Since I saw only eqf files with version v1.1 I think that it's OK
543 0 string [Equalizer\ preset] XMMS equalizer preset
545 0 search/1 #EXTM3U M3U playlist text
547 0 search/1 [playlist] PLS playlist text
549 1 string [licq] LICQ configuration file
551 # Atari ST audio files by Dirk Jagdmann <doj@cubic.org>
552 0 string ICE! SNDH Atari ST music
553 0 string SC68\ Music-file\ /\ (c)\ (BeN)jami sc68 Atari ST music
555 # musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com>
556 0 string MP+ Musepack audio
557 >3 byte 255 \b, SV pre8
558 >3 byte&0xF 0x6 \b, SV 6
559 >3 byte&0xF 0x8 \b, SV 8
560 >3 byte&0xF 0x7 \b, SV 7
561 >>3 byte&0xF0 0x0 \b.0
562 >>3 byte&0xF0 0x10 \b.1
563 >>3 byte&0xF0 240 \b.15
564 >>10 byte&0xF0 0x0 \b, no profile
565 >>10 byte&0xF0 0x10 \b, profile 'Unstable/Experimental'
566 >>10 byte&0xF0 0x50 \b, quality 0
567 >>10 byte&0xF0 0x60 \b, quality 1
568 >>10 byte&0xF0 0x70 \b, quality 2 (Telephone)
569 >>10 byte&0xF0 0x80 \b, quality 3 (Thumb)
570 >>10 byte&0xF0 0x90 \b, quality 4 (Radio)
571 >>10 byte&0xF0 0xA0 \b, quality 5 (Standard)
572 >>10 byte&0xF0 0xB0 \b, quality 6 (Xtreme)
573 >>10 byte&0xF0 0xC0 \b, quality 7 (Insane)
574 >>10 byte&0xF0 0xD0 \b, quality 8 (BrainDead)
575 >>10 byte&0xF0 0xE0 \b, quality 9
576 >>10 byte&0xF0 0xF0 \b, quality 10
577 >>27 byte 0x0 \b, Buschmann 1.7.0-9, Klemm 0.90-1.05
578 >>27 byte 102 \b, Beta 1.02
579 >>27 byte 104 \b, Beta 1.04
580 >>27 byte 105 \b, Alpha 1.05
581 >>27 byte 106 \b, Beta 1.06
582 >>27 byte 110 \b, Release 1.1
583 >>27 byte 111 \b, Alpha 1.11
584 >>27 byte 112 \b, Beta 1.12
585 >>27 byte 113 \b, Alpha 1.13
586 >>27 byte 114 \b, Beta 1.14
587 >>27 byte 115 \b, Alpha 1.15
590 # from http://filext.com/detaillist.php?extdetail=IMY
591 # http://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm
592 # http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html
593 # http://www.wx800.com/msg/download/irda/iMelody.pdf
594 0 string BEGIN:IMELODY iMelody Ringtone Format
596 # From: "Mateus Caruccio" <mateus@caruccio.com>
597 # guitar pro v3,4,5 from http://filext.com/file-extension/gp3
598 0 string \030FICHIER\ GUITAR\ PRO\ v3. Guitar Pro Ver. 3 Tablature
600 # From: "Leslie P. Polzer" <leslie.polzer@gmx.net>
601 60 string SONG SoundFX Module sound file
603 # Type: Adaptive Multi-Rate Codec
604 # URL: http://filext.com/detaillist.php?extdetail=AMR
605 # From: Russell Coker <russell@coker.com.au>
606 0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony)