On 9/15/07, Konrad Meyer <konrad@tylerc.org> wrote:
> Er, I'm still not getting information out of ogg files:
>
> $ mdh -p ~/music/bowling_for_soup_-_1985.ogg
> ---
> Video.Duration: 192.78
> Audio.Samplerate: 44100
> Audio.Bitrate: 192.0
> Image.DimensionUnit: px
> Video.Codec: ""
> File.Size: 4618665
> Audio.Codec: vrbs
> File.Modified: 2007-01-03T22:10:11-08:00
> File.Format: video/x-theora+ogg
^- That's the problem there. It thinks it's a video file.
<technical blather>
Why? Probably because I hacked the mimetype guesser to _not_ assume
things based on the filename extension, and the shared-mime-info db
assumes that the guesser _is_ assuming things based on the filename
extension.
Which is something I'd rather not do with downloaded files (which, by
their very nature, have wild disparities between the extension and the
real mimetype.) And the header content-type is often totally wrong or
doesn't match shared-mime-info's naming (e.g.
application/octet-stream vs. image/gif, audio/x-mp3 vs. audio/mpeg,
video/divx vs. video/x-msvideo, video/x-ms-asf vs. video/vnd.ms-asf...)
And this magic-over-extension sometimes leads to me getting generic
lesser-magic guesses instead of more specific filename extension
guesses (e.g. zip instead of OO document.) So, I have a list of
generic formats that defer to the extension rather than rely on
the lesser-magic.
Anyhow, it's ugly, hacky magic.
Just like the rest of mimetype guessing.
</technical blather>
But! Fixing this instance of the problem in the next thirty seconds.
... There!
And now, adding ogginfo metadata to video/x-theora+ogg.
Ok, try this:
http://dark.fhtr.org/repos/metadata/metadata-0.4.tar.gz
> Thanks for your quick responses!
Thanks for the bug reports! They really in making this thing
more robust.
> Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/
--
Ilmari Heikkinen
http://fhtr.blogspot.com