3

I assume that this is possible, here is question, also on stackoverflow, that confirms it.
However I have failed while trying to make it work, so I'm asking for your help.
How can I do this?

Community
  • 1
  • 1
Boblob
  • 109
  • 2
  • 2
  • 8

2 Answers2

11

WebM uses a variant of the Matroska container so it's not too surprising that some browsers are able to play some .mkv files. It's likely that you'd need to set the content type header to something that the browser recognises (eg. video/webm) if it was going to work at all.

However, that's only part of the story. The Matroska container is just that, a container. Inside the container are video and audio objects which have been encoded with particular codecs, if the browser you're attempting to play the file with doesn't support those codecs then they won't be able to play the file even if they can parse the container format. If you want wide compatibility then your best option is to transcode to one of the more common container/codec combinations such as MP4/h264 or WebM/VP8.

robertc
  • 74,533
  • 18
  • 193
  • 177
  • I would also like to ask how to specify codecs properly, should it be included in 'type="..."' after the video/webm? – Boblob Jun 05 '13 at 13:52
  • Sorry but I have more questions, how should I configure server (which run locally using XAMPP) to support this? Should I even change anything? I'm new to this so I really don't know much. – Boblob Jun 05 '13 at 14:24
  • @Boblob See https://github.com/h5bp/server-configs. For .mkv you'll have to work something out based on the above information, it's not a format people do as standard – robertc Jun 05 '13 at 14:36
-3

You wanna take a look at DivX player

Cut & paste

As of version 2.1, the DivX Plus Web Player supports the HTML5 API, so it can be embedded and controlled using the tag and open web standards such as JavaScript. It takes full advantage of the tag’s attributes by allowing publishers to create seamless playback experiences and custom controls for DivX, AVI, MKV, MP4 and MOV videos across multiple browsers: Firefox and Chrome (Internet Explorer & Safari Coming in full release version).

SolessChong
  • 3,370
  • 8
  • 40
  • 67