You are not logged in.

#1 2021-04-10 20:56:41

docmanni
Member
Registered: 2014-09-23
Posts: 2

Issues with webcam

Hi all,

I have a quite old webcam here into which I wanted to breath some life again... The system recognizes the cam correctly, drivers are loaded, but there's no data on /dev/video0 (yes, this device exists). Consequently, any webcam viewer (I have tried cheese, kamoso, guvcview, vlc, xawtv, mplayer) shows nothing. Any idea?

# uname -a
Linux workstation 5.11.12-arch1-1 #1 SMP PREEMPT Wed, 07 Apr 2021 21:48:28 +0000 x86_64 GNU/Linux
# dmesg | tail
[ 5808.858519] perf: interrupt took too long (5029 > 4943), lowering kernel.perf_event_max_sample_rate to 39600
[ 7606.070681] gspca_zc3xx 3-11.3:1.0: URB error -71, resubmitting
[ 7606.086638] usb 3-11.3: USB disconnect, device number 17
[ 7612.454144] usb 3-11.3: new full-speed USB device number 18 using xhci_hcd
[ 7612.549150] usb 3-11.3: New USB device found, idVendor=0ac8, idProduct=301b, bcdDevice= 1.00
[ 7612.549158] usb 3-11.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7612.549161] usb 3-11.3: Product: PC Camera
[ 7612.549164] usb 3-11.3: Manufacturer: Z-Star Corp.
[ 7612.552679] gspca_main: gspca_zc3xx-2.14.0 probing 0ac8:301b
[ 7612.744753] input: gspca_zc3xx as /devices/pci0000:00/0000:00:14.0/usb3/3-11/3-11.3/input/input28
$ v4l2-ctl --all
Driver Info:
	Driver name      : gspca_zc3xx
	Card type        : PC Camera
	Bus info         : usb-0000:00:14.0-11.3
	Driver version   : 5.11.12
	Capabilities     : 0x85200001
		Video Capture
		Read/Write
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x05200001
		Video Capture
		Read/Write
		Streaming
		Extended Pix Format
Priority: 2
Video input : 0 (gspca_zc3xx: ok)
Format Video Capture:
	Width/Height      : 640/480
	Pixel Format      : 'JPEG' (JFIF JPEG)
	Field             : None
	Bytes per Line    : 640
	Size Image        : 115790
	Colorspace        : JPEG
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
JPEG compression:
	Quality: 75
	Markers: 0x00000018
		Define Huffman Tables
		Define Quantization Tables
Streaming Parameters Video Capture:
	Frames per second: invalid (0/0)
	Read buffers     : 2

User Controls

                     brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=128 flags=slider
                       contrast 0x00980901 (int)    : min=0 max=255 step=1 default=128 value=128 flags=slider
                          gamma 0x00980910 (int)    : min=1 max=6 step=1 default=4 value=4 flags=slider
                 gain_automatic 0x00980912 (bool)   : default=1 value=1
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=0 value=0
				0: Disabled
				1: 50 Hz
				2: 60 Hz
                      sharpness 0x0098091b (int)    : min=0 max=3 step=1 default=2 value=2 flags=slider

JPEG Compression Controls

            compression_quality 0x009d0903 (int)    : min=50 max=87 step=1 default=75 value=75
$ lsmod | grep gspca
gspca_zc3xx            61440  0
gspca_main             32768  1 gspca_zc3xx
videobuf2_vmalloc      20480  2 gspca_main,pwc
videobuf2_v4l2         36864  2 gspca_main,pwc
videobuf2_common       65536  3 gspca_main,videobuf2_v4l2,pwc
videodev              282624  5 gspca_main,gspca_zc3xx,videobuf2_v4l2,pwc,videobuf2_common
$ ls -la /dev/video0 
crw-rw----+ 1 root video 81, 0 Apr 10 22:19 /dev/video0

$ groups
wheel video audio docker user spice redis

$ cat /dev/video0
(no output)

Here's some output the above mentioned applications have thrown into the terminal:

$ xawtv -v /dev/video0
This is xawtv-3.107, running on Linux/x86_64 (5.11.12-arch1-1)
Warning: Cannot convert string "/dev/video0" to type Int
xinerama 0: 3840x2160+0+0
xinerama 1: 3840x2160+3840+0
vid-open-auto: using grabber/webcam device /dev/video0
v4l2: oops: select timeout
v4l2: oops: select timeout

$ vlc v4l2:// :v4l-vdev="/dev/video0"
VLC media player 3.0.12 Vetinari (revision 3.0.12-1-0-gd147bb5e7e)
[00005613ed16d620] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

$ guvcview-qt 
GUVCVIEW: version 2.0.6
GUVCVIEW: couldn't open /home/user/.config/guvcview2/video0 for read: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
V4L2_CORE: V4L2_CAP_TIMEPERFRAME not supported
control[0]:(unknown - 0x6) 0x980001 'User Controls'
control[0]:(unknown - 0x6) 0x9d0001 'JPEG Compression Controls'
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: V4L2_CAP_TIMEPERFRAME not supported
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory
V4L2_CORE: Could not grab image (select timeout): No such file or directory

$ mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 15
MPlayer SVN-r38157 (C) 2000-2019 MPlayer Team
225 audio & 468 video codecs
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: PC Camera
 Capabilities:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = gspca_zc3xx;
 Current input: 0
 Current format: unknown (0x4745504a)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
Failed to open VDPAU backend libvdpau_radeonsi.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.91.100 (external)
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
Audio: no sound
FPS forced to be 15.000  (ftime: 0.067).
Starting playback...
[mjpeg @ 0x7f580325cb20]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7f580325cb20]No JPEG data found in image
Error while decoding frame!
(repeating...)

Any hint is welcome and much appreciated!

Thanks!
Manfred

Last edited by docmanni (2021-04-10 21:00:43)

Offline

#2 2021-04-13 21:06:04

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: Issues with webcam

What does ffmpeg show?

ffmpeg -f v4l2 -i /dev/video0 output.mp4

Offline

Board footer

Powered by FluxBB