Deleted Added
full compact
vorbis (110949) vorbis (133359)
1
2#------------------------------------------------------------------------------
3# vorbis: file(1) magic for Ogg/Vorbis files
4#
5# From Felix von Leitner <leitner@fefe.de>
6# Extended by Beni Cherniavsky <cben@crosswinds.net>
7# Further extended by Greg Wooledge <greg@wooledge.org>
8#
9# Most (everything but the number of channels and bitrate) is commented
10# out with `##' as it's not interesting to the average user. The most
11# probable things advanced users would want to uncomment are probably
12# the number of comments and the encoder version.
13#
14# --- Ogg Framing ---
150 string OggS Ogg data
16>4 byte !0 UNKNOWN REVISION %u
17##>4 byte 0 revision 0
18>4 byte 0
19##>>14 lelong x (Serial %lX)
1
2#------------------------------------------------------------------------------
3# vorbis: file(1) magic for Ogg/Vorbis files
4#
5# From Felix von Leitner <leitner@fefe.de>
6# Extended by Beni Cherniavsky <cben@crosswinds.net>
7# Further extended by Greg Wooledge <greg@wooledge.org>
8#
9# Most (everything but the number of channels and bitrate) is commented
10# out with `##' as it's not interesting to the average user. The most
11# probable things advanced users would want to uncomment are probably
12# the number of comments and the encoder version.
13#
14# --- Ogg Framing ---
150 string OggS Ogg data
16>4 byte !0 UNKNOWN REVISION %u
17##>4 byte 0 revision 0
18>4 byte 0
19##>>14 lelong x (Serial %lX)
20# non-Vorbis content: FLAC (Free Lossless Audio Codec, http://flac.sourceforge.net)
21>>28 string fLaC \b, FLAC audio
22# non-Vorbis content: Theora
23>>28 string \x80theora \b, Theora video
24# non-Vorbis content: Speex
25>>28 string Speex\ \ \ \b, Speex audio
26# non-Vorbis content: OGM
27>>28 string \x01video\0\0\0 \b, OGM video
28>>>37 string/c div3 (DivX 3)
29>>>37 string/c divx (DivX 4)
30>>>37 string/c dx50 (DivX 5)
31>>>37 string/c xvid (XviD)
20# --- First vorbis packet - general header ---
21>>28 string \x01vorbis \b, Vorbis audio,
22>>>35 lelong !0 UNKNOWN VERSION %lu,
23##>>>35 lelong 0 version 0,
24>>>35 lelong 0
25>>>>39 ubyte 1 mono,
26>>>>39 ubyte 2 stereo,
27>>>>39 ubyte >2 %u channels,
28>>>>40 lelong x %lu Hz
29# Minimal, nominal and maximal bitrates specified when encoding
30>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \b,
31# The above tests if at least one of these is specified:
32# --- First vorbis packet - general header ---
33>>28 string \x01vorbis \b, Vorbis audio,
34>>>35 lelong !0 UNKNOWN VERSION %lu,
35##>>>35 lelong 0 version 0,
36>>>35 lelong 0
37>>>>39 ubyte 1 mono,
38>>>>39 ubyte 2 stereo,
39>>>>39 ubyte >2 %u channels,
40>>>>40 lelong x %lu Hz
41# Minimal, nominal and maximal bitrates specified when encoding
42>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \b,
43# The above tests if at least one of these is specified:
32>>>>>44 lelong !-1
44>>>>>52 lelong !-1
33# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
34# instead of -1.
35# Vorbis 1.0 uses 0 instead of -1.
45# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
46# instead of -1.
47# Vorbis 1.0 uses 0 instead of -1.
36>>>>>>44 lelong !-1000
37>>>>>>>44 lelong !0
38>>>>>>>>44 lelong x >%lu
39>>>>>48 lelong !-1
40>>>>>>48 lelong x ~%lu
41>>>>>52 lelong !-1
42>>>>>>52 lelong !0
43>>>>>>>52 lelong !-1000
44>>>>>>>>52 lelong x <%lu
48>>>>>>52 lelong !0
49>>>>>>>52 lelong !-1000
50>>>>>>>>52 lelong x <%lu
51>>>>>48 lelong !-1
52>>>>>>48 lelong x ~%lu
53>>>>>44 lelong !-1
54>>>>>>44 lelong !-1000
55>>>>>>>44 lelong !0
56>>>>>>>>44 lelong x >%lu
45>>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff bps
46# -- Second vorbis header packet - the comments
47# A kludge to read the vendor string. It's a counted string, not a
48# zero-terminated one, so file(1) can't read it in a generic way.
49# libVorbis is the only one existing currently, so I detect specifically
50# it. The interesting value is the cvs date (8 digits decimal).
51# Post-RC1 Ogg files have the second header packet (and thus the version)
52# in a different place, so we must use an indirect offset.
53>>>(84.b+85) string \x03vorbis
54>>>>(84.b+96) string/c Xiphophorus\ libVorbis\ I \b, created by: Xiphophorus libVorbis I
57>>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff bps
58# -- Second vorbis header packet - the comments
59# A kludge to read the vendor string. It's a counted string, not a
60# zero-terminated one, so file(1) can't read it in a generic way.
61# libVorbis is the only one existing currently, so I detect specifically
62# it. The interesting value is the cvs date (8 digits decimal).
63# Post-RC1 Ogg files have the second header packet (and thus the version)
64# in a different place, so we must use an indirect offset.
65>>>(84.b+85) string \x03vorbis
66>>>>(84.b+96) string/c Xiphophorus\ libVorbis\ I \b, created by: Xiphophorus libVorbis I
55>>>>>(84.b+120) string >00000000 %.8s
67>>>>>(84.b+120) string >00000000
56# Map to beta version numbers:
68# Map to beta version numbers:
57>>>>>>(84.b+120) string <20000508 (<beta1 - prepublic)
58>>>>>>(84.b+120) string 20000508 (beta1/2)
69>>>>>>(84.b+120) string <20000508 (<beta1, prepublic)
70>>>>>>(84.b+120) string 20000508 (1.0 beta 1 or beta 2)
59>>>>>>(84.b+120) string >20000508
60>>>>>>>(84.b+120) string <20001031 (beta2-3)
71>>>>>>(84.b+120) string >20000508
72>>>>>>>(84.b+120) string <20001031 (beta2-3)
61>>>>>>(84.b+120) string 20001031 (beta3)
73>>>>>>(84.b+120) string 20001031 (1.0 beta 3)
62>>>>>>(84.b+120) string >20001031
63>>>>>>>(84.b+120) string <20010225 (beta3-4)
74>>>>>>(84.b+120) string >20001031
75>>>>>>>(84.b+120) string <20010225 (beta3-4)
64>>>>>>(84.b+120) string 20010225 (beta4)
76>>>>>>(84.b+120) string 20010225 (1.0 beta 4)
65>>>>>>(84.b+120) string >20010225
66>>>>>>>(84.b+120) string <20010615 (beta4-RC1)
77>>>>>>(84.b+120) string >20010225
78>>>>>>>(84.b+120) string <20010615 (beta4-RC1)
67>>>>>>(84.b+120) string 20010615 (RC1)
68>>>>>>(84.b+120) string 20010813 (RC2)
79>>>>>>(84.b+120) string 20010615 (1.0 RC1)
80>>>>>>(84.b+120) string 20010813 (1.0 RC2)
69>>>>>>(84.b+120) string 20010816 (RC2 - Garf tuned v1)
70>>>>>>(84.b+120) string 20011014 (RC2 - Garf tuned v2)
81>>>>>>(84.b+120) string 20010816 (RC2 - Garf tuned v1)
82>>>>>>(84.b+120) string 20011014 (RC2 - Garf tuned v2)
71>>>>>>(84.b+120) string 20011217 (pre-RC3 CVS)
72>>>>>>(84.b+120) string 20011231 (RC3)
83>>>>>>(84.b+120) string 20011217 (1.0 RC3)
84>>>>>>(84.b+120) string 20011231 (1.0 RC3)
73# Some pre-1.0 CVS snapshots still had "Xiphphorus"...
74>>>>>>(84.b+120) string >20011231 (pre-1.0 CVS)
75# For the 1.0 release, Xiphophorus is replaced by Xiph.Org
76>>>>(84.b+96) string/c Xiph.Org\ libVorbis\ I \b, created by: Xiph.Org libVorbis I
85# Some pre-1.0 CVS snapshots still had "Xiphphorus"...
86>>>>>>(84.b+120) string >20011231 (pre-1.0 CVS)
87# For the 1.0 release, Xiphophorus is replaced by Xiph.Org
88>>>>(84.b+96) string/c Xiph.Org\ libVorbis\ I \b, created by: Xiph.Org libVorbis I
77>>>>>(84.b+117) string >00000000 %.8s
89>>>>>(84.b+117) string >00000000
78>>>>>>(84.b+117) string <20020717 (pre-1.0 CVS)
79>>>>>>(84.b+117) string 20020717 (1.0)
90>>>>>>(84.b+117) string <20020717 (pre-1.0 CVS)
91>>>>>>(84.b+117) string 20020717 (1.0)
92>>>>>>(84.b+117) string 20030909 (1.0.1)
93>>>>>>(84.b+117) string 20040629 (1.1.0 RC1)