Using webcam connected to RaspberryPi

Xeoma Software

Moderators: Admin_N, Administrator, Admin_P, Admin_K

Using webcam connected to RaspberryPi

Postby wurlyfan » Sun Dec 11, 2016 3:45 am

Hello

I've been successfully using Xeoma running on my Ubuntu desktop with a Logitech C170 webcam connected via USB. The USB line to the camera is quite long and consequently the connection has always been a bit marginal. Recently its become worse, with the view constantly flicking between the correct image and "Not connected". I've found, however, that I can connect the camera to a RaspberryPi Model B (running motion) and stream the video successfully and reliably to a viewer like VLC on the desktop.

I'd like to get Xeoma to look at the streamed video from the RaspberryPi, but the universal camera module can't see it (it says invalid video stream). Can anyone suggest how that architecture might work? I doubt that the RPi is powerful enough to run Xeoma server reliably, and in any case I'd rather keep the server on my desktop.

Any help would be appreciated.

Thanks,
Graham
wurlyfan
 
Posts: 4
Joined: Sun Dec 11, 2016 3:26 am

Re: Using webcam connected to RaspberryPi

Postby mauricioesilva » Sun Dec 11, 2016 10:16 am

What software are you using to stream video from the Pi?.

You can try MJPG_Streamer, take a look at: https://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi
Motion JPEG is not the best way to do it, but if your LAN bandwidth is not an issue, the MJPG_Streamer is easy to set up and very flexible.
mauricioesilva
 
Posts: 17
Joined: Sun Jun 15, 2014 2:15 am
Location: Argentina

Re: Using webcam connected to RaspberryPi

Postby wurlyfan » Sun Dec 11, 2016 11:26 am

Thanks, mauricioesilva. Currently I'm using motion on the Pi and VLC on the desktop to view the stream. The frame rate is pretty low, however, and I don't need the motion detection built into the motion package. I've looked at mjpg_streamer but ran into trouble getting it running. I'll look at the tutorial you suggest. FYI, I'm also looking at avconv and nginx with RMTP, but I'm not a developer and lack some problem-solving skills!
wurlyfan
 
Posts: 4
Joined: Sun Dec 11, 2016 3:26 am

Re: Using webcam connected to RaspberryPi

Postby wurlyfan » Sun Dec 11, 2016 10:06 pm

mauricioesilva Wrote:What software are you using to stream video from the Pi?.

You can try MJPG_Streamer, take a look at: https://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi
Motion JPEG is not the best way to do it, but if your LAN bandwidth is not an issue, the MJPG_Streamer is easy to set up and very flexible.


I know why this didn't work for me: it uses raspistill, which seems to only work with the RPi camera module, and I'm using a Logitech webcam. Any other suggestions?
wurlyfan
 
Posts: 4
Joined: Sun Dec 11, 2016 3:26 am

Re: Using webcam connected to RaspberryPi

Postby mauricioesilva » Sun Dec 11, 2016 11:47 pm

The MJPG_Streamer support a lot of Logitech cameras. I never use a webcam on the Raspberry Pi, but I used a QuickCam Pro something (one that use the UVC driver) on a PC. I used the version 0.3, and have to disable the module "input_gspcav1" to be able to compile it (remove it from the Makefile, find the line that start with "plugins:").

The you can run it like:
# ./mjpg_streamer -i "input_uvc.so -r 960x720 -f 10 -l off" -o "output_http.so -n -p 88 -w ./www -c user:password"

In that example it will open the first webcam, at a resolution of 960x720, 10 frames per seconds, disable the led of the camera and will listend for HTTP connection at any interface port 88, will prompt for username and password. The first time connect there with a browser and it will show a lot of ways to access the camera.
mauricioesilva
 
Posts: 17
Joined: Sun Jun 15, 2014 2:15 am
Location: Argentina

Re: Using webcam connected to RaspberryPi

Postby wurlyfan » Mon Dec 12, 2016 5:37 am

For anyone else who may be interested, I did get mjpg-streamer working on my Raspberry Pi Model B, with Xeoma on a connected desktop, with the help of the post http://www.slblabs.com/2012/09/26/rpi-webcam-stream/. So far the performance looks good and the network overhead isn't proving to be a problem. Interestingly, the problem that started this off (frequent disconnection of the USB webcam connected directly to my Ubuntu 16.04 desktop running Xeoma) doesn't happen now that the webcam is connected to the RPi via the same powered USB hub and long cable as before.
wurlyfan
 
Posts: 4
Joined: Sun Dec 11, 2016 3:26 am

Re: Using webcam connected to RaspberryPi

Postby Admin_N » Mon Dec 12, 2016 10:13 am

Thanks for sharing this information, wurlyfan! Please keep us updated as you continue using it.

Has anyone else tried it, folks? Does it work for you too?
Admin_N
 
Posts: 797
Joined: Thu Mar 01, 2012 4:43 pm


Return to Xeoma - General discussion

Who is online

Users browsing this forum: No registered users and 1 guest