webrtc-java icon indicating copy to clipboard operation
webrtc-java copied to clipboard

H265 support

Open liusuyi2021 opened this issue 7 months ago • 3 comments

I can now obtain video frames from MediaMTX's WHP protocol, which basically meets my needs. But there is a small question, I don't know if you have any plans to improve in the future: Medimtx's WebRTC already supports H265. When H265 video appears, the handshake fails and the decoder does not support it.

liusuyi2021 avatar Jul 26 '25 01:07 liusuyi2021

I will add this codec to the PeerConnectionFactory when the WebRTC code supports it. Currently there is a h265 bitstream parser but no encoder/decoder.

H.265/HEVC Browser Support

  • Chrome/Chromium v136+: Supported natively (no flags needed!)
  • Safari-based browsers: Supported natively
  • Firefox: Generally not supported

This project is currently on branch m138.

devopvoid avatar Jul 26 '25 09:07 devopvoid

I have a question: What is the relationship between desktop webRTC and browsers?

liusuyi2021 avatar Jul 26 '25 09:07 liusuyi2021

To be brief: Browsers use the native WebRTC stack under the hood, adding their own implementations or extend the WebRTC stack, like with the H.265 codec. The support of WebRTC codecs (and other features) differs among the vendors. The code base I use is the Google’s WebRTC library. Chrome and Chromium-based browsers use the same base WebRTC engine as desktop apps can with this library, though the browsers add their additional stuff on top. To develop with WebRTC in browsers, you do it with Java/Typescript, obviously.

devopvoid avatar Jul 26 '25 11:07 devopvoid