Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 <video> can play .mkv files?

So I accidentally opened an mkv video file with Chrome, and to my surprise it played it using the native player:

<video src="video.mkv"></video>

It was playing perfectly. HTML5 video supports matroska container?

like image 763
Mark Avatar asked Mar 08 '12 18:03

Mark


People also ask

What is MKV compatible with?

MP4, MOV, and AVI formats, many media players still support opening and playing MKV files, including: Microsoft Movies & TV (Windows) VideoLAN VLC media player (multiplatform) MPlayer (multiplatform)

Do browsers support MKV?

Yes, it's possible to play videos (mkv, mp4, ogg, etc) with the modern browser without a plugin. You can do that by using "video" tag. Support matrix for the different browsers here; on the sub-feature tab are listed supported video/audio formats and their support matrix across the browsers.

Why MKV is not supported?

MKV format/codec is not supported. MKV is just a video container, which can be encoded with a wide range of codecs, like HEVC, H. 264, MPEG-4, VP9, DTS audio etc. While Samsung TV has poor compatibility with some of the codecs, such as Dolby True Audio and DTS Audio, which will make MKV not playing on Samsung TV.

Which is better MKV or MP4?

Both MKV and MP4 can be encoded using the HEVC video codec supporting UHD resolution. However, one prime difference between MKV and MP4 is that MKV supports FLAC, whereas MP4 doesn't. This makes MKV a much better format for lossless digital audio compression.


1 Answers

HTML5 doesn't support any video formats, or rather HTML5 doesn't specify what formats browsers should support. It's up to the browsers to decide which formats they choose to support. Apparently Chrome plays .mkv, but I wouldn't be surprised if other browsers didn't play the same file.

like image 104
JJJ Avatar answered Sep 21 '22 08:09

JJJ