I've videos in .mkv files which are encoded with FFMpeg libx264 codec. I want to play it using videojs on a browser. But it seems so impossible!
Explain in detail the exact steps necessary to reproduce the issue.
ffmpeg -i myinput.mp4 -c:v libx264 -s 700:300 output.mkvoutput.mkv using videojsPlay the video
This video cannot be played
Please include any additional information necessary here. Including the following:
what version of videojs does this occur with?
tried on chrome
Android
NO PLUGIN
馃憢 Thanks for opening your first issue here! 馃憢
If you're reporting a 馃悶 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
The short answer is that browsers don't support MKV for HTML5 video.
The slightly longer answer is you can sometimes get some MKVs to play in browsers that support webm, because webm is a subset of MKV. You'd probably have to give the type as video/webm for that to work at all. But even then no browser supports the AC3 audio codec commonly used in MKV, so you might get no audio.
See also https://docs.videojs.com/tutorial-troubleshooting.html#choosing-a-video-format
Yeah, unfortunately, it's basically not supported. mp4 with h264 video and aac audio is probably your best bet.
Just a response ...
Was able to play the video by setting the type to video/mp4 or video/webm on my Default browser. But Google Chrome didn't bother playing it. (just the duration was loaded)
Most helpful comment
The short answer is that browsers don't support MKV for HTML5 video.
The slightly longer answer is you can sometimes get some MKVs to play in browsers that support webm, because webm is a subset of MKV. You'd probably have to give the type as video/webm for that to work at all. But even then no browser supports the AC3 audio codec commonly used in MKV, so you might get no audio.
See also https://docs.videojs.com/tutorial-troubleshooting.html#choosing-a-video-format