raspberry pi motion webcam “premature end of data” [closed]

梦想与她 提交于 2020-01-13 03:53:08

问题


I am trying to get my webcam running on the raspberry pi. I am using a logictech quickcam for notebooks. Via lsusb I see that the device is connected. When i am starting motion I am getting this error "corrupt JPEG data: premature end of data segment". I tried fswebcam as well but I just get black pictures out of it. any advice? (should i use another programme/doesn´t work with raspberry?)

thanks in advance


回答1:


I also had problems with my oldish Logitech QuickCam Express, but a different one. First make sure you have at least one scenario where your webcam does work. You've asked about other programs. Try e.g.

mplayer tv://

or

cheese

or

guvcview

from your X desktop. I got errors which indicated video4linux v2 did not support my cam, only v1, for which I had to add

LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libv4l/v4l1compat.so

before launching the commands that failed. (I found it at http://ubuntuforums.org/showthread.php?t=1476423.) However, again, I did not get the same error as you (mine was tumbling over palette formats). But different webcams may trigger different symptoms, even if the root of the problem is the same or similar.




回答2:


I had that with my cheap webcam. The error went away when I selected a different image size to be captured.




回答3:


I am not sure if you still need help on this. I found that: A) Using the verified peripherals list for Pi was the first key: I had a crappy no-name webcam and it just wouldn't work. I ended up using a microsoft HD3000.

B) A powered USB hub was necessary and cleared up a lot of issues.

In the default motion.conf file you will note that the default resolution is something like 352x288. It does run at 640 but puts a big load on the little pi. In the end I turned the resolution back down to default until I had every other piece working and then turned it back up when I was ready to sit back and capture video.




回答4:


If you haven't done so already I suggest browsing the Raspberry Pi forum. Many others have struggled with this before. Start with the smallest possible resolution and experiment with different palettes. It may also be that you are running in USB related issues (see the USB redux thread in the linked forum for further discussions). Make sure to have the latest firmware.



来源:https://stackoverflow.com/questions/14664138/raspberry-pi-motion-webcam-premature-end-of-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!