[openbeos] Matroska audio, video mimetypes

  • From: "Jonas Sundström" <jonas@xxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sat, 27 May 2006 22:47:08 +0200 CEST

Here's a little something for Haiku:

/bin/setmime -set video/x-matroska -short "Matroska Video" -sniffRule 
'0.50 (0x1A45DFA3934282886D6174726F736B61428781014285810118538067)' -
extension mkv 

/bin/setmime -set audio/x-matroska -short "Matroska Audio" -sniffRule 
'0.50 (0x1A45DFA3934282886D6174726F736B61428781014285810118538067)' -
extension mka 

http://www.matroska.org/technical/specs/notes.html:

"
There is no IETF endorsed MIME type for Matroska files. 
But you can use the ones we have defined on your system :

.mka : Matroska audio audio/x-matroska
.mkv : Matroska video video/x-matroska
"

There's also some "application/x-matroska" in the wild, 
but that is not endorsed by the Matroska project.

The sniffing rule I got from 
http://filext.com/detaillist.php?extdetail=MKV
I don't know if the audio files need a separate one
as I haven't been able to find any .mka files.

Q1: Filename extensions are case-insensitive to Haiku, right?
(It would be bad to not catch all permutations of case.)

Q2: Is 0.50 a good sniff rule weight? 
I doubt that the rule (".E...B..matroskaB...B....S.g") 
would pick up non-matroska files.

Q3: Is the sniffing rule format documented anywhere?

BTW, Haiku's setmime appears to be unimplemented, as of yet.
(In case anyone's looking for a nice little project.)

/Jonas.


Other related posts: