SDP settings are specified in WCS core source code by default. To change defaults, the following files should be created in /usr/local/FlashphonerWebCallServer/conf directory.

WCS server restart required after the settings are changed.

flash_handler_publish.sdp

The settings file flash_handler_publish.sdp describes SDP for streams published from an RTMP client. By default, the file contains the following SDP configuration:

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 119 127
a=rtpmap:119 H264/90000
a=fmtp:119 profile-level-id=42e01f;packetization-mode=1
a=rtpmap:127 FLV/90000
a=sendonly
m=audio 0 RTP/AVP 97 8 0 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 a=rtpmap:97 SPEEX/16000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:102 mpeg4-generic/48000/1
a=rtpmap:103 mpeg4-generic/44100/1
a=rtpmap:104 mpeg4-generic/32000/1
a=rtpmap:105 mpeg4-generic/24000/1
a=rtpmap:106 mpeg4-generic/22050/1
a=rtpmap:107 mpeg4-generic/16000/1
a=rtpmap:108 mpeg4-generic/12000/1
a=rtpmap:109 mpeg4-generic/11025/1
a=rtpmap:110 mpeg4-generic/8000/1
a=rtpmap:111 mpeg4-generic/48000/2
a=rtpmap:112 mpeg4-generic/44100/2
a=rtpmap:113 mpeg4-generic/32000/2
a=rtpmap:114 mpeg4-generic/24000/2
a=rtpmap:115 mpeg4-generic/22050/2
a=rtpmap:116 mpeg4-generic/16000/2
a=rtpmap:117 mpeg4-generic/12000/2
a=rtpmap:118 mpeg4-generic/11025/2
a=rtpmap:119 mpeg4-generic/8000/2
a=sendonly

Note that changing this file allows to add or remove audio and video streams support only, but not to change codec used by publisher.

For example, if audio description is removed from flash_handler_publish.sdp file

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 119 127
a=rtpmap:119 H264/90000
a=fmtp:119 profile-level-id=42e01f;packetization-mode=1
a=rtpmap:127 FLV/90000
a=sendonly

then a stream from RTMP encoder will be video only stream on WCS even if it si published as video+audio stream by a client.

Since build 5.2.1487 a custom file name may be set

flash_handler_publish_sdp_filename=flash_handler_publish.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

flash_handler_play.sdp

The settings file flash_handler_play.sdp describes SDP for streams played on a Flash client. By default, the file contains the following SDP configuration:

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=42e01f;packetization-mode=1
a=recvonly
m=audio 0 RTP/AVP 97 8 0 102 103 104 105 106 107 108 109 110
a=rtpmap:97 SPEEX/16000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:102 mpeg4-generic/48000/1
a=rtpmap:103 mpeg4-generic/44100/1
a=rtpmap:104 mpeg4-generic/32000/1
a=rtpmap:105 mpeg4-generic/24000/1
a=rtpmap:106 mpeg4-generic/22050/1
a=rtpmap:107 mpeg4-generic/16000/1
a=rtpmap:108 mpeg4-generic/12000/1
a=rtpmap:109 mpeg4-generic/11025/1
a=rtpmap:110 mpeg4-generic/8000/1
a=recvonly

Since build 5.2.1487 a custom file name may be set

flash_handler_play_sdp_filename=flash_handler_play.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

media_transponder.sdp

The settings file media_transponder.sdp dewscribes SDP for republishing of streams via RTMP on a third-party server. By default, the file contains the following SDP configuration:

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 95 96
a=rtpmap:95 H264/90000
a=fmtp:95 profile-level-id=42e01f;packetization-mode=0
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=42e01f;packetization-mode=1
a=recvonly
m=audio 0 RTP/AVP 103 96 97 98 99 100 102 108 104
a=rtpmap:108 mpeg4-generic/48000/1
a=rtpmap:96 mpeg4-generic/8000/1
a=rtpmap:97 mpeg4-generic/11025/1
a=rtpmap:98 mpeg4-generic/12000/1
a=rtpmap:99 mpeg4-generic/16000/1
a=rtpmap:100 mpeg4-generic/22050/1
a=rtpmap:104 mpeg4-generic/24000/1
a=rtpmap:102 mpeg4-generic/32000/1
a=rtpmap:103 mpeg4-generic/44100/1
a=recvonly

Since build 5.2.1487 a custom file name may be set

media_transponder_sdp_filename=media_transponder.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

rtmp_agent.sdp

The settings file rtmp_agent.sdp describes SDP to capture streams via RTMP from a third-party server. By default, the file contains the following SDP configuration:

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 95
a=rtpmap:95 H264/90000
a=fmtp:95 profile-level-id=42e01f;packetization-mode=1
a=sendonly
m=audio 0 RTP/AVP 103 96 97 98 99 100 102 108 104
a=rtpmap:108 mpeg4-generic/48000/2
a=rtpmap:96 mpeg4-generic/8000/2
a=rtpmap:97 mpeg4-generic/11025/2
a=rtpmap:98 mpeg4-generic/12000/2
a=rtpmap:99 mpeg4-generic/16000/2
a=rtpmap:100 mpeg4-generic/22050/2
a=rtpmap:104 mpeg4-generic/24000/2
a=rtpmap:102 mpeg4-generic/32000/2
a=rtpmap:103 mpeg4-generic/44100/2
a=recvonly

