Red5 Documentation

Codec Configuration

red5pro-activation.xml

As of Red5 Pro version 14.0, additional codecs can be configured in the red5pro-activation.xml file. This allows for the prioritization of codecs for both publishing and subscribing. Changing these settings should only be done if you have specific requirements that require that only certain codec support be enabled. The default codec configuration is as follows:

    <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
        <property name="staticMethod">
            <value>com.red5pro.plugin.Red5ProPlugin.setProStreamVideoCodecs</value>
        </property>
        <!-- List of video codecs which have AMF container support -->
        <property name="arguments">
            <list>
                <value>H264</value>
                <value>H265</value>
                <!--
                <value>VP8</value>
                <value>VP9</value>
                <value>AV1</value>
                -->
            </list>
        </property>
    </bean>

webrtc-plugin.properties

In webrtc-plugin.properties the priority of the codecs can be configured. Changing these settings should only be done if you have specific requirements that change the priority of the codecs. The default priority configuration is as follows:

# available video codecs (identified by enum name H264,H265,VP8,AV1 etc)
rtc.video.codecs=H264,H265

Configuring Unsupported Codec Behavior

The behavior of the server when it encounters and unsupported codec or if a particular codec’s decoder library is unavailable can be controlled with a configuration change. The decoder.error.policy can be configured in conf/cluster-plugin.properties:

Setting Description Default
0 Switch to Pass Through allowing the video to flow through Red5 Pro unchanged Yes
1 Switch to Audio Only No
2 Exterminate Stream disconnecting it from Red5 Pro No
# Action to take when publisher  video cant be transcoded to a more supported format.
# 0=SwitchToPassThrough 1=SwitchToAudioOnly 2= Exterminate stream.
decoder.error.policy=0