Supported Codecs

  • H264, VP8, VP9 video codecs.
  • Opus audio codec.

Supported Servers

WebRTC Streaming Configuration

Publisher Configuration

To enable a player as a publisher set the player needs the publisher config enabled.

    "rtc": {
        "publisher": true

Configuring stream name and server application

    clip: {
        "live": true,
        "sources": [
            { "type": "application/webrtc", "src": "myStream", "appName": "webrtc"}

Server Configuration

The server config, sets up WebRTC connectivity with a particular server.

  • antmedia
  • wowza
  • kurento
  • millicast
  • kinesisvideo
  • ovenmedia
  • unrealmedia
  • antmedia-conference
  • wowza-conference
  • kurento-conference
  • millicast-conference
  • ovenmedia-conference


Here is a list of the configuration options:

publisherEnable the player as the publisher. Which enables the full WebRTC encoder publishing application.false
serverURLThe host of the websocket service. For Wowza the url is configured from the host.
userDataCustom data to send to the Wowza server. This can be used in the custom websocket for authentication.
serverThe server type. For conferencing, configure with the postfix -conference.wowza
debugTurns on full peer connection debug logging.false
prefferedCodecsA codecs filter for the preferred codec. For Wowza H264 requires a level filter.{
"audio": {
"codec": "opus",
"video": {
"codec": "H264",
"level": "42e01f"
opusOpus codec configs{ "stereo": 1 }
uiCSS selectors for managing external select menus with data and control of WebRTC and media options. Disable this if using external controls with the device data provided.{
"audioInput": "audioSource",
"audioOutput": "audioOutput",
"videoSource": "videoSource",
"bandwidth": "bandwidth",
"resolution": "resolution",
"rates": "rates",
"container": "#encoder-menu"
dataCallbackTo manage the encoder controls externally, the device data is provided in this callback to build the device menus. And return with the configured options.
autoStartDeviceEnable to auto activate the device on initialisation. Or turned on when clicking the player.false
maxBitrateBitrateConfigure an initial max bitrate bitrate. This is required for Chrome to function with Wowza.2000
minVideoBitrateMinimum video bitrate. Used on Chrome only. Wowza requires it to be the max bitrate.2000
startVideoBitrateStarting video bitrate. Used on Chrome only.300
audioVideoBitrateAudio codec bitrate.64
recordingEnable recording of the local stream with a download option. Config requires the filename for the download and the mimetype and codec. For H264 use video/mp4 and H264 as the codec. server enables server side recording commands.
pcConstraintsSet browser specific Peer connection options.
toggleScreenEnable camera / share screen switching features.false
floatedControlsMove all the controls buttons to underneath the player.false
transportTcpEnable TCP transport for OvenMediaEnginefalse
seperateScreenFor video conference, start screen sharing as a seperate stream from the camera.
publishTokenJWT or other signed token to authenticate Wowza publishing using a custom provider module.
subscribeTokenJWT or other signed token to authenticate Wowza subscribing using a custom provider module.
peerStatsEnable peer stats collectionfalse
peerStatsIntervalthe interval for stats collection in ms5000
echoCancellationAudio echo cancellationtrue
noiseSuppressionAudio noise suppressiontrue
roomNameConferencing room name required for some servers
adhocHlsConferencing subscribe as HLS for Adhoc RTMP streamsfalse

Peer Connection Options

    "optional": [
        { "googIPv6": true },
        { "googImprovedWifiBwe": true },
        { "googDscp": true },
        { "googSuspendBelowMinBitrate": true },
        { "googScreencastMinBitrate": 300 },
        { "googCombinedAudioVideoBwe": true },
        //turn off resolution changes
        { "googCpuOveruseDetection": false },
        { "googCpuOveruseEncodeUsage": false },
        { "googCpuUnderuseThreshold": 55 },
        { "googCpuOverUseThreshold": 85 }

Enable Stream Recording

    "mimeType": "video/webm",
    "codec": "VP9",
    "name": "recording1"

WebRTC Group Call Conferencing Options

studioModeEnable / disable conference studio mode. In studio mode participants first join a lobby.true
containerThe container selector to host the remote participant's stream in a player.
lobbyContainerThe container selector for participants joining the conference lobby.
playerTemplateThe player container template.
lobbyPlayerTemplateThe lobby player container template.
mergerContainerThe container selector for the WebGL video merger for broadcasting and recording group conferences.
mergerOnlyOnly show the video merger view not the html player view.false
bgImageThe background image to use as a texture for the video merger view.
autoPublishAutomatic broadcast the video merger stream when the master is publishing.
hostEnable participant as the conferencing master. This enables the conferencing api methods.
hlsTemplateWhen using Wowza. The HLS url template to use when subscribing in a group call as HLS.https://{serverURL}/{appName}/{streamName}/playlist.m3u8
dashTemplateWhen using Wowza. Configure a dash template to subscribe to either RTMP or server side streams.
subscribeHlsSet to true to subscribe to remote participants in a group call as HLS instead of WebRTC.
peerSubscribeRequired for Kurento group call conferencing.
maxWidthMaximum width for the conferencing merger WebGL renderer1280
maxHeightMaximum height for the conferencing merger WebGL renderer720

Subscriber Options

serverURLThe host of the websocket service. For Wowza the url is configured from the host.
serverThe server type. For now Wowza is supported with other signalling servers after.wowza
userDataCustom data to send to the Wowza server.
debugTurn on internal peering logs.false

Virtual Background Removal Plugin Options

renderTypeThe background rendering type. Either bodypix, or screenbodypix
accurateUse the fast or slow Bodypix architecture config. Slow is more accurate but more intensive.false
internalResolutionThe resolution for segmenting the detected body from the background. Medium or high.medium
segmentationThresholdAn accuracy threshold for segmentation.0.5
bgImageurl to the background image to use as a video background.
fastThe fast least accurate Bodypix config.{
"architecture": 'MobileNetV1',
"outputStride": 16,
"multiplier": 0.75,
"quantBytes": 2
slowThe slow more accurate Bodypix config.{
"architecture": 'ResNet50',
"outputStride": 16,
"multiplier": 1,
"quantBytes": 2
bgImageThe background poster image for the background texture of the video rendering.
scaledWidthThe width to scale the video to when switching to screensharing as the background.

Player API Methods

togglePublishToggle publishing
toggleRecordToggle local or server recording
toggleDevicesToggle media devices on / off
startDeviceStart the media device
toggleAudioMute / unmute audio tracks
toggleVideoToggle video tracks off / on
toggleScreenShareLaunch screen sharing
sendSend data over a data channel for servers that support it.
sendSignalMessageSend a message over websocket
getDevicesGet the available devices in a map list
getDeviceGet a specific device with a specific media constraint and specificed by an indexconstraint, videoIndex, audioIndex
setStreamReplace the stream with a specific MediaStreamMediaStream
setVideoStreamReplace the video track with a specific MediaStream trackvideostream
setAudioGainSet the output publish audio gain of 0-1audiogain
downloadRecordingFor local recording download the generated recording
getParticipantsGet available conferencing participants
getParticipantGet a specific participant specified by the stream name
featureParticipantMake a participant the speaker. Specified by selected participant or
removeFeaturedParticipantRemove a participant the speaker. Specified by selected participant or
toggleMuteParticipantMute a participant. Specified by selected participant or
addToRoomAdd participant to the room from the lobby in conference studio modename
removeFromRoomRemove participant from the roomname
startPlaylistStreamStart server playlist when using Wowzaname, playlist
stopPlaylistStreamStop server playlistname

Wowza WebRTC Configuration

Provided is a set of example configs for wowza with install script to get the WebRTC signal server working. Provided is a script to convert PEM SSL certificates into JKS format for Wowza.

An SSL certificate is required to be configured into the Secure SSL provider config inside VHost.xml.

The Websocket provider also needs to be configured inside VHost.xml

Enable Wowza Websocket

Enabled within the SSL host within the VHost.xml


Rest api for server recording

Enable a custom api http provider for server recording for publishers.


Enable Custom Wowza Websocket

Provided is a custom websocket Wowza project to enable stream authentication.


Wowza WebRTC Conferencing Configuration

To enable the conferencing examples. The supplied WebRTCCustomSignalServer Wowza IDE project, needs to be imported and built to be configured and loaded.

This provides the custom WebRTC signal server for WebRTC publishing with token protection. Another WebSocket provider is for group call signal messaging and to notify when a WebRTC publish begins.


Ant Media Server Options

For publish and subscribe stream tokens and video conferencing interval settings.

roomCheckIntervalInterval to check for new participant streams5000
pingIntervalServer keep alive interval30000
enablePingEnable keep alive pollerfalse
modePublishing modelegacy
tokenPublish / subscribe stream token
subscriberIdUsed to generate thesecurity OTP code
subscriberCodeThe security OTP code
apiKeyThe JWT key for the rest service. Required for server side recording

Ant Media Server WebRTC Configuration

SSL is required to be configured for WebRTC to function. Ant Media supplies a helper script to import an SSL certificate and private key into the server host configs.

Documentation for SSL setup.

For Letsencrypt SSL configuration , the helper script generates this internally. This requires port 80 external access for the verification server.

sudo ./ -d

If the verification server is inaccessible. A DNS verification is possible to be imported into the script. Letsencrypt scripts are supplied for generating these certificates.

certbot -d -m [email protected] --manual --preferred-challenges dns certonly

Import external generated certificates

sudo ./ -f yourdomain.crt -p yourdomain.key -c yourdomainchain.crt -d

Millicast Options

    "millicast": {
        "accountId": "",
        "publishToken": "",
        "subToken": ""
accountIdMillicast account id shown in the api key section.
publishTokenThe publishing token created in the api section. This is used for generating the signal server url unless supplied using serverURL
subTokenSubscriber token generated by the backend using the secret key and Millicast api. This is used when authenticated subscriber is enabled for the publish token.
userDataCustom data to send to the Wowza server.
debugTurn on internal peering logs.false

Millicast WebRTC Configuration

In the Millicast console. A streamname is required to be added. This will generate a publish key. A wildcard asterix can be used to link a publish key to any stream name. Click the Token Required next to the Secure Viewer section. This turns on token authentication for subscribers.

Millicast Console

After adding a stream. A Publish key and Account ID is displayed to configure the publisher and subscriber with.

Millicast Console

Generating Subscriber Token

Using the Millicast API. A subscriber token can be generated with domain restriction. This requires the Secret Key which is different to the Publish Key. A helper script is supplied to generate these tokens and test the tokens work with the api.

curl -H "Authorization: Bearer secretkey" -H "Content-Type: application/json" -d '{"label": "LiveStreamLabel", "streams": [{"streamName": "StreamName"}], "allowedOrigins": ["*"]}'

Ovenmedia Engine Options

For publish and subscribe stream tokens and tcp connection settings.

transportTcpEnable TCP transport. Seems to be required for the Docker image.false
policySigned Policy token for stream security

AWS Kinesis Options

Supplied is lambda and authorizer scripts to handle the signal channel ice servers and signed WebSocket url. Supplied is scripts to generate encrypted JWE tokens for the token authorizer. JWE provides encrypted token payloads.

"kinesisvideo": {
            "publishUrl": "",
            "publishToken": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0.jtz-Wru3hxJlLmaBcgPzHgLwn-wPHEgo_cRRFg6DhR0toIHFBPmKXDUTaVlG_jBCo9TQ8VPFXoI03UK4QBOYXcKdgog0EOf7._TKhqyvVDOkZLw83ObkXVg.NFTZe7zRQH-syEC6Zn2izADtOdbM6tGyrGycfd7DYh3M7npPdXltMu50uQG8Q-A-09p4-TimibbevbxxShBjTaCGwZBMfevdQW6KNQiLXAFQSP2rlqfTK-Kf-cT-RZ3_VeeGopbWhzJ-AJbwVDV3_uQ8R0yPP2TanfBiy8etb5mNzqexbqRp5PFI7P54amcj.qmVpOoZi1mByhN88n8Jl_7Rune9cTnBNTf6neWrpEQE",
"kinesisvideo": {
            "subscribeUrl": "",
            "subscribeToken": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0.acMKeL-pp0aAxlYeV3C3YzqxgCq2uPnBlEae7SCsV3ic4nBQt207lfL1-XinVvVHXUVkG2r3-S2TFtsbNNchhNscFH_FiVxh.qZ9fmfleXUtXfvHChFwPNg.Zx_9MSy4osZsT0VUYZF3C9Mknc8o3vigrcVZUboO9TBWZu8DpUdxBmR3ddA4Dk--Zjl6_5un9nBXD7z2ZKMbjsaqT2w4udI9WNjOstpSFjhbtC6e7laOfBv2ZIeKGfkk8ogZ3ZnYyXlyU6zM1nAvKfD3DezTCPzVQbHMa5N6bOlYJce4lCl_2wwWtgi-NFfBv8z-ZrcOzxlx9HrqUqUyAA.fybw2HIJANCYuaKli1I2xbt3606WdyGqeYADVLvh2LE"
"kinesisvideo": {
            "credentials": {
                "accessKeyId": "",
                "secretAccessKey": ""
regionThe AWS region for the signalling channel.
publishTokenThe publishing token for custom AWS Lambda authorizer.
subcribeTokenThe viewer subscriber token for custom AWS Lambda authorizer.
accessKeyIdThe AWS access key id
secretAccessKeyThe AWS secret key

Kurento WebRTC Configuration

Kurento Media Server comes in two parts. The Kurento Media Server and a java / node JSONRPC client WebSocket server.

Provided is a one to many application aswell as a group call application to run the group call example.

The one to many application endpoint is one2many

The group call application endpoint is groupcall

Start the Kurento server first with

export MAKEFLAGS="-j$(nproc)"

Start the Kurento client Websocket server with

mvn -U clean spring-boot:run -Dkms.url=wss://localhost:8433/kurento

Unreal Media Options

transportTcpEnable tcp ice candidate communication.
sinportPortEnable ice candidate communication over a single port.
publicIpThe public ip of the server for ice candidate resolving.
publishTokenThe password used for publishing
secureTokenThe token for playback security.