AxisCommunications / media-stream-library-js

JavaScript library to handle media streams on the command line (Node.js) and in the browser.
MIT License
295 stars 101 forks source link

Viewink MKV files exportes from axis camera #710

Closed cubecleveland closed 1 year ago

cubecleveland commented 2 years ago

Hi, Is the possible to view the MKV files exoprted from axis camera recording throguh the player. Getting an MKV file extension and wondering if it can be spit directly to the browser...

steabert commented 2 years ago

As far as I know, no, you cannot play MKV directly, at least not by any standard means. Chrome might play it if you trick it into accepting the format by passing the URL of your stream directly as <video src=./stream.mkv />.

We use the Media Source API in order to get low latency. In that case the standard is ISO BMFF Byte Stream and this is based on MP4. We either directly stream that from a camera, or we transform it from an RTP stream. Technically, you could transform MKV to ISO BMFF Byte Stream, but that would be a sizeable effort.