Posted on

Publish HEVC live streaming by OBS to SRS via RTMP

After OBS Studio 29.1, they added support for Enhanced RTMP, it is now possible to push HEVC streaming via RTMP, and SRS also support HEVC over RTMP and HTTP-FLV v6.0.2+.

Here is a simple tutorial on how to use OBS to push HEVC streams to SRS.

OBS support H.265 over RTMP v29.1+

The original RTMP protocol cannot support high-compression video formats such as HEVC or AV1. But from OBS Studio 29.1 Beta, OBS adds support for the updated: Enhanced RTMP. For more detail, please refer to: Enable AV1, HEVC via RTMP to YouTube.

Therefore, the first step to push an HEVC stream via RTMP from OBS is to download the latest version of OBS. (Download here: OBS Studio 29.1 Beta Release Page).

SRS support H.265 over RTMP v6.0.42+

  • RTMP: Support enhanced RTMP specification for HEVC, v6.0.42.
  • Player: Upgrade mpegts.js to support it.

Enhanced RTMP specification: https://github.com/veovera/enhanced-rtmp

First, start SRS v6.0.42+ with HTTP-TS support:

./objs/srs -c conf/http.ts.live.conf

Pulish HEVC via RTMP from OBS

  1. Your OBS version should be greater than v29.1, than open File -> Setting
  2. Select Stream -> Service to Custom…
  3. Select Output -> Output Mode to Advanced, than choice Encoder to HEVC
  4. Click Start Streaming
  5. Check your streaming from SRS console
  6. Preview your streaming by SRS Player