[vorbis-dev] Xiph Magic
J C Fitzgerald
v7022 at wave.co.nz
Tue Jul 15 20:36:53 PDT 2003
Hi Folks,
FWIW I figured out the /etc/magic file entries for both native and Ogg
wrappered Speex, Vorbis and FLAC (attached). YMMV because the fields
aren't necessarily in fixed positions in the files, but it works fine
for me. Feel free to include it in the Xiph archives or forward it to
the /etc/magic file maintainer once you're satisfied with it.
John
-------------- next part --------------
#------------------------------------------------------------------------------
# xiph: file(1) magic for Xiph multi-media files
#
#
# Ogg wrappered formats: Speex, Vorbis and FLAC.
#
0 string OggS Xiph Ogg
>28 string Speex\020\020\020 \bSpeex audio
>>68 lelong =0 \b, narrowband
>>68 lelong =1 \b, wideband
>>68 lelong =2 \b, ultra-wideband
>>76 lelong >0 \b, %d channel(s)
>>64 lelong >0 %d Hz
>28 string \001vorbis \bVorbis audio
>>39 byte =1 \b, mono
>>39 byte =2 \b, stereo
>>39 byte =3 \b, 3 channels
>>39 byte =4 \b, quad
>>39 byte >4 \b, %d channels
>>40 lelong >0 %d Hz
>28 string fLaC \bFLAC audio
>>92 belong&0x0001f000 =12288 \b, 4 bit
>>92 belong&0x0001f000 =28672 \b, 8 bit
>>92 belong&0x0001f000 =61440 \b, 16 bit
>>92 beshort&0x000e =0 \b, mono
>>92 beshort&0x000e =2 \b, stereo
>>92 beshort&0x000e =4 \b, 3 channels
>>92 beshort&0x000e =6 \b, quad
>>92 beshort&0x000e =8 \b, 5 channels
>>92 beshort&0x000e =10 \b, 6 channels
>>92 beshort&0x000e =12 \b, 7 channels
>>92 beshort&0x000e =14 \b, 8 channels
>>90 belong&0x00fffff0 =705600 44100 Hz
>>90 belong&0x00fffff0 =512000 32000 Hz
>>90 belong&0x00fffff0 =328000 22050 Hz
>>90 belong&0x00fffff0 =256000 16000 Hz
>>90 belong&0x00fffff0 =128000 8000 Hz
#
# Speex native format.
#
0 string Speex\020\020\020 Native Speex audio
>40 lelong =0 \b, narrowband
>40 lelong =1 \b, wideband
>40 lelong =2 \b, ultra-wideband
>48 lelong >0 \b, %d channel(s)
>36 lelong >0 %d Hz
#
# Vorbis native format.
#
0 string \001vorbis Native Vorbis audio
>11 byte =1 \b, mono
>11 byte =2 \b, stereo
>11 byte =3 \b, 3 channels
>11 byte =4 \b, quad
>11 byte >4 \b, %d channels
>12 lelong >0 %d Hz
#
# FLAC native format.
#
0 string fLaC Native FLAC audio
>18 belong&0x000001f0 =48 \b, 4 bit
>18 belong&0x000001f0 =112 \b, 8 bit
>18 belong&0x000001f0 =240 \b, 16 bit
>18 belong&0x00000e00 =0 \b, mono
>18 belong&0x00000e00 =512 \b, stereo
>18 belong&0x00000e00 =1024 \b, 3 channels
>18 belong&0x00000e00 =1536 \b, quad
>18 belong&0x00000e00 =2048 \b, 5 channels
>18 belong&0x00000e00 =2560 \b, 6 channels
>18 belong&0x00000e00 =3072 \b, 7 channels
>18 belong&0x00000e00 =3584 \b, 8 channels
>18 belong&0xfffff000 =180633600 44100 Hz
>18 belong&0xfffff000 =131072000 32000 Hz
>18 belong&0xfffff000 =90316800 22050 Hz
>18 belong&0xfffff000 =65536000 16000 Hz
>18 belong&0xfffff000 =32768000 8000 Hz
More information about the Vorbis-dev
mailing list