H265 gives you the same picture as H264 with less data. OBS sends it, and so do plenty of IP cameras and hardware encoders. Until now, though, getting H265 to a WebRTC viewer on Ant Media Server meant decoding every frame on the server and encoding it again as H264. That cost you CPU, and it cost your viewers a little sharpness.
That detour is gone. WebRTC H265 is part of Ant Media Server Enterprise from version 3.3.0, and it works in both directions: viewers watch H265 in the browser, and browsers can publish H265 too. The stream your encoder sends is the stream your viewer plays. Turning it on takes one switch, and four steps later your H265 stream from OBS is playing in the browser.
Table of contents
- What WebRTC H265 changes for your viewers
- Where WebRTC H265 pays off
- WebRTC H265 vs H264 and VP8
- How to Stream H265 from OBS to your browser in 4 steps
- Bonus: Publish WebRTC H265 from your browser
- Before you switch
- How WebRTC H265 works in Ant Media Server
- Conclusion
What WebRTC H265 changes for your viewers
Viewers whose browser and device can play H265 get a sharper picture on the same connection, or the same picture on a slower one. H265, also called HEVC, is the codec that came after H264, and it compresses video 25 to 50 percent better at the same quality. A 1080p stream that needs 4 Mbps in H264 looks the same at 2 to 3 Mbps in H265. For someone watching on mobile data or a crowded hotel Wi-Fi, that gap is often the difference between a clean picture and the spinning wheel.
Your server also stops re-encoding. It forwards the H265 frames as they arrive, so the CPU that went into transcoding now serves more streams. The delay stays at about half a second, like every other WebRTC stream on Ant Media Server.
Where WebRTC H265 pays off
Camera walls are the clearest case. Security cameras are often set to H265 to save storage and uplink, and now the browser plays the camera’s own stream, with no transcoder per camera. Put 100 cameras on one server and that is 100 transcodes you no longer run. The IP cameras to WebRTC walkthrough shows how to connect them over RTSP.
Sports and live events stay sharp in fast motion, which is where H264 runs out of bits first. It shows up as blocks on the pitch and smeared faces in the crowd, and H265 avoids that at a bitrate your viewers’ connections can carry.
Interactive streams with big audiences pay for every viewer. Auctions, online classes and watch parties need WebRTC’s low delay, and every viewer is a separate stream leaving your server. With H265 each one is smaller, so the same bandwidth carries more people.
Browser studios get a better picture from the same upload. A guest joining from home usually runs out of upload speed long before the webcam runs out of detail, and H265 from the browser fits more of that detail in, with nothing to install.
WebRTC H265 vs H264 and VP8
Here is H265 next to H264 and VP8, the codecs WebRTC streams use today:
H264 VP8 H265
Data for a 1080p stream About 4 Mbps 4.5 to 6 Mbps 2 to 3 Mbps
Plays and publishes in All All Chrome and Safari
Needs hardware in the device No No Yes
Files the server writes MP4, HLS, DASH WebM MP4, HLS, DASH
H265 is the codec to send when your viewers can play it. It needs 2 to 3 Mbps where H264 needs about 4, and it gets the same MP4, HLS and DASH files. VP8 needs more data than H264 and gets only WebM files. H264 plays and publishes everywhere with no hardware needed, so it stays the codec for everyone else.
How to Stream H265 from OBS to your browser in 4 steps
OBS sends HEVC to the server, and the server passes it to your browser with WebRTC. You need Ant Media Server Enterprise 3.3.0 or later, OBS 29.1 or later on a machine that can encode H265, and Chrome or Safari on a device that can decode it. Before you switch has the browser details.
Step 1: Turn on H265 in the application settings
In the web panel, open your application, go to the Settings tab and find WebRTC Codec Support. Turn on H.265 / HEVC, which is off by default, and select Save changes. Leave H.264 on as well: browsers without H265 still publish in it, and viewers without H265 need an H264 rendition, which Before you switch covers.

