[Rethink] Support mkv|matroska|video/x-matroska in Firefox

UNCONFIRMED
Unassigned

Status

()

defect
P3
normal
UNCONFIRMED
2 years ago
an hour ago

People

(Reporter: tim.langhorst, Unassigned)

Tracking

Trunk
Points:
---
Bug Flags:
webcompat ?

Firefox Tracking Flags

(Webcompat Priority:?)

Details

(Whiteboard: [webcompat])

Reporter

Description

2 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20171122140526

Steps to reproduce:

Try to embed a mkv file:

<video controls>
      <source src="video_file.mkv" type="video/x-matroska">
</video>


Actual results:

Firefox says it's not supported.


Expected results:

Firefox should support it, because there are many codecs today and if i use for example h264 and opus together the only container supporting it is matroska converting opus is no option, because is the de facto best audio codec and converting the video to vp9 would be nice, but I neither have the time to do that on my cpu (would take more than 2200 hours) nor a hardware encoder. This is specific to me, but I think I'm not the only one, who encounters such problems.
Component: Untriaged → Audio/Video
Product: Firefox → Core
See Also: → 476727
(In reply to Tim Langhorst from comment #0)
> Firefox should support it, because there are many codecs today and if i use
> for example h264 and opus together the only container supporting it is
> matroska

Both H.264 and Opus are supported in MP4.
Reporter

Comment 2

2 years ago
No mp4 does not support opus,only vp9 inofficially. Tested with ffmpeg.
Component: Audio/Video → Audio/Video: Playback
Reporter

Comment 3

2 years ago
Matroska file are actually really nice to use, because:
1. There are very good tools (mktoolnix(-gui), mkvmerge, Mkclean)
2. Support for most features a container need and almost any codec (even yuv4)
3. Streaming support
4. Open source tool and standard
Reporter

Comment 4

a year ago
Implementation shouldn't be hard because WebM essentially is matroska:
"The WebM container is based on a profile of Matroska." - Wikipedia, WebM
(Also you can for example use matroska tools for webm because of this fact.)

And sorry for the Typos.

Comment 5

a year ago
Hey,
I'm a webmaster trying to share content, I chose matroska and I just discovered that firefox couldn't embed it, while it works for chromium, even outdated versions (from debian jessie).

Please consider supporting mkv's containers ? Please ? :(
At least I would like an explanation on the technical reason here, must be one, because I'm really surprised.
Alfredo,
Is it possible that we can add some telemetry to know how many attempts to play mkv format?
Flags: needinfo?(ayang)
Reporter

Comment 7

a year ago
caniuse has no statistics about this so I think that's very difficult. The only thing I can do is to underline it's features again. And of course the fact that with WebM already some kind of Matroska support is included.
Reporter

Comment 8

a year ago
The only thing I can help with is to link the library: https://github.com/Matroska-Org/libmatroska
See Also: → 1429986
Bug 1429986
Flags: needinfo?(ayang)
(In reply to Alfredo Yang (:alfredo) from comment #9)
> Bug 1429986
Sweet!
(In reply to j.rios from comment #5)
> Hey,
> I'm a webmaster trying to share content, I chose matroska and I just
> discovered that firefox couldn't embed it, while it works for chromium, even
> outdated versions (from debian jessie).
> 
> Please consider supporting mkv's containers ? Please ? :(
> At least I would like an explanation on the technical reason here, must be
> one, because I'm really surprised.
There are no technical reasons here. We just hope the internet can be as simple as possible and hesitate to support more formats. But if it is really popular, we will consider supporting it. Bug 1429986 is to check how many attempts to play mkv on Firefox and we will check if we should support it or not.

Comment 12

a year ago
This is fair. Thanks.
I too, crave for a simpler web. I'm basically a JS hater.

My surprise originally comes from the fact that I always saw heavy-browsers as "universal fileviewers", or at least, for videos. I really doubt telemetry will reveal any "heavy need", in fact I only stumbled on the issue recently, which means that I never knew.

I guess my best shot is to make a turn for "webm" the "Google/Chrome format" ; guess I shouldn't feel wrong about it, it's CC-BY after all.
Reporter

Comment 13

a year ago
(In reply to Blake Wu [:bwu][:blakewu] from comment #11)
> (In reply to j.rios from comment #5)
> > Hey,
> > I'm a webmaster trying to share content, I chose matroska and I just
> > discovered that firefox couldn't embed it, while it works for chromium, even
> > outdated versions (from debian jessie).
> > 
> > Please consider supporting mkv's containers ? Please ? :(
> > At least I would like an explanation on the technical reason here, must be
> > one, because I'm really surprised.
> There are no technical reasons here. We just hope the internet can be as
> simple as possible and hesitate to support more formats. But if it is really
> popular, we will consider supporting it. Bug 1429986 is to check how many
> attempts to play mkv on Firefox and we will check if we should support it or
> not.

Exactly, that, why I proposed matroska because mp4 supports that, WebM that and ogg that, but if you have matroska you'll never need anything different, because matroska supports it all (that I think why ripped movies are mostly in mkv).

The only choice you have to use JavaScript players, that support dash, have bad quality or have hundreds of different formats.
Reporter

Comment 14

a year ago
I want to add this table which shows who's the best: https://en.wikipedia.org/wiki/Comparison_of_video_container_formats
Flags: webcompat?
Whiteboard: [webcompat]

Comment 16

4 months ago

It seems that when google chrome records H.264 videos (MediaRecorder API) it only supports it inside matroska container and firefox can't play those files. I think it is pretty serious reason to consider matroska support besides other reasons.
Here I found the chromium issue about their implementation: https://bugs.chromium.org/p/chromium/issues/detail?id=601636

Comment 17

2 months ago

(In reply to Ignl from comment #16)

It seems that when google chrome records H.264 videos (MediaRecorder API) it only supports it inside matroska container and firefox can't play those files. I think it is pretty serious reason to consider matroska support besides other reasons.
Here I found the chromium issue about their implementation: https://bugs.chromium.org/p/chromium/issues/detail?id=601636

Well I tried to play a mkv file that is on my cloud (I use Nextcloud) and the file launch on chrome but without sound. But in the other hand, on Firefox, the player says that he can't handle this format.

So it would be cool, if Firefox supports mkv videos because as Tim said, it's usefull to have it when you are in a streaming situation like me.
Also, it would be even more cool if it supports subtitles.

PS: Here is a illustration https://imgur.com/a/mzjmcCv

Comment 18

2 months ago

(In reply to Mathieu Heurtevin from comment #17)

Well I tried to play a mkv file that is on my cloud (I use Nextcloud) and the file launch on chrome but without sound. But in the other hand, on Firefox, the player says that he can't handle this format.

same use case here. MKV support would be very useful.

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Comment 21

an hour ago

(In reply to Blake Wu [:bwu][:blakewu] from comment #11)

(In reply to j.rios from comment #5)

Hey,
I'm a webmaster trying to share content, I chose matroska and I just
discovered that firefox couldn't embed it, while it works for chromium, even
outdated versions (from debian jessie).

Please consider supporting mkv's containers ? Please ? :(
At least I would like an explanation on the technical reason here, must be
one, because I'm really surprised.
There are no technical reasons here. We just hope the internet can be as
simple as possible and hesitate to support more formats. But if it is really
popular, we will consider supporting it. Bug 1429986 is to check how many
attempts to play mkv on Firefox and we will check if we should support it or
not.

MediaRecorder API for Safari is coming (h264 of course). For cross browser interoperability h264 will be used but because Chrome puts it in Matroska container Firefox won't play it. Because of that basically a choice for a webmaster comes down to Chrome+Safari or Chrome+Firefox support. That's really not good for Firefox. Once some novel websites that leverages MediaRecorder API doesn't work on Firefox users will be forced to switch browsers. I think it would be very smart to preemptively add Matroska support ASAP.

You need to log in before you can comment on or make changes to this bug.