Capture cam fail / Video library issue

live camera capture works maybe 1 out of every 20 times i click to run the sketch (see simple example code below). otherwise, the feed freezes on a gray screen with spinning wheel and the following error message in the console:

Could not find any devices
Processing video library using GStreamer 1.16.2
IllegalStateException: Could not find any devices
IllegalStateException: Could not find any devices
IllegalStateException: Could not find any devices
IllegalStateException: Could not find any devices

processing 3.5.4 x64
windows 10 x64
camera works fine in other apps (e.g. Camera, Zoom), drivers are updated

import processing.video.*;

Capture cam;

void setup() {
  size(640, 480);
  cam = new Capture(this, 640, 480);
  cam.start();
}

void draw() {
  if (cam.available()) {
    cam.read();
  }
  image(cam, 0, 0);
}