There are several settings which can help to improve video quality for WebRTC to RTMP case:
1. Set video resolution 720p and CPU priority.
constraints: {audio: true, video: {width:1280,height:720}},
mediaConnectionConstraints: {"mandatory": {googCpuOveruseDetection: false}}
Example:
function...