[vorbis-dev] Xiph Magic
J C Fitzgerald
v7022 at wave.co.nz
Fri Jul 18 15:54:34 PDT 2003
On Fri, Jul 18, 2003 at 02:11:14PM +0300, Beni Cherniavsky wrote:
>
> In any case, there is little point in having file(1) magic for
> recognizing broken files that AFAIK has never been observerved in the
> wild :-).
>
On Fri, Jul 18, 2003 at 03:06:29AM +0100, Tom Hargreaves wrote:
>
> I've seen what you call "native" vorbis files in the wild. Try running
> "mplayer -dumpaudio" on an ogg sometime...
>
> Nonetheless, it might be potentially useful to be able to recognise
> such raw files, as they might be produced by accident (e.g. as
> mplayer does above).
>
I guess it's a bit of a philosophical problem of whether you recognise
only permissable file types or whether you show an understanding of
what the file is supposed to be. I would tend to the former for fear
of sanctioning rogue files as legitimate. (But I also feel that files
should be able to exist independantly of anything in which you may wish
to wrapper them.)
>
> PS. During the course of my experiments I came up with the following
> one-liner for stripping the Ogg layer (and I can confirm that it
> produces valid FLAC files from ogg-flacs):
>
> perl -0777lpe'BEGIN{$/="OggS"}s/.{22}(.)//s,s/.{@{[ord$1]}}//s'
>
Thanks for this.
John
--- >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 at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list