It depends on browser and camera.
If you set video resolution 640x480 and browser can't take this resolution from camera, it can either raise error or adapt ratio to supported format.
Try to use 16:9 ratio everywhere. All modern cams and browsers should support such ratio (i.e. 1280x720 or 640x...