Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Nov 2020 13:18:39 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Thomas Steen Rasmussen <thomas@gibfest.dk>, usb@freebsd.org
Subject:   Re: webcamd, usb and two webcams - only one works
Message-ID:  <9a382539-c90d-91b9-bfac-f36c0f19d3f7@selasky.org>
In-Reply-To: <c11c1a2f-306f-3cd9-825f-4c39fd250d50@gibfest.dk>
References:  <c11c1a2f-306f-3cd9-825f-4c39fd250d50@gibfest.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/26/20 1:04 PM, Thomas Steen Rasmussen via freebsd-usb wrote:
> Hello USB friends :)
> 
> I am having a hard time trying to get two webcams working simultaneously 
> on FreeBSD 12.2-STABLE r367109 GENERIC amd64.
> 
> Each webcam works by itself, for example when taking a snapshot with 
> pwcview:
> 
> sudo pwcview -h -c 1 -o foo.jpg -d /dev/video0
> 
> The webcam creates two video devices, video0 and video1. When I plug in 
> the second webcam video2 and video3 are created. But trying to use the 
> device doesn't work, pwcview hangs forever and multimedia/motion 
> complains about timeouts when speaking to the camera.
> 
> If I swap the cameras around then "the other one" works, so I know both 
> cameras are fine.
> 
> It seems somehow webcamd or maybe something in the usb system doesn't 
> like having two cameras in my setup.
> 

Hi Thomas,

Try setting the resolution or framerate down, because high resolution 
webcams need a lot of USB bandwidth! We currently don't have so many 
checks for excess bandwidth usage in the USB stack in FreeBSD, but I 
believe this is the root cause.

Or make sure the webcams are connected to different USB host controllers.

I recently bought a couple of USB 3.0 capable webcams to resolve the 
issue I had on my setup.

USB 2.0 is only 480 MBit/s and many webcams simply send raw data :-)

> Both are connected to a USB hub, but I have tried connecting one 
> directly to the computer, which is a pcengines APU3C4 btw. It did not 
> make a difference.
> 
> What can I try to troubleshoot/debug this? Any more info needed?

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9a382539-c90d-91b9-bfac-f36c0f19d3f7>