How to play MKV file in browser?

☆樱花仙子☆ 提交于 2019-12-20 11:30:56

问题


I have a video file in MKV format, i want to play that file in the browser without converting, how can i play this file format in browser?

<video width="320" height="240" controls>
  <source src="movie.mkv" type="video/mkv">
  Your browser does not support the video tag.
</video>

i want this file to be played in full screen mode always. My browser is chrome.


回答1:


It will refuse to play Matroska if the type attribute is set to video/x-matroska. Try removing the type attribute completely.

After some experimentation with this issue, I've found the best solution is to set the mime type to video/webm.




回答2:


I think Chrome doesn't play .mkv videos.

By the way, 'type' is mime-type, and mkv's mime type is video/x-matroska.

Try:

source src="movie.mkv" type="video/x-matroska"

If this works, maybe the sound will be muted, so you can try type="video/mp4".




回答3:


I added the IIS Mime Type as (.mkv - video/webm) over the IIS option and it worked fine.




回答4:


I know this is old, but the best way is sending mkv to google drive. Google drive can play mkv with no problem. I don't know if you know, but you can have 15gb free on google drive, and you can embed it on your website.



来源:https://stackoverflow.com/questions/17018119/how-to-play-mkv-file-in-browser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!