Page 1 of 1

[PATCH] enable support for h.264 in matroska (webm) containers

Posted: 2019-07-09, 15:47
by jeroen
Hi,

I made a small patch to enable the use of matroska files with h.264 video.
It changes the reporting of capabilities for both the video element and for use in the media extensions. And it has small changes to the demuxing/decoding code to allow the use of the existing matroska (webm) demuxer in combination with the existing h.264 decoder.
The patch itself is very small as all puzzle pieces where already there, they just needed connecting.

While I personally prefer the VP codecs, I have a few cameras which produce a h.264 stream in hardware and are not capable of anything else. I am also working on a decentralized streaming application and the iso mp4 format is just terrible for that. The matroska container is much better for such uses.
Further, these kind of files can also be generated using the media recorder extension in chrome.

For some tests:
http://dmlinking.net:8800 offers a number of live streams, the two blue ones are video, one with vp8 which already works well with pale moon, and one with h.264 content which works with this patch applied.

Further I have some test pages:
http://dmlinking/~pe1rxq/video.html Shows the reported codec/container support. Note that not all should be possible, but a few more with the avc1.* can be achieved with the patch
http://dmlinking/~pe1rxq/testmp4.mkv.html Has a small part of a live stream with h264 content (note: the camera was upside down)
http://dmlinking/~pe1rxq/testmp4.webm.html Has h264 content (note: the camera was in a dark room, so the video is 17 seconds of black...)

Re: [PATCH] enable support for h.264 in matroska (webm) containers

Posted: 2019-07-11, 14:40
by jeroen
I made a small update to the patch and created a pull request on github.
https://github.com/MoonchildProductions/UXP/pull/1174

Re: [PATCH] enable support for h.264 in matroska (webm) containers

Posted: 2019-07-11, 15:02
by Moonchild
Thanks, merged it.

Re: [PATCH] enable support for h.264 in matroska (webm) containers

Posted: 2019-07-12, 14:36
by moonbat
Moonchild wrote:
2019-07-11, 15:02
Thanks, merged it.
Great, so will this be a part of the next build?