Reputation: 21
I am developing a product for a highly restricted environment (e.g., military, casinos) where installing my media server(for transcoding) is not allowed. As a result, I need to handle video decoding entirely in the browser. Specifically, Their system sends me(CEF embedded browser) H264 or H265 NAL units, and I need to decode them into YUV frames within a browser environment.
WebRTC cannot be used. Internet or External Network or something server that placed on outside of their network cannot be used.
Here are my main questions:
Thankyou
I have already tried using the WebCodecs API for decoding, but due to compatibility issues(CEF embedded chromium is not available for WebCodecs API), it is not a valid solution for this project.
Additionally, I have looked into WebAssembly-based decoders like Broadway.js (for H264) and H265Player and I already implemented a player using these decoders and deployed some projects. However, I have concerns about the legitimacy of their licensing claims. It seems that the original source code for their WebAssembly implementation is not applied to their projects' license.
Upvotes: 1
Views: 124
Reputation: 8264
I would wrap your NAL unit stream into fragmented MP4 chunks and then hand it to the video tag.
For example - start looking here: https://github.com/Vanilagy/mp4-muxer
This will cause latency measured in seconds but you can keep the fragment size small.
Upvotes: 1