Red5 Documentation

h.265 Encoding and Playback

Encoding

FFMPEG

With libx265 present on the system, FFMPEG can be used to encode h.265 streams and send them to Red5 Pro. The following command will transcode a file named test.mp4 to h.265 and send it to Red5 Pro in a never ending loop:

ffmpeg -stream_loop -1 -re -i test.mp4 -c:v libx265 -preset ultrafast -f flv "rtmp://<host>:1935/live/stream1"

OBS

To stream h.265 over RTMP, select the h.265 codec in the OBS settings to encode a stream in h.265 and send it to Red5 Pro. For WHIP ensure that you have a supported hardware h.265 encoder such as you would find on a GPU.

Playback

Chrome

You can playback h.265 WebRTC streams in Windows Chrome with these startup flags and the Red5 Pro Testbed with codec selection:

chrome --enable-features=PlatformHEVCEncoderSupport,WebRtcAllowH265Receive,WebRtcAllowH265Send --force-fieldtrials=WebRTC-Video-H26xPacketBuffer/Enabled

FFPLAY

You can playback h.265 RTMP stream with FFPLAY:

ffplay -i rtmp://<host>:1935/live/stream1

Mobile Devices

Mobile devices require hardware h.265 encoding and/or decoding support to playback h.265 streams.

Safari

You can playback h.265 WebRTC streams in Safari by enabling h.265 in the developer options and using the Red5 Pro Testbed with codec selection.

Windows

You must have the HEVC Video Extension from the Microsoft Store to playback h.265 streams in Windows.