I am trying to figure out file(1) magic(1) for Ogg and Vorbis. (I am using file from NetBSD 1.5.1.) Currently I have: 0 string OggS Ogg data>29 string vorbis \b, Vorbis audioSome results: $ file ~/audio/kaas.* /home/reed/audio/kaas.mp3: MP3, 128 kBits, 44.1 kHz, Stereo /home/reed/audio/kaas.ogg: Ogg data, Vorbis audio /home/reed/audio/kaas.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz Any ideas on what bytes I should look at for more details? (For example, MP3 and the WAV show how many bits, sample rate, stereo and more). How should it be worded? (Is "Ogg data, Vorbis audio" okay?) Does anyone already have this file magic? In addition, I am going to do magic.mime also. Is "audio/vorbis" okay? What if OggS doesn't have a keyword "vorbis" (or other) do I use "application/ogg" mime type? Also, I know it is off-topic for this list, but while I am at it, I'd like to figure out other Ogg formats. I don't have Squish or Tarkin, but are these keywords also at byte 29 (0x1d)? Any suggestions of other Ogg mime types names? Thanks, Jeremy C. Reed http://www.reedmedia.net/ --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Monday, July 16, 2001, at 07:02 , Jeremy C. Reed wrote:> I am trying to figure out file(1) magic(1) for Ogg and Vorbis. > (I am using file from NetBSD 1.5.1.) > [...] > Any ideas on what bytes I should look at for more details? (For example, > MP3 and the WAV show how many bits, sample rate, stereo and more). > > How should it be worded? (Is "Ogg data, Vorbis audio" okay?)Sounds ok to me. Maybe 'Ogg bitstream'. The only thing floating around right now are 'degenerate' ogg streams which only contain a single vorbis audio stream. Just be aware there may be other configurations in the future.> Does anyone already have this file magic?Yes. See http://www.xiph.org/archives/vorbis/200106/0224.html> In addition, I am going to do magic.mime also. Is "audio/vorbis" okay?Technically, you shouldn't use that until we're granted the mimetype. Consensus seems to be application/x-ogg for streams in general, with audio/vorbis in the future for degenerate vorbis streams and/or streams that are primarily vorbis audio. In either case, the vorbis at byte 29 should be reliable.> Also, I know it is off-topic for this list, but while I am at it, I'd > like > to figure out other Ogg formats. I don't have Squish or Tarkin, but are > these keywords also at byte 29 (0x1d)?Technically, it's not at byte 29, it's '\000vorbis' starting at 27 plus the value of byte 26. That works out to 'vorbis' at byte 29 for all vorbis bitstreams. It's expected that tarkin will similarly have 'tarkin' at a fixed initial offset. video/tarkin would be appropriate in that case. Hope that helps, -r --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Mon, Jul 16, 2001 at 07:02:35PM -0700, Jeremy C. Reed wrote:> I am trying to figure out file(1) magic(1) for Ogg and Vorbis. > (I am using file from NetBSD 1.5.1.) > > Currently I have: > > 0 string OggS Ogg data > >29 string vorbis \b, Vorbis audio >[snip]> > Does anyone already have this file magic?I made some.. 0 string OggS Ogg bitstream data >29 string vorbis \b, Vorbis compressed audio >>40 lelong x \b, %d Hz # MIME types 0 string OggS >29 string vorbis \baudio/x-vorbis >29 string !vorbis \bapplication/x-ogg The mime type is a bit odd, because I didn't know how to really do it..> > In addition, I am going to do magic.mime also. Is "audio/vorbis" okay? > > What if OggS doesn't have a keyword "vorbis" (or other) do I use > "application/ogg" mime type? >[snip]> > Any suggestions of other Ogg mime types names?i think audio/vorbis and application/ogg are in the process of getting approved..> > Thanks, > > Jeremy C. Reed > http://www.reedmedia.net/-- Zinx Verituse --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Mon, 16 Jul 2001, Jeremy C. Reed wrote:> I am trying to figure out file(1) magic(1) for Ogg and Vorbis. > (I am using file from NetBSD 1.5.1.) >My results, with some correction (slight wording changes, beta1/2 dates clarification) since the last post are attached. I'm also going to send this update to the file(1) and magic directory maintainer <christos@astron.com>.> Currently I have: > >[snip] > > Any ideas on what bytes I should look at for more details? (For example, > MP3 and the WAV show how many bits, sample rate, stereo and more). >See my magic, should be correct (checked on real file and against the source and the documentation I could find; nobody here reported mistakes). Uncomment all lines commented with `##' to get really verbose output. See there for recomendations of what is reasonable to uncomment :-).> How should it be worded? (Is "Ogg data, Vorbis audio" okay?) >I previously managed to word it as `Ogg Vorbis sound data' or `Ogg data' for non-vorbis ogg by using some messy repeated tests. Now I switched to your wording, which might be slightly less elegant but shows the Ogg - Vorbis releationship more correctly.> Does anyone already have this file magic? > > In addition, I am going to do magic.mime also. Is "audio/vorbis" okay? >Didn't occur to me :-). So you still have to do this.> What if OggS doesn't have a keyword "vorbis" (or other) do I use > "application/ogg" mime type? > > Also, I know it is off-topic for this list, but while I am at it, I'd like > to figure out other Ogg formats. I don't have Squish or Tarkin, but are > these keywords also at byte 29 (0x1d)? >I'd like to include them if they are already specified. Are there any Squish files floating around?> Any suggestions of other Ogg mime types names? > > Thanks, > > Jeremy C. Reed > http://www.reedmedia.net/ >-- Beni Cherniavsky <cben@crosswinds.net> (also scben@t2,cben@tx in Technion) <HR NOSHADE> <UL> <LI>TEXT/PLAIN attachment: ogg-vorbis-magic </UL> -------------- next part -------------- A non-text attachment was scrubbed... Name: magic Type: application/octet-stream Size: 2826 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010718/601ddd26/magic-0001.obj