Can't capture image or audio from Logitech webcam on Ubuntu server
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't capture image or audio from Logitech webcam on Ubuntu server
I have a Logitech C500 webcam and I want to periodically capture image and audio from it, so I am looking to write a simple script. My server is a VM on esxi.
Here is the related info:
Code:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 006: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 003: ID 046d:0807 Logitech, Inc. Webcam B500
Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ v4l2-ctl --list-devices
UVC Camera (046d:0807) (usb-0000:02:01.0-2):
/dev/video0
then I run:
Code:
$ fswebcam -r 640x480 --jpeg 85 -D 1 web-cam-shot.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Delaying 1 seconds.
--- Capturing frame...
Timed out waiting for frame!
No frames captured.
Does the webcam work in a normal app, like vlc/sane/skype or even Zoom?
The two webcams I used were not sensitive enough to use audio input at the levels required. Zoom or pavucontrol let you see the audio input. What do you see?
Do you have all the audio and video modules for it?
Code:
v4l2-ctl --list-devices
HD Webcam C525 (usb-0000:11:00.3-1.1):
/dev/video0
/dev/video1
/dev/media0
lsmod | grep uvc
uvcvideo 118784 0
videobuf2_vmalloc 12288 1 uvcvideo
uvc 12288 1 uvcvideo
videobuf2_v4l2 36864 1 uvcvideo
videodev 286720 2 videobuf2_v4l2,uvcvideo
videobuf2_common 69632 4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
mc 65536 5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common
lsusb | grep Logitech
Bus 001 Device 004: ID 046d:0826 Logitech, Inc. HD Webcam C525
There's a CONFIG_HID_LOGITECH for older devices, but I don't have that enabled. I use VideoLAN. The ffmpeg command works, but the output is really long.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.