User avatar
Burngate
Posts: 6313
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Simple USB camera help

Thu Oct 04, 2012 5:04 pm

Background:
Kitchen sink overflowed third time this week. Bought a USB endoscope from Amazon to peer down the drainpipe which Just Works on windows XP
Would have used the laptop, but that died in a big way yesterday.
Would have used the desktop, but can't get that installed in kitchen
So I want to use the Pi.

Having connected endoscope to Pi, this is what Pi said as it booted:

Code: Select all

5.687366] usb 1-1.3.1.1: New USB device strings: Mfr=3, Product=1, serialNumber=2
5.723134]                Product: USB Camera
5.751971]                Manufacturer: Generic
5.778442]                SerialNumber200901010001
7.628403] Linux video capture interface:v2.00
7.668564] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
7.703107] input: USB Camera as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1.1/1-1.3.1.1:1.0/input/input3
7.726291] usbcore: registered new interface driver uvcvideo
7.741092] USB Video Class driver (1.1.1)
So now, how do I get to just see the picture from it?
Which application do I need?

On the desktop, I tried to find /devices/platform/bcm2708_usb/.... but failed at the first hurdle!

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Simple USB camera help

Thu Oct 04, 2012 9:45 pm

Sounds like a standard UVC webcam, it should work with something like motion (widely used security software on linux) via device /dev/video0
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
Burngate
Posts: 6313
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Simple USB camera help

Fri Oct 05, 2012 2:32 pm

Thanks for that - going in that direction.

OK that failed !
Maxed out the cpu, put lots of jpgs on the SD card, no live picture!

Now I've tried luvcview, with more success - at least I can sort of see a live-ish picture. 640x480 @ 30Hz fails, but 320x240 @ 15Hz works

It slightly bemuses me that I can't find anything in the wiki - I'd have thought lots of noobs like me would want to use a camera of some sort, yet it's not mentioned!
Unless it's there and I've just not found it

If I achieve something usefull, I'll post a pic of the inside of the waste-pipe

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Simple USB camera help

Sat Oct 06, 2012 9:32 am

You need to make (a lot of) allowances for the ropey USB implementation and the lacklustre processor. My UVC camera doesn't work at 640*480 either. The SOC is 95% GPU and 5% CPU. but theres currently very little that uses the GPU. The USB loses packets which doesn't exactly work wonders for webcams. Some work a lot better than others.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
Burngate
Posts: 6313
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Simple USB camera help

Sat Oct 06, 2012 5:49 pm

Thanks again.

I'm aware of the USB problems, just hadn't realised they'd impact this - which highlights my general lack of knowledge.
I've seen (though not first-hand) that GPU acceleration seems to work for video playback, so just blindly assumed the reverse would work. Though thinking more about it, I think I assumed that the USB goes through the GPU before it gets to the Arm and Linux, so it would be easy to direct it straight to the HDMI bit without going through the Arm.

Obviously I don't know enough, and need to learn, and that's what Pi's all about.
Also don't know enough about plumbing, but have no desire to learn

User avatar
ab1jx
Posts: 885
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Simple USB camera help

Wed Dec 27, 2017 6:37 pm

Interesting, I used one a few years ago to recover something I dropped inside a wall. Not a Pi though, an OpenBSD i386 laptop.

Return to “Beginners”