WebRTC to Wowza

Hi,
We are using the WebRTC to RTMP republishing to send the stream to Wowza. We are trying to understand what are the best configurations or settings (if possible within FlashPhober) of the video encoder so that we achieve the best video quality on Wowza?.

Best

Sebastian
 

Max

Administrator
Staff member
There are several settings which can help to improve video quality for WebRTC to RTMP case:
1. Set video resolution 720p and CPU priority.
Code:
constraints: {audio: true, video: {width:1280,height:720}},
mediaConnectionConstraints: {"mandatory": {googCpuOveruseDetection: false}}
Example:
Code:
function publishStream() {
    var session = Flashphoner.getSessions()[0];
    var streamName = $('#publishStream').val();
    session.createStream({
        name: streamName,
        display: localVideo,
        cacheLocalResources: true,
        receiveVideo: false,
        receiveAudio: false,
        constraints: {audio: true, video: {width:1280,height:720}},
        mediaConnectionConstraints: {"mandatory": {googCpuOveruseDetection: false}}
    }).on(STREAM_STATUS.PUBLISHING, function(stream){
        setStatus("#publishStatus", STREAM_STATUS.PUBLISHING);
                onPublishing(stream);
    }).on(STREAM_STATUS.UNPUBLISHED, function(){
        setStatus("#publishStatus", STREAM_STATUS.UNPUBLISHED);
        onUnpublished();
    }).on(STREAM_STATUS.FAILED, function(){
        setStatus("#publishStatus", STREAM_STATUS.FAILED);
        onUnpublished();
    }).publish();
}
Note, the CPU priority setting works in latest versions only.
2. Update to latest server version and use H.264 codec in priority (config flashphoner.properties)
Code:
codecs =opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
3. Make sure your bitrate is enough good (around 1.5 Mbps for 720p) and your resolution is not decreased (stays on 720p).
You can see these details in chrome://webrtc-internals

webrtc-internals.jpg
As you can see from these graphs
Bitrate is: 2-3 Mbps
Resolution is stable: 1280x720
Make sure you have similar stable values during your streaming process.
 
Top