I tried this and this, but the maximum resolution I can get is 640x480.
The pictures taken by other windows apps by the same camera have the resolution of 1600x1200.
Is there any limit for resolution in WebRTC?
I cannot find any official documentation about that.
WebRTC generally makes its own decisions based on the bitrate available. It will automatically increase or reduce resolution and frame rate to ensure the best quality. WebRTC knows what resolution you captured your content with.
WebRTC getUserMedia camera resolution finder Select camera(s) below: Click one of the buttons below to find camera resolutions: Quick Scan Full Scan vertical resolution range: max: to min: Jump to bottomof table Browser Device
Higher in the protocol stack, the WebRTC specification provides web browsers with a mechanism to specify their own limits on concurrent media streams. As per sections 4.4.1.5 and 5.1 of the WebRTC 1.0 specification 6, a browser may specify a limit on the maximum number of total simultaneous encodings for a given codec.
This report presents an investigation into what limitations exist in the WebRTC protocol stack and the maximum number of concurrent media streams and data channels that can be established between WebRTC peers for bidirectional communication.
You can do it by using constraints and passing those to getUserMedia as shown in the links you provided. It's possible that your webcam only supports 640x480 for video and higher resolutions for still images (this is common).
Here's another example, where you can try setting various resolutions and it will print out the corresponding constraints object: http://webrtc.googlecode.com/svn/trunk/samples/js/demos/html/constraints-and-stats.html
For example, to try to force it to 720p at 30FPS:
{
"audio": true,
"video": {
"mandatory": {
"minWidth": "1280",
"maxWidth": "1280",
"minHeight": "720",
"maxHeight": "720",
"minFrameRate": "30"
},
"optional": []
}
}
Note that the current spec does not allow querying the hardware capabilities, due to concerns over privacy due to fingerprinting: http://lists.w3.org/Archives/Public/public-media-capture/2012Jan/0014.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With