I'm trying to stream at 640x480 from Chrome on Android using WebRTC, and the video starts off at that, but then the resolution drops to 320x240.
Here are the getUserMedia parameters that are sent:
"getUserMedia": [
{
"origin": "http://webrtc.example.com:3001",
"pid": 30062,
"rid": 15,
"video": "mandatory: {minWidth:640, maxWidth:640, minHeight:480, maxHeight:480}"
}
My question is why does the resolution fall? When I try it from Chrome on my Mac that does not happen. I would like to make adjustments so that the video resolution does not change.
video frames dumped using ffmpeg
chrome://webrtc-internals text dump
I'm using the Licode WebRTC streaming server, but have also seen the same behavior using Kurento.
getUserMedia
constraints only affect the media requested from the browser to the hardware and returned as a stream.getUserMedia
constraints don't have any effect on what is done to that stream afterwards (i.e., when it's streamed over a connection). The degradation you're seeing is in thePeerConnection
layer, not in thegetUserMedia
layer. Degradation is triggered by the webrtc implementation when hardware and bandwidth statistics are indicative of low performance, and is negotiated by both sides.You'll have to dig into source code for documentation and evidence of how it's done in each implementation, but references to behavior:
From the OReilly Chapter on WebRTC:
...