Why doesn't file detect the mime-type of mp3 properly?
- by Grumbel
Something odd I recently encountered, running file --mime-type on a collection of MP3 gets the mime-time wrong a third of the time:
$ for i in */*.mp3; do cat "$i"| file --mime-type -; done | sort | uniq -c
140 /dev/stdin: application/octet-stream
309 /dev/stdin: audio/mpeg
There doesn't seem to be any obvious reason, as even MP3s from the same source, will sometimes fail and sometimes not.
Bug, feature or anything obvious I am missing here?