USB webcam webserver

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

Re: USB webcam webserver

Postby grayman4hire » Tue May 07, 2013 10:20 pm

@makuab,

Since you are already running apache, you can put your motion stream behind a reverse (ssl) proxy.

Google 'apache reverse ssl proxy' for instructions.
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: USB webcam webserver

Postby makuab » Tue May 07, 2013 10:28 pm

$this->bbcode_second_pass_quote('grayman4hire', '@')makuab,

Since you are already running apache, you can put your motion stream behind a reverse (ssl) proxy.

Google 'apache reverse ssl proxy' for instructions.


I'm not running apache. That's was the default directory for captured images and videos, maybe they forgot to comment it out? Because it says the default is current working directory.
makuab
 
Posts: 60
Joined: Fri Mar 01, 2013 11:49 pm

Re: USB webcam webserver

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

I kind of got it working, maybe this will help you.
$this->bbcode_second_pass_quote('makuab', 'O')kay I think I got it working pretty well.

Credits to grayman4hire for some of it

Install
$this->bbcode_second_pass_code('', '
pacman -S motion x264 fswebcam
')
When using mkdir -p /var/run/motion the directory doesn't have proper rights and motion throws an error when you try to start it
$this->bbcode_second_pass_code('', '[0] Exit motion, cannot create process id file (pid file) /var/run/motion/motion.pid: Permission denied
')
And I couldn't get the rights to stick, every time I would reboot they would reset back to what they were.
to fix the error I edited a line in /etc/motion/motion.conf

Add a ";" before the second line in $this->bbcode_second_pass_code('', '# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid')
so it looks like $this->bbcode_second_pass_code('', '# File to store the process ID, also called pid file. (default: not defined)
;process_id_file /var/run/motion/motion.pid')
I then edited the height and width in /etc/motion/motion.conf with $this->bbcode_second_pass_code('', 'sed -i 's:width 320:width 640:' /etc/motion/motion.conf
sed -i 's:height 240:height 480:' /etc/motion/motion.conf')
and I ran $this->bbcode_second_pass_code('', 'fswebcam -r 320x240 -d /dev/video0 -v /dev/null')
I then made a directory for pictures and videos $this->bbcode_second_pass_code('', 'mkdir -p /home/cam1') and changed $this->bbcode_second_pass_code('', 'target_dir /usr/local/apache2/htdocs/cam1') in /etc/motion/motion.conf to my new directory

I didn't change the localhost in /etc/motion/motion.conf because I am accessing it through a SSH tunnel.
But if you want to access it without SSH you can use what grayman4hire shared $this->bbcode_second_pass_code('', 'sed -i 's:webcam_localhost on:webcam_localhost off:' /etc/motion/motion.conf')
and then use motion to start it and access it in your web browser with the ip and port.

you can also change the max fps that you will see in the stream by changing $this->bbcode_second_pass_code('', 'webcam_maxrate 1') in /etc/motion/motion.conf 1 being the fps you wish to see on the stream.

I think those are all of the steps I used. It stutters quite a bit when it detects motion because it saves images, so I would like to know how to solve that.
makuab
 
Posts: 60
Joined: Fri Mar 01, 2013 11:49 pm

Re: USB webcam webserver

Postby permitivity » Wed May 08, 2013 2:25 am

makuab, I'm going to have to look at the code later. But thanks for putting in the effort. I'd really like to secure my Motion stream.
permitivity
 
Posts: 141
Joined: Mon Feb 18, 2013 3:08 am

Re: USB webcam webserver

Postby makuab » Wed May 08, 2013 2:39 am

$this->bbcode_second_pass_quote('permitivity', 'm')akuab, I'm going to have to look at the code later. But thanks for putting in the effort. I'd really like to secure my Motion stream.


Sure. If you haven't forwarded the port and there's nobody on your LAN I don't think there's anything to worry about.
makuab
 
Posts: 60
Joined: Fri Mar 01, 2013 11:49 pm
Top

Previous

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 18 guests