Mozilla browser does not play mkv files in the <video> . Is it possible to somehow make it play? Actually, here's the code that plays in Chrome, but without sound. Mozilla doesn't play at all:

 <!DOCTYPE html> <html lang="ru"> <head> <title>Заголовок страницы</title> <meta charset="utf-8"> <meta name="description" content="Описание страницы"> </head> <body> </video controls width="300" height="200"> <source src="movie3.mkv"> </video> </body> </html> 

You can, of course, convert it yourself, but not an option. After all, somehow youtube work, and a bunch of other video services that support a huge number of formats.

  • one
    Show the markup used and specify, please, is it possible to install third-party codecs before playing the video into the system or should the playback work out of the box right away? Specify whether you can convert the file from .mkv to .mp4 yourself or is it only valid format .mkv ? All clarifications include in the question itself. - VenZell
  • Do not reinvent the wheel! Use youtube, upload video there via API. This will give you the guarantee of the availability of video in popular browsers and platforms. Read more webref.ru/html/video . HTML5 is not yet ready for this use. - Makarenko_I_V
  • Youtube just converts downloaded files into the necessary ones, so that later everything will be reproduced. - KoVadim
  • Is this the exact information that youtube transforms? - Pavel Igorev
  • No, youtube does not support all formats: support.google.com/youtube/troubleshooter/2888402?hl=en So you have to do the conversion, because HTML will not be able to understand the matryoshka (more precisely in browsers with codecs of the problem, but not the essence). And why such weighty files on the web? - user207618

1 answer 1

According to the Mozilla documentation

Open Media Firefox can play a WAV container format (.wav file types, .wave) containing uncompressed PCM audio with 8 or 16 bits per channel.

Vorbis Audio, Opus Audio, Theora Video and VP8 Video are open audio / video compression formats for use without patent restrictions. They can be viewed in Firefox if they are embedded in the following container formats: Ogg (file types .ogg, .oga, .ogv, .ogx, .spx, .opus) or WebM (file types .webm).

Proprietary MP3, AAC and H.264 / MPEG-4 AVC media are proprietary audio / video compression formats. They can be viewed in Firefox using the built-in OS libraries (therefore neither Mozilla nor you should pay a fee) if they are built into an MP4 format container (file types .mp4, .m4a, .m4p, .m4b, .m4r,. m4v).

To play other video formats, you need to use third-party applications or plug-ins in the browser. That is, to solve your problem, either install on the site information that a browser plugin is needed for viewing, or upload video in a different format.

  • Is it possible to add a plug-in to the site (upload to the server) and make this plug-in open for the user when playing a video (well, like writing a program)? Then it should be played anyway. And the tags <embed> or <object> - with their help, too, will not be able to play third-party plug-ins, are they supposed to be used for this? - Pavel Igorev
  • one
    @PavelIgorev is not, it is impossible, because the need for plugins is due to the lack of the necessary access rights. Explicit installation actions by the user will still be required. - D-side