USBCAM showing error


#1

Hi all,

I want to use USB CAM, on debian16.06 NG, but 16.04 is OK.

I can catch the driver, but the image doesn’t show.
The error message is as follows:

/dev/video0 opened.
No input was specified, using the first.
Unable to query input 0.
VIDIOC_ENUMINPUT: Inappropriate ioctl for device

does anyone occur the same issue? how could I solve it?

Thanks,


#2

Almost the end of the year, so first thing first =) happy new year 96Boards staff, great job
Now the issue:
I am trying to finish Coursera Internet of Things: Multimedia Technologies course, to do this I got a LifeCam HD-3000 microsof webcam. This Does not work. I have tried some command catched from 2015 same topic forum and these are the outputs:

[ 3855.664579] usb 1-1.1: Product: Microsoft® LifeCam HD-3000
[ 3855.671778] usb 1-1.1: Manufacturer: Microsoft
[ 3855.680635] uvcvideo: Found UVC 1.00 device Microsoft® LifeCam HD-3000 (045e:0779)
[ 3855.689554] input: Microsoft® LifeCam HD-3000 as /devices/platform/soc/78d9000.ehci/usb1/1-1/1-1.1/1-1.1:1.0/input/input8

linaro@linaro-alip:/dev$ v4l2-ctl -D
Driver Info (not using libv4l2):
Driver name : msm_vfe_video
Card type : msm_vfe_video
Bus info : media
Driver version: 0.1.0
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format

linaro@linaro-alip:/dev$ gst-launch-1.0 v4l2src ! video/x-raw,width=320,height=240,framerate=30/1 ! videoconvert ! glimagesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Got context from element ‘glimagesink0’: gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"(GstGLDisplayX11)\ gldisplayx11-0";
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.001520569
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
linaro@linaro-alip:/dev$

I am working with
linaro-jessie-alip-qcom-snapdragon-arm64-20160630-110

thanks


#3

I’m running 16.09 and my USB camera is working ok.

From the logs Sergio shared I think the V4L2 drivers for the low-level hardware camera interface (CSI) may end up as the default camera in 16.06. Perhaps try exploring the different device nodes:

for i in /dev/video*
do
  echo "--- $i ---"
  v4l2-ctl -D -d $i
done

For me running 16.09 this gives:

--- /dev/video0 ---
Driver Info (not using libv4l2):
	Driver name   : uvcvideo
	Card type     : Microsoft® LifeCam Show(TM)
	Bus info      : usb-78d9000.ehci-1.1
	Driver version: 4.4.23
	Capabilities  : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
--- /dev/video32 ---
Driver Info (not using libv4l2):
	Driver name   : vidc
	Card type     : video decoder
	Bus info      : media
	Driver version: 1.0.0
	Capabilities  : 0x84203000
		Video Capture Multiplanar
		Video Output Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04203000
		Video Capture Multiplanar
		Video Output Multiplanar
		Streaming
		Extended Pix Format
--- /dev/video33 ---
Driver Info (not using libv4l2):
	Driver name   : vidc
	Card type     : video encoder
	Bus info      : media
	Driver version: 1.0.0
	Capabilities  : 0x84203000
		Video Capture Multiplanar
		Video Output Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04203000
		Video Capture Multiplanar
		Video Output Multiplanar
		Streaming
		Extended Pix Format

Please try this and let us know what you see!


#4

Hi all,

— /dev/video0 —
Driver Info (not using libv4l2):
Driver name : msm_vfe_video
Card type : msm_vfe_video
Bus info : media
Driver version: 0.1.0
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
— /dev/video1 —
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB 2.0 Camera
Bus info : usb-78d9000.ehci-1.2.4
Driver version: 4.4.9
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
— /dev/video2 —
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB 2.0 Camera
Bus info : usb-78d9000.ehci-1.2.4
Driver version: 4.4.9
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
— /dev/video32 —
Driver Info (not using libv4l2):
Driver name : vidc
Card type : video decoder
Bus info : media
Driver version: 1.0.0
Capabilities : 0x84203000
Video Capture Multiplanar
Video Output Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04203000
Video Capture Multiplanar
Video Output Multiplanar
Streaming
Extended Pix Format
— /dev/video33 —
Driver Info (not using libv4l2):
Driver name : vidc
Card type : video encoder
Bus info : media
Driver version: 1.0.0
Capabilities : 0x84203000
Video Capture Multiplanar
Video Output Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04203000
Video Capture Multiplanar
Video Output Multiplanar
Streaming
Extended Pix Format
linaro@linaro-alip:~$

Here is what I get data, it is defined /dev/video1 & /dev/video2.
Can I change the device to /dev/video0 or others? How should I modify it?


#5

Hi Miles

In general you should not seek to change the device number selected by the kernel[1], it is better to configure the application to choose the video device you want to use (possibly with help from udev rules to give it a stable name after a reboot).

You didn’t say what application you were using so I can’t offer any explicit advice here… however for anything based on gst-launch replacing “v4l2src” with “v4l2src device=/dev/video<N>” should do it.

Daniel.

[1] … although you might be able to achieve that simply by upgrading to the 16.09 release.


#6

Hi danielt.
Thank you. Webcam was mapped to /dev/video1. This command is now running as expected:
$gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=320,height=240,framerate=1/1 ! videoconvert ! glimagesink

I will get into course code to find out where to change this.
Thanks again


#7

No worries… and it would be really cool if you can get the course notes updated!

Probably obvious to you after the comments above but just in case it’s not… best not to modify things to add “device=/dev/video1” as that may simply see us facing the opposite problem later for users running 16.09! Better to add a side-note explaining how to identify the right video number and explain it may be different on different systems.


#8

as said above, the /dev/videoxx device is allocated dynamically, and depends on the number of camera (well ‘video’ devices) available in your system (encoders, decoders, might show up there as well).

any documentation about the camera should recommend to use v4l2-ctl utility (from v4l-utils package):

root@linaro-lxqt:~# v4l2-ctl --list-devices
Qualcomm Venus video decoder (platform:qcom-venus):
        /dev/video0
        /dev/video1

Live! Cam Sync HD VF0770 (usb-78d9000.ehci-1.1):
        /dev/video2

From the output it is obvious which device is doing what.