pseudosavant / player.html

One file drop-in media player web app for using video and audio files served using basic HTTP directory listing
MIT License
219 stars 40 forks source link

Unable to load mkv file format #11

Closed syisahi12 closed 3 years ago

syisahi12 commented 3 years ago

I using uhttpd, all feture is fine except mkv file. please help me thank you

pseudosavant commented 3 years ago

Can you share more detail on the problems you are experiencing? Does it not show the mkv files in the file list or does it just not play correctly? Can you share a screenshot of the browser dev tools console after loading player.html and after experiencing the issue?

File support in player.html in completely dependent on what formats your browser's video engine supports. player.html does a check on startup to see what video mime types your browser supports and prints the results to the console. That information is then used to determine what file extensions to show (or not).

image

Generally, MKV support in browsers is poor, except for WebM. WebM is actually an MKV file with VP8/9 video and Vorbis/Opus audio tracks. But most .mkv files you will find in the wild will be using H264/H265 for video and AC3/AAC/MP3, and most browsers will not support that.

This little script will tell you what mime types your browser supports:

var v = document.createElement('video');
['video/mp4', 'video/webm', 'video/x-matroska','video/ogg'].forEach(
  (m) => console.log(`${m}: ${v.canPlayType(m) !== ''}`)
);