Reconfigure USB web camera to use with Telegram

Hello,
I connected a second USB web camera to my laptop (old Logitech web camera):

Code:
usbconfig -u 1 -a 4 dump_device_desc
ugen1.4: <vendor 0x046d product 0x081b> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x00ef  <Miscellaneous device>
  bDeviceSubClass = 0x0002
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x046d
  idProduct = 0x081b
  bcdDevice = 0x0010
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0000  <no string>
  iSerialNumber = 0x0002  <7EB793D0>
  bNumConfigurations = 0x0001

It works correctly, I can use it in Chromium and Firefox, but I have a problem with Telegram though.
It is shown in cameras list in Telegram options, but it is not selectable. I suppose that the software is confused by the fact that this camera has neither iManufacturer nor iProduct defined. Is it possible to override these parameters on attach of the camera, using devd and usbconfig (or another tool)?
 

Attachments

  • shot-2023-02-01_15-15-09.jpg
    shot-2023-02-01_15-15-09.jpg
    13.9 KB · Views: 66
It works correctly, I can use it in Chromium and Firefox, but I have a problem with Telegram though.
Something that may be useful for you to know is that you can use Telegram in Firefox and Chromium:
You can test it. Can you use the camera in the browser app? I will try to use my webcam in Telegram in the coming days.
Maybe I can find why you can't select the webcam.
 
I tested it today with one webcam and it works perfectly as you can see here:

2023-02-11-132104_1920x1080_scrot.png


The selection also works without any problems in my case:
2023-02-11-132656_1920x1080_scrot.png


In your image I see that you do have an option that does not have a name.
So what happens when you click this 'option without a name'?

A useful tip is also given in the following article:
If you have multiple webcams on your system (e.g. visible light and IR), you’ll have to add a line specifying the location of each camera on the USB bus, e.g. webcamd_0_flags="-d ugen0.6" in my case (see man 8 webcamd and man 8 usbconfig).
 
So what happens when you click this 'option without a name'?

If you have multiple webcams on your system (e.g. visible light and IR), you’ll have to add a line specifying the location of each camera on the USB bus, e.g. webcamd_0_flags="-d ugen0.6" in my case (see man 8 webcamd and man 8 usbconfig).

If I click the option without name - nothing happens, the dialog just closes. If I go back to this dialog - the default camera is still selected. BTW, I have exactly the same problem in internal dialogs of Chromium and Firefox - the second camera is present as an empty option in list, it cannot be selected. BUT, some sites (for example, https://webcasts.com/webrtc/) propose their own selector for cameras. If the site correctly manages the empty camera name and assigns another name to it (something like "Camera 2") - the camera can be selected and can be used.

And yes, sure, I have two lines for two cameras in my rc.conf.

So, for me it is just a problem of absence of iManufacturer and iProduct parameters. If I find a way to override them - the camera will correctly work everywhere.
 
Back
Top