Supported codecs by protocol
The table below shows which video and audio codecs Red5 Pro supports on each protocol.| Protocol | Video codecs | Audio codecs |
|---|---|---|
| WebRTC | H.264, H.265 (HEVC), VP8 | Opus |
| RTMP | H.264, H.265 (HEVC) | AAC, MP3 |
| RTSP | H.264 | AAC |
VP8 and VP9 support over WebRTC is available but disabled by default. AV1 is also available as an option. See the
red5pro-activation.xml section below to enable additional codecs.Configuring codec support
red5pro-activation.xml
Starting with Red5 Pro version 14.0, you configure which codecs are available for publishing and subscribing inred5pro-activation.xml. The file uses Spring Bean definitions. Only modify this file if you have a specific reason to restrict or expand the default codec set.
The default configuration enables H.264 and H.265 for video:
red5pro-activation.xml
<value> lines and restart Red5 Pro.
webrtc-plugin.properties
For WebRTC connections specifically, you control the codec priority order inwebrtc-plugin.properties. Codecs listed first are offered first during WebRTC negotiation.
webrtc-plugin.properties
webrtc-plugin.properties
H.265 (HEVC) support
H.265 delivers better compression than H.264, which means lower bandwidth usage for equivalent video quality. This is especially useful for 4K or high-definition streams in bandwidth-constrained environments.Enabling H.265
H.265 is enabled by default inred5pro-activation.xml and webrtc-plugin.properties from Red5 Pro 14.0 onward. No additional server-side configuration is required to accept H.265 streams.
Publishing H.265 streams
- FFmpeg
- OBS
Use FFmpeg with
libx265 to encode and push an H.265 stream over RTMP. The following command loops a local file and sends it to Red5 Pro:libx265 must be present on your system. Install it via your package manager if needed.Playing back H.265 streams
H.265 playback depends on client-side hardware and browser support.Chrome (Windows)
Chrome (Windows)
H.265 WebRTC playback in Chrome requires launching Chrome with specific flags:Use the Red5 Pro Testbed with codec selection to verify playback once Chrome is running with these flags.
Safari
Safari
Safari supports H.265 WebRTC playback. Enable H.265 in Develop > Experimental Features in Safari’s developer options, then use the Red5 Pro Testbed with codec selection.
FFplay (RTMP)
FFplay (RTMP)
Play an H.265 RTMP stream directly with FFplay:
Windows
Windows
To play H.265 video on Windows outside of a browser, you must have the HEVC Video Extension installed from the Microsoft Store. Without it, Windows media players cannot decode H.265.
Mobile devices
Mobile devices
Mobile playback of H.265 requires hardware H.265 decoder support on the device. Most modern iOS and Android flagship devices have hardware HEVC decoders, but verify your target device capabilities before relying on H.265 for mobile audiences.
Unsupported codec behavior
When Red5 Pro encounters a codec it cannot transcode — for example, because the required decoder library is unavailable — you control its response throughconf/cluster-plugin.properties.
conf/cluster-plugin.properties
| Value | Behavior | When to use |
|---|---|---|
0 | Pass-through — video is forwarded without transcoding | Default; use when downstream clients can handle the original codec |
1 | Audio only — video is dropped, audio continues | Use when video compatibility is uncertain but audio must continue |
2 | Exterminate — stream is disconnected immediately | Use in strict environments where unsupported codecs must never reach subscribers |
Transcoding between codecs
When you need to convert a stream from one codec to another — for example, converting an H.265 RTMP ingest to H.264 for WebRTC delivery — you use a Transcoder node. In a Stream Manager autoscaling cluster, the Transcoder role is assigned to dedicated nodes with sufficient CPU resources. Configure the transcoder role in your Stream Manager launch configuration and assign it aconnectionCapacity and instance type appropriate for the number of streams you expect to transcode simultaneously. A CPU-optimized instance type is recommended for transcoding workloads.