WebRTC H265 is one switch in the application settings.
Step 2: Send H265 from OBS
In OBS, open Settings > Stream, set Service to Custom and enter your server and a stream ID:
Server: rtmp://your-domain/live Stream Key: cam-lobby Now switch OBS to H265.
Open Settings > Output, set Output Mode to Advanced and stay on the Streaming tab. In Video Encoder, pick the HEVC encoder for your graphics hardware:
On Windows: NVIDIA NVENC HEVC, QuickSync HEVC on Intel or AMD HW H.265 (HEVC)
On macOS: Apple VT HEVC Hardware Encoder
On Linux: FFmpeg VAAPI HEVC on Intel and AMD, or NVIDIA NVENC HEVC
If none of them is in the list, this machine has no H265 encoder.
Under the encoder, set Keyframe Interval to 1 or 2. If the encoder has a B-frames setting, set it to 0. Select OK, then Start Streaming. Within a few seconds cam-lobby shows up live in the web panel’s Live Streams tab. The OBS guide covers the other settings.

OBS sends H265 once an HEVC encoder is picked in the advanced output settings.
Step 3: Play it with WebRTC
Open https://your-domain:5443/live/play.html?id=cam-lobby in Chrome. Done. The video in that tab is the H265 your encoder sends, untouched, at WebRTC delay. Send the same link to your viewers, and they get it too.
No video? Then this device most likely cannot decode H265 in hardware, and Chrome only takes H265 when it can. Open the same link on your phone: nearly every Android phone and iPhone has an H265 decoder built in, and a current Chrome or Safari plays it there.
Step 4: Check WebRTC H265 in webrtc-internals
Open chrome://webrtc-internals in another tab and expand the video inbound-rtp entry under Stats Tables. It reads [codec]=H265, so the browser gets the H265 itself, not an H264 copy. On the same line, powerEfficientDecoder=true means your device decodes it in hardware.

Chrome receives the stream’s own H265, with no transcoding on the server.
Bonus: Publish WebRTC H265 from your browser
Browsers can publish H265 to Ant Media Server too. A webcam stream from Chrome or Safari arrives as H265 and stays H265: the server forwards it to WebRTC viewers and writes the MP4 recording from the same frames, with no re-encoding.
The browser has to offer H265 first. Safari 18 and later does, and so does Chrome 136 and later on a device with a hardware HEVC encoder. Every browser offers H264 as well, though, and the server picks H264 whenever H.264 is on in the application.
So browser H265 needs an application with H.264 switched off and H.265 / HEVC on. If every publisher and viewer of live has an H265-capable browser, switch it off there. Otherwise create a second application just for your H265 publishers.
The WebRTC sample publish page works as it is, so there is no code to change.
Open https://your-domain:5443/live in Chrome, with your application’s name in place of live, call the stream studio1 and select Start Publishing. In chrome://webrtc-internals, the video outbound-rtp entry now reads [codec]=H265, and your viewers watch it at https://your-domain:5443/live/play.html?id=studio1 like any other stream.

Chrome publishing H265 from a webcam through the unchanged sample page.
Before you switch
H265 in the browser depends on the browser and the hardware under it, so check these first:
Chrome 136, Safari 18
Chrome 136 added H265 to WebRTC in April 2025, and Safari 18 supports the same RFC 7798 format. Firefox does not support H265 over WebRTC.
Hardware decoding required
Chrome offers H265 only when the device decodes it in hardware. Phones almost always can, while laptops and desktops depend on their graphics chip. Your page can check first with the Media Capabilities API.
H264 for everyone else
A viewer without H265 gets no video from an H265-only stream. For a mixed audience, add an adaptive bitrate rendition with H.264 on, and each viewer gets the codec their browser plays. That brings the encoding cost back, so add it only when you need it.
How WebRTC H265 works in Ant Media Server
The server packs H265 into WebRTC itself and passes it to viewers without touching the frames. Its WebRTC stack now implements RFC 7798, the RTP format for H265 that Chrome and Safari use, so the browser needs nothing extra.
When the source is already H265 and you have no adaptive bitrate renditions, the server forwards the frames straight to every viewer. OBS over RTMP, SRT encoders and IP cameras over RTSP all take this path. The server also puts H265’s parameter sets in front of every keyframe, so a viewer who joins late starts playing at the next one.
The server offers the browser HEVC Level 6 as well. Without it, browsers assume Level 3.1, which tops out at about 720p, so 1080p and 4K would not play at full resolution. Level 6 is the level-id=180 on the codec line in webrtc-internals.
Conclusion
If your cameras or encoders already send H265, there is no reason left to transcode it for WebRTC. Turn on H.265 / HEVC, and your Chrome and Safari viewers get the stream your encoder made, with 25 to 50 percent less data and no transcoding in between. Keep H.264 on, and add an H264 rendition when some viewers have no H265. For publishers who stream from a browser, use an application with H.264 off, and their H265 goes through the same way.