Since build 5.2.1487 a custom file name may be set

rtmp_agent_sdp_filename=rtmp_agent.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

rtsp_server.sdp

The file rtsp_server.sdp describes SDP used to playback streams published on WCS server as RTSP. By default, the file contains the following SDP configuration:

v=0
o=- 1988962254 1988962254 IN IP4 192.168.1.5
c=IN IP4 192.168.1.5
t=0 0
a=sdplang:en
a=range:npt=now-
a=control:*
m=audio 0 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/48000/2
a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexDeltaLength=3
a=control:audio
m=video 0 RTP/AVP 119
a=rtpmap:119 H264/90000
a=fmtp:119 packetization-mode=1;profile-level-id=42e01f;
a=control:video

Where

192.168.1.5 is WCS server IP address defined in flashphoner.properties file

Since build 5.2.1487 a custom file name may be set

rtsp_server_sdp_filename=rtsp_server.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

hls.sdp

Since build 5.2.575, the file hls.sdp describes SDP used to playback HLS streams. By default, the file contains the following SDP configuration:

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 112
a=rtpmap:112 H264/90000
a=fmtp:112 packetization-mode=1; profile-level-id=420020
a=recvonly
m=audio 0 RTP/AVP 108 102 103
a=rtpmap:108 mpeg4-generic/48000/2
a=rtpmap:102 mpeg4-generic/32000/2
a=rtpmap:103 mpeg4-generic/44100/2
a=recvonly

Note that audio sample rates lower than 32000 Hz are not sypported yet

Since build 5.2.1487 a custom file name may be set

hls_sdp_filename=hls.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

mse.sdp

Since build 5.2.758 the file mse.sdp describes SDP settings for MSE stream playback. By default, the following settings are used:

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 112
a=rtpmap:112 H264/90000
a=fmtp:112 packetization-mode=1; profile-level-id=420020
a=recvonly
m=audio 0 RTP/AVP 108 96 97 98 99 100 102 103 104
a=rtpmap:108 mpeg4-generic/48000/1
a=rtpmap:96 mpeg4-generic/8000/1
a=rtpmap:97 mpeg4-generic/11025/1
a=rtpmap:98 mpeg4-generic/12000/1
a=rtpmap:99 mpeg4-generic/16000/1
a=rtpmap:100 mpeg4-generic/22050/1
a=rtpmap:104 mpeg4-generic/24000/1
a=rtpmap:102 mpeg4-generic/32000/1
a=rtpmap:103 mpeg4-generic/44100/1
a=recvonly

Since build 5.2.1487 a custom file name may be set

mse_sdp_filename=mse.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

mpegts_agent.sdp

Since build 5.2.1214  the file mpegts_agent.sdp describes SDP settings for MPEG-TS stream publishing. By default, the following settings are used:

v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=audio 0 RTP/AVP 103 96 97 98 99 100 102 108 104
a=rtpmap:108 mpeg4-generic/48000/2
a=rtpmap:96 mpeg4-generic/8000/2
a=rtpmap:97 mpeg4-generic/11025/2
a=rtpmap:98 mpeg4-generic/12000/2
a=rtpmap:99 mpeg4-generic/16000/2
a=rtpmap:100 mpeg4-generic/22050/2
a=rtpmap:104 mpeg4-generic/24000/2
a=rtpmap:102 mpeg4-generic/32000/2
a=rtpmap:103 mpeg4-generic/44100/2
a=sendonly
m=video 0 RTP/AVP 96 119
a=rtpmap:96 H265/90000
a=rtpmap:119 H264/90000
a=fmtp:119 profile-level-id=42e01f;packetization-mode=1
a=sendonly

Since build 5.2.1487 a custom file name may be set

mpegts_agent_sdp_filename=mpegts_agent.sdp

The file should be placed to /usr/local/FlashphonerWebCallServer/conf folder

Audio stream channels number configuration

According to RFC 4566, audio stream channels number can be omitted if one channel is used (mono). Since build 5.2.859, audio stream channels number can be omitted while describing custom SDP, in this case mono audio will be published or played

a=rtpmap:102 mpeg4-generic/48000
a=rtpmap:103 mpeg4-generic/44100

When it is not known if mono or stereo will be published, it is recommended to describe all the possible channel numbers setting an unique payload type to each

a=rtpmap:102 mpeg4-generic/44100/1
a=rtpmap:103 mpeg4-generic/44100/2
a=rtpmap:104 mpeg4-generic/48000/1
a=rtpmap:105 mpeg4-generic/48000/2

Publishing codecs negotiation

If a stream is published with a codec which is not in SDP settings (for example, SDP contains AAC stereo only, but AAC mono is published), the publishing will fail with No common codecs error.