What computer is this? What webcam do you use?
Maybe you could try to connect one or both devices through an externally powered USB hub to make sure the issue is not due to too much power consumption.
You could also try lowering the webcam framerate to see if it helps.
@Sunderlandkyl have we experienced similar issues before?