Linux libv4l2:打开流时出错:设备上没有剩余空间

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11394712/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 13:45:21  来源:igfitidea点击:

libv4l2: error turning on stream: No space left on device

linuxusbwebcam

提问by victor1234

I try to get stereo pair for opencv. I connect Logitech B910 and Logitech C910 webcams to usb. But have this error. I played with quirks parametrs and set outfmt=mjpegin mplayer, but have this error again.

我尝试为 opencv 获取立体声对。我将罗技 B910 和罗技 C910 网络摄像头连接到 USB。但是有这个错误。我玩了 quirks 参数并outfmt=mjpeg在 mplayer 中设置,但再次出现此错误。

Where can I find bug in uvcvideo or usb drivers? What monitoring or debuging tools I should use?

在哪里可以找到 uvcvideo 或 USB 驱动程序中的错误?我应该使用哪些监控或调试工具?

回答by Tim Williscroft

This is a badly worded error message ; the cause is not having enough USB bandwidth on the controller.

这是一个措辞不好的错误信息;原因是控制器上的 USB 带宽不足。

As you have guessed, if you could just get your cameras to use MJEPG your problem will be resolved.

正如您已经猜到的,如果您能让您的相机使用 MJEPG,您的问题将得到解决。

OpenCV might be using FFMPEG to do the acquire, ( the linux build generally has FFMPEG support) and the OpenCV docs admit you can't change the acquire format if FFMPEG is being used.

OpenCV 可能正在使用 FFMPEG 进行获取,(Linux 版本通常支持 FFMPEG)并且 OpenCV 文档承认如果正在使用 FFMPEG,则您无法更改获取格式。

All I've found in my research is that you need to change the FFMPEG configuration.

我在研究中发现的所有内容是您需要更改 FFMPEG 配置。

Try moving the cameras to different USB controllers if you can.

如果可以,请尝试将相机移动到不同的 USB 控制器。

回答by Goddard

This is a problem with the USB controller running out of space.

这是 USB 控制器空间不足的问题。

This can usually be fixed by plugging the device into a different USB port. For example I have eSATA ports on my board and USB 2 ports and USB 3 ports. If you were previously using USB2 ports try the USB3 ports.

这通常可以通过将设备插入不同的 USB 端口来解决。例如,我的板上有 eSATA 端口以及 USB 2 端口和 USB 3 端口。如果您以前使用 USB2 端口,请尝试使用 USB3 端口。

You can see the video card allotment via the command line on Ubuntu via

您可以通过 Ubuntu 上的命令行查看显卡分配情况

cat /sys/kernel/debug/usb/devices | grep "B: "

You might have to use sudo depending on distro. If you are windows, or osx sorry I don't know solutions for those systems.

根据发行版,您可能必须使用 sudo。如果您是 windows 或 osx 抱歉,我不知道这些系统的解决方案。

my results look like this.

我的结果是这样的。

B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
B:  Alloc=140/900 us (16%), #Int=  4, #Iso=  0
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
B:  Alloc= 17/900 us ( 2%), #Int=  1, #Iso=  0
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
B:  Alloc=  0/800 us ( 0%), #Int=  1, #Iso=  0
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0

回答by Satyendra Sahani

this works as charm for me

这对我来说很有魅力

sudo rmmod uvcvideo

sudo modprobe uvcvideo quirks=128

This will be reset every reboot. If this works, create the following file: sudo vi /etc/modprobe.d/uvcvideo.confcontaining the line: options uvcvideo quirks=128

这将在每次重新启动时重置。如果可行,请创建以下文件:sudo vi /etc/modprobe.d/uvcvideo.conf包含以下行:options uvcvideo quirks=128

check this link http://rentheitroadsrants.blogspot.in/2011/07/multiple-webcams-on-zoneminder.html

检查此链接http://rentheitroadsrants.blogspot.in/2011/07/multiple-webcams-on-zoneminder.html

回答by madmuffin

I just ran into this issue and it turns out I had to connect my WebCam (Logitech QuickCam Zoom) to a USB 2.0 port rather than the USB 3.0 port it was plugged in in the first place.

我刚遇到这个问题,结果我不得不将我的网络摄像头(罗技 QuickCam Zoom)连接到 USB 2.0 端口,而不是它最初插入的 USB 3.0 端口。