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

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.

Moderator: satrow

Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
jeroen
New to the forum
New to the forum
Posts: 2
Joined: 2019-07-09, 15:22

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

Unread post by jeroen » 2019-07-09, 15:47

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...)
Attachments
palemoon_webm_matroska_avc.diff
(7.15 KiB) Downloaded 22 times

User avatar
jeroen
New to the forum
New to the forum
Posts: 2
Joined: 2019-07-09, 15:22

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

Unread post by jeroen » 2019-07-11, 14:40

I made a small update to the patch and created a pull request on github.
https://github.com/MoonchildProductions/UXP/pull/1174

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 24449
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

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

Unread post by Moonchild » 2019-07-11, 15:02

Thanks, merged it.
"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne
Image

User avatar
moonbat
Lunatic
Lunatic
Posts: 355
Joined: 2015-12-09, 15:45
Location: Australia

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

Unread post by moonbat » 2019-07-12, 14:36

Moonchild wrote:
2019-07-11, 15:02
Thanks, merged it.
Great, so will this be a part of the next build?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 19.2 Xfce x64 on HP i5 laptop with 4 GB RAM, always latest versions of PM & Basilisk unless specified.

Post Reply