user2092799
user2092799

Reputation: 119

No sound while playing MKV with HTML5

I'm trying to play a .MKV file with HTML5. Video works fine but there is no sound, I can't unmute the video.

<video src="video.mkv" type='video/x-matroska' codecs='theora, vorbis'></video>

I'm using Chrome 24.

Upvotes: 11

Views: 12287

Answers (2)

Dhanuka Perera
Dhanuka Perera

Reputation: 1833

It's because of the audio codec that was used. Chrome probably doesn't support it. No, I don't know how to fix it other than to find out what audio codec it's using and either change it or get a browser extension that will support it. I will engage you to convert the video into different format like MP4/OGG.

<video width="500px" controls>
  <source src="yourvideo.mp4" type="video/mp4">
  <source src="yourvideo.ogg" type="video/ogg">
  Your browser does not support HTML video.
</video>

Your can VLC web plugin. It takes some few steps to configure and get it to work.

Read more about https://wiki.videolan.org/Documentation:WebPlugin#Input_object

<embed id="divxplayer" type="video/divx" width="1024" height="768" 
src ="path_to_file" autoPlay=\"true\" 
pluginspage=\"http://go.divx.com/plugin/download/\"></embed>

Other question related to this : How to playback MKV video in web browser

Upvotes: 3

Bassem Fouad
Bassem Fouad

Reputation: 34

you should convert it to these formate MP4,WebM or Ogg. My opinion, MP4 is the best because it is compressed (low size/ fast loading). Try conversion program like "xilisoft video conveter" or any online audio converter. here the code:

<!DOCTYPE html> 
<html> 
<body> 

<video width="400" controls>
  <source src="yourfile.mp4" type="video/mp4">
  <source src="yourfile.ogg" type="video/ogg">
  Your browser does not support HTML video.
</video>
    
</body> 
</html>

Upvotes: 1

Related Questions