[Interest] QCamera resolution problem

"Alexander CarĂ´t" alexander_carot at gmx.net
Thu Jul 19 23:27:04 CEST 2018

Hello all,

I have a problem with setting the resolution of external USB-webcam on OSX. 

I initialize my cam like this:

void soundjack::startVideo(int index){
  QCameraViewfinderSettings cameraSettings;
  QSize resolution(640,480);

  camera = new QCamera(availableCameras[index]);  
  imageCapture = new QCameraImageCapture(camera);
  connect(imageCapture, &QCameraImageCapture::imageCaptured, this, &soundjack::processImage);


and I stop my cam like this:

void soundjack::stopVideo(){

  delete camera;
  delete imageCapture;

When I am running this code on my MacBook Pro withe the inbuilt Facetime cam everything works out fine. However, with two external USB-webcams on the same machine I have the following problem:

When I initialize the cam the first time all is working fine but when stopping it or changing to the inbuilt cam and then relaunching it for the second time the resolution is set to 1280 x 720 instead of 640 x 480. 

Stopping it again or changing to the inbuilt cam and then launching it for the third time leads to the desired 640 x 480.

In other words: Every other attempt works.

Can anyone help how to get rid of this problem ?

Thanks in advance,


Email : Alexander at Carot.de
Tel.: +49 (0)177 5719797

More information about the Interest mailing list