USB webcam webserver

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

USB webcam webserver

Postby permitivity » Mon Feb 18, 2013 3:44 am

Hi,
I'm looking for a way to run a Logitech C310 USB webcam on a Pogoplug v2. I'd like to serve a page and update the webcam image on that page every 5 seconds or so.

The Logitech C310 is UVC compatible. I'm not sure what that means, but it seems important.

Is there a guide somewhere to help with this? I did search the forum, but only came up with others asking the same type of question. I'm a complete newbie, and just managed to install Arch Linux on a pogoplug. Still learning.
permitivity
 
Posts: 141
Joined: Mon Feb 18, 2013 3:08 am

Re: USB webcam webserver

Postby moonman » Mon Feb 18, 2013 5:08 am

There are many ways

You can use "motion" which already has web ui.

You can run a webserver with some kind of javascript to update every 5 sec. and rewrite the jpg file with ffmpeg.
http://askubuntu.com/questions/102755/h ... web-camera

I am sure there are better ways. Google around.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: USB webcam webserver

Postby permitivity » Mon Feb 18, 2013 3:33 pm

Thanks for the advice. I'll give Motion and ffmpeg a try.

I tried mjpg streamer, but I couldn't figure out how to get it to work. I installed it and ran the command, and I can see the LED on the webcam turn on. But, when I view index.html in the folder where I expected the webcam image, there wasn't any image. I did use the sample index.html file that came with the mjpg streamer tar file.

Does Motion include a http server then? I'm really new to this, so I'm not sure. There needs to be some service executing that listens to what ever port the http request is going to come from, correct?
permitivity
 
Posts: 141
Joined: Mon Feb 18, 2013 3:08 am

Re: USB webcam webserver

Postby Socaltom » Mon Feb 18, 2013 6:02 pm

Motion has a web interface at port serverip:8080 so you can adjust the settings. It will also stream the video to the port you choose for example serverip:8081.

What I did was create a simple webpage in MSword and I put picture in the middle of the screen, then I replaced the picture with a reference to the port that has the videostream. You can just forward people to the port that motion streams, but it sticks the video in the upper left corner.
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: USB webcam webserver

Postby permitivity » Tue May 07, 2013 4:58 pm

$this->bbcode_second_pass_quote('Socaltom', 'M')otion has a web interface at port serverip:8080 so you can adjust the settings. It will also stream the video to the port you choose for example serverip:8081.

What I did was create a simple webpage in MSword and I put picture in the middle of the screen, then I replaced the picture with a reference to the port that has the videostream. You can just forward people to the port that motion streams, but it sticks the video in the upper left corner.
Tom


Umm...do you have any kind of username/password on this page to prevent random unknown people from accessing the camera stream?

I did get Motion working, but the only security on it right now is the port number. If no one knows the port number, then the stream is safe. But if they know the port number, that's the end of that.
permitivity
 
Posts: 141
Joined: Mon Feb 18, 2013 3:08 am

Re: USB webcam webserver

Postby makuab » Tue May 07, 2013 5:40 pm

$this->bbcode_second_pass_quote('permitivity', '')$this->bbcode_second_pass_quote('Socaltom', 'M')otion has a web interface at port serverip:8080 so you can adjust the settings. It will also stream the video to the port you choose for example serverip:8081.

What I did was create a simple webpage in MSword and I put picture in the middle of the screen, then I replaced the picture with a reference to the port that has the videostream. You can just forward people to the port that motion streams, but it sticks the video in the upper left corner.
Tom


Umm...do you have any kind of username/password on this page to prevent random unknown people from accessing the camera stream?

I did get Motion working, but the only security on it right now is the port number. If no one knows the port number, then the stream is safe. But if they know the port number, that's the end of that.


If the webserver doesn't have the port forwarded, I don't think anybody besides people on LAN can access it.
makuab
 
Posts: 60
Joined: Fri Mar 01, 2013 11:49 pm
Top

Re: USB webcam webserver

Postby makuab » Tue May 07, 2013 6:01 pm

I'm trying to do the same thing, with the same webcam. Let me know what you find.

viewtopic.php?f=18&t=5476
makuab
 
Posts: 60
Joined: Fri Mar 01, 2013 11:49 pm

Re: USB webcam webserver

Postby grayman4hire » Tue May 07, 2013 6:32 pm

Motion should be able to do it.

Also take a look at https://github.com/7AC/pypymotion for email.
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: USB webcam webserver

Postby makuab » Tue May 07, 2013 9:45 pm

$this->bbcode_second_pass_quote('grayman4hire', 'M')otion should be able to do it.

Also take a look at https://github.com/7AC/pypymotion for email.



I get an error, I tried chmod a+rwx on it but it doesn't stick on reboot.

$this->bbcode_second_pass_code('', '[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "sql_log_image"
[0] Unknown config option "sql_log_snapshot"
[0] Unknown config option "sql_log_mpeg"
[0] Unknown config option "sql_log_timelapse"
[0] Unknown config option "sql_query"
[0] Motion 3.2.12 Started
[0] Motion going to daemon mode
[0] Exit motion, cannot create process id file (pid file) /var/run/motion/motion.pid: Permission denied
')

Also with chmod it crashes when any motion occurs because it can't save the file

$this->bbcode_second_pass_code('', '

Problem creating directory /usr/local/apache2: Permission denied
[1] ffopen_open error creating (new) file [/usr/local/apache2/htdocs/cam1/01-20130507144735.avi]: Permission denied
[1] Motion detected - starting event 1
[1] Problem creating directory /usr/local/apache2: Permission denied
[1] Can't write picture to file /usr/local/apache2/htdocs/cam1/01-20130507144735-00.jpg - check access rights to target directory: Permission denied
[1] Thread is going to finish due to this fatal error: Permission denied
')
makuab
 
Posts: 60
Joined: Fri Mar 01, 2013 11:49 pm
Top

Re: USB webcam webserver

Postby Socaltom » Tue May 07, 2013 10:03 pm

$this->bbcode_second_pass_quote('makuab', '')$this->bbcode_second_pass_quote('permitivity', '')$this->bbcode_second_pass_quote('Socaltom', 'M')otion has a web interface at port serverip:8080 so you can adjust the settings. It will also stream the video to the port you choose for example serverip:8081.

What I did was create a simple webpage in MSword and I put picture in the middle of the screen, then I replaced the picture with a reference to the port that has the videostream. You can just forward people to the port that motion streams, but it sticks the video in the upper left corner.
Tom


Umm...do you have any kind of username/password on this page to prevent random unknown people from accessing the camera stream?

I did get Motion working, but the only security on it right now is the port number. If no one knows the port number, then the stream is safe. But if they know the port number, that's the end of that.


If the webserver doesn't have the port forwarded, I don't think anybody besides people on LAN can access it.


You can password protect the motion config page, but you are correct, the stream itself could be viewed if the port is known, and forwarded through your firewall. I'm mainly working with IP cameras now. They have password protection that could be implemented if desired.
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side
Top

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 4 guests