silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Tue May 05, 2015 11:23 am

jbeale wrote:
btidey wrote:I have added those group / permission changes into the repo. Thanks.
(...) I think the idea is to get it as good as current motion as quickly as possible. It would get messy to support both modes. Currently, the motion detect branch has stopped using external motion. However, we could revisit this if it looks like we can't get the equivalent.
Thanks for the permission change update, so at least now there is a working version with 'motion' even if it doesn't get followup support after the motion-vector release. (Right now the install script seems to auto-update to latest; is there any mechanism to request installing a previous version?)

I understand it is a major pain to support two versions and I agree it's reasonable to abandon 'motion', if the replacement is functional; even better if a user could somehow choose at the 'install' step the old/unsupported/not-updated (but still working) 'motion' version.

I've currently got three systems running RPi Cam Web Interface with motion 24/7. If you'd like beta testing for motion-vector, let me know :-)

In the past I actually made my own flavor of motion with a very simple algorithm all in Python, with the picamera library. It mostly works but I decided I needed to do true "object detection" instead of per-pixel change detection to make it better, and that would be more complex. https://github.com/jbeale1/PiCam1
It would be very easy to use motion with the new version too, you could just install it and use the config-file that is used at the moment.
However, with the motion vectors there are way more possibilities, low cpu-ussage and 30fps-detection possible, so I think with a bit more development this solution will be much better.

About the progress: I changed the structure of raspimjpeg completely to support motion detection without buffering, at the moment the h264-encoder is fed by the preview-port of the camera instead of the video-port. There is also a splitter now right after the preview-port to support jpg- and h264-encoding at the same time. Additionaly, the structure is changing dynamically after certain events (e.g. capture started: reconnect h264-encoder from preview- to video-port). However, I'm still strugling with errors despite many many hours of debuging, so it might need a bit more time to publish the new version.
The current progress is in the MotionDetection-Branch on github as Robert mentioned, so if you want to test it, just clone the branch, remove the git pull command in the installer and install it over your current version.

It would be very useful if some of you could test the new version and give tfeedback here.

nthnm
Posts: 15
Joined: Wed Apr 01, 2015 9:35 pm

Re: RPi Cam Web Interface

Tue May 05, 2015 1:20 pm

With regards to testing, could you make the update command do a "git pull origin `git rev-parse --abbrev-ref HEAD`", so that we can easily switch branches to test at will? I've just had a go, but might want to switch back if I have any problems.

0lly
Posts: 77
Joined: Sun Mar 02, 2014 5:07 pm

Re: RPi Cam Web Interface

Tue May 05, 2015 1:56 pm

btidey wrote: I've reverted that bit of the change that broke this so full screen should work again. The change was needed for motion vector preview so I'll fix it on that branch.
thanks

another issue
if mp4box is off you should rename the *.mp4 to *.h264 ;)

User avatar
jbeale
Posts: 3480
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: RPi Cam Web Interface

Tue May 05, 2015 2:11 pm

silvanmelchior wrote:Additionaly, the structure is changing dynamically after certain events (e.g. capture started: reconnect h264-encoder from preview- to video-port). However, I'm still strugling with errors despite many many hours of debuging, so it might need a bit more time to publish the new version.
The current progress is in the MotionDetection-Branch on github as Robert mentioned, so if you want to test it, just clone the branch, remove the git pull command in the installer and install it over your current version.

It would be very useful if some of you could test the new version and give tfeedback here.
I will have a look at it when I get a chance; thank you! Have you asked 6by9 if he has any insights into the error you are seeing?

Jasimo
Posts: 51
Joined: Mon Apr 27, 2015 11:50 am

Re: RPi Cam Web Interface

Tue May 05, 2015 2:19 pm

Hi,
I just want to ask if it could be possible to intergrate a Fisheye to Rectilinear conversation in the Image/video processing to get rid of the Image distortion.
If someone plan to build a suveillance cam based on the RPi Cam Webinterface and want to use a Fisheye to Monitor a large area, this would be a great implementation.

Found something about that here:
http://www.kscottz.com/2013/08/

rgs
Jan

User avatar
jbeale
Posts: 3480
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: RPi Cam Web Interface

Tue May 05, 2015 3:21 pm

@silvanmelchior: I'm not a github expert but just in case I could help out with something in the code, do you have the source code for your motion-vector raspimjpeg online? The last commit on the main branch source code RaspiMJPEG.c is 3 months ago: https://github.com/silvanmelchior/userl ... spiMJPEG.c

but the binary file 'raspimjpeg' at https://github.com/silvanmelchior/RPi_C ... ection/bin dates from yesterday.
Last edited by jbeale on Tue May 05, 2015 3:28 pm, edited 1 time in total.

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Tue May 05, 2015 3:26 pm

jbeale wrote:@silvanmelchior: I'm not a github expert but just in case I could help out with something in the code, do you have the source code for your motion-vector raspimjpeg online? The last commit on this one is 3 months ago: https://github.com/silvanmelchior/userl ... spiMJPEG.c

but the binary file 'raspimjpeg' at https://github.com/silvanmelchior/RPi_C ... ection/bin dates from yesterday.
The userland for RaspiMJPEG is on Robert's account, my userland won't be updated anymore.

To clone the branch, just run git clone -b MotionDetection xxx

User avatar
jbeale
Posts: 3480
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: RPi Cam Web Interface

Tue May 05, 2015 3:38 pm

Ah, so the source for the motion-detection stuff is at https://github.com/roberttidey/userland ... s/raspicam
...got it, will have a look.

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Tue May 05, 2015 4:00 pm

jbeale wrote:Ah, so the source for the motion-detection stuff is at https://github.com/roberttidey/userland ... s/raspicam
...got it, will have a look.
Just to be clear the silvanmelchior RPI Cam Web git with web, installers binaries etc. has the normal master branch and a motiondetect branch. The latter has the motiondetect binary raspimjpeg under development plus the web changes to accomodate it.

Similarly the userland git under roberttidey has both the master git that builds the binary for the master installer and a Motiondetect branch that builds the binary for that one.

So to just install, play with motiondetect use the RPi Cam motiondetect branch. To look at / contribute to the motiondetect source use the robertidey userland motiondetect branch.

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Tue May 05, 2015 5:08 pm

0lly wrote:
btidey wrote: I've reverted that bit of the change that broke this so full screen should work again. The change was needed for motion vector preview so I'll fix it on that branch.
thanks

another issue
if mp4box is off you should rename the *.mp4 to *.h264 ;)
Should be fixed now. You can click on a thumbnail. It obviously won't play but you can download and delete.

southafricanrob
Posts: 31
Joined: Wed Sep 18, 2013 12:54 pm

Re: RPi Cam Web Interface

Wed May 06, 2015 8:48 pm

Hi,
Struggling to understand the scheduler completely. I would just like to stop the camera after work hours finish and restart in the morning. Not just motion but the actual stream as well - is this possible in scheduler?
Thanks

albaker
Posts: 4
Joined: Wed May 06, 2015 11:10 pm

Re: RPi Cam Web Interface

Wed May 06, 2015 11:17 pm

Hi

I am trying to record to NAS. I successfully mount drive by editing

Code: Select all

sudo nano /etc/fstab
to

//myNAS/myShare /home/pi/myNAS/myShare cifs username=your_username,password=your_password,workgroup=your_workgroup,users,auto,user_xattr 0 0


now when i try to record i get this message

mmal: mmal_vc_port_info_set: failed to set port in (2:0): EINVAL
mmal: mmal_vc_port_set_format : mma_vc_port_info_set failed 0x1508d50 (EINVAL)
mmal: mmal_connection_create: format not set on input port


any help would be appreciated

User avatar
jbeale
Posts: 3480
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

watchdog restarted raspimjpeg, but scheduler not rerun

Thu May 07, 2015 1:23 am

The watchdog went off at 2015/05/06 10:53:23, log below in case of interest. It restarted raspimjpeg, but it apparently did not re-run the then-current scheduler commands to enable motion, so motion detection was left off when it should have been turned on.

Code: Select all

[2015/05/06 10:44:21] Start capture requested
[2015/05/06 10:44:21] Send ca 1
{2015/05/06 10:44:22} Capturing started
[2015/05/06 10:44:31] Stop capture requested
[2015/05/06 10:44:31] Send ca 0
{2015/05/06 10:44:31} Capturing stopped
{2015/05/06 10:44:31} Add /var/www/media/vi_2320_20150506_104422.mp4 to Box Queue at pos 24
[2015/05/06 10:47:27] Scheduled management tasks. Next at 1430934687
[2015/05/06 10:51:29] Scheduled management tasks. Next at 1430934928
[2015/05/06 10:51:29] Purged 6 Files
[2015/05/06 10:52:11] Stop capture request ignored, already stopped
[2015/05/06 10:52:11] Start capture requested
[2015/05/06 10:52:11] Send ca 1
{2015/05/06 10:52:11} Capturing started
{2015/05/06 10:53:23} Watchdog detected problem. Stopping{2015/05/06 10:53:23} SIGINT/SIGTERM received, stopping
[2015/05/06 10:53:31] Stop capture requested
[2015/05/06 10:53:31] Send ca 0
{2015/05/06 10:53:35} RaspiMJPEG Version 5.1.3
{2015/05/06 10:53:36} MJPEG streaming, ready to receive commands
[2015/05/06 10:55:29] Scheduled management tasks. Next at 1430935169
[2015/05/06 10:55:29] Purged 29 Files
[2015/05/06 10:59:30] Scheduled management tasks. Next at 1430935410
[2015/05/06 10:59:30] Purged 31 Files
[2015/05/06 11:03:31] Scheduled management tasks. Next at 1430935651
[2015/05/06 11:07:32] Scheduled management tasks. Next at 1430935892
[2015/05/06 11:11:33] Scheduled management tasks. Next at 1430936133

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: watchdog restarted raspimjpeg, but scheduler not rerun

Thu May 07, 2015 9:23 am

jbeale wrote:The watchdog went off at 2015/05/06 10:53:23, log below in case of interest. It restarted raspimjpeg, but it apparently did not re-run the then-current scheduler commands to enable motion, so motion detection was left off when it should have been turned on.
That is true at the moment. The scheduler is blissfully unaware that the watchdog kicked in.

It would be possible for the watchdog to signal the scheduler when this has happened in a similar fashion to what happens when settings are changed. I'll look into that.

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Thu May 07, 2015 9:30 am

southafricanrob wrote:Hi,
Struggling to understand the scheduler completely. I would just like to stop the camera after work hours finish and restart in the morning. Not just motion but the actual stream as well - is this possible in scheduler?
Thanks
If you are using fixed times in scheduler then you should be able to use md 0;ru 0 as period start commands at your end work time and md 1;ru 1 at your start time. If not using motion then leave out the md bits.

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RPi Cam Web Interface

Fri May 08, 2015 9:59 am

Hello,
after some time not using this very good tool (used it early 2014 on my old Raspberry Pi B (not+)), I've tried to install all programs and scipts on a new Pi 2, like described at http://elinux.org/RPi-Cam-Web-Interface.
I slightly modifed the shell script (RPi_Cam_Web_Interface_Installer.sh), because lighttpd was already installed.

When I'm starting the Interface by "./RPi_Cam_Web_Interface_Installer.sh start", I get the message "This account is currently not available." Looking into the script file there is the attempt to start commands as user www-data
("sleep 1;sudo su -c 'raspimjpeg > /dev/null &' www-data"). www-data seems not to be allowed to execute something?

What am I doing wrong, do I've overlooked something?
Many thanks for your help!

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Fri May 08, 2015 11:38 am

thsBavR10 wrote:Hello,
after some time not using this very good tool (used it early 2014 on my old Raspberry Pi B (not+)), I've tried to install all programs and scipts on a new Pi 2, like described at http://elinux.org/RPi-Cam-Web-Interface.
I slightly modifed the shell script (RPi_Cam_Web_Interface_Installer.sh), because lighttpd was already installed.

When I'm starting the Interface by "./RPi_Cam_Web_Interface_Installer.sh start", I get the message "This account is currently not available." Looking into the script file there is the attempt to start commands as user www-data
("sleep 1;sudo su -c 'raspimjpeg > /dev/null &' www-data"). www-data seems not to be allowed to execute something?

What am I doing wrong, do I've overlooked something?
Many thanks for your help!
If you had other stuff installed before it is possible that www-data does not have a shell configured

check /etc/passwd, the entry for www-data should end in :/var/www:/bin/sh

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RPi Cam Web Interface

Fri May 08, 2015 12:02 pm

btidey wrote: .. If you had other stuff installed before it is possible that www-data does not have a shell configured
check /etc/passwd, the entry for www-data should end in :/var/www:/bin/sh
You're right, here it ends ":/usr/sbin/nologin".
Do you also have a hint, how I can change this? Just edit /etc/passwd ?
But isn't this a security issue?
Many thanks in advance!

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Fri May 08, 2015 2:08 pm

thsBavR10 wrote:
btidey wrote: .. If you had other stuff installed before it is possible that www-data does not have a shell configured
check /etc/passwd, the entry for www-data should end in :/var/www:/bin/sh
You're right, here it ends ":/usr/sbin/nologin".
Do you also have a hint, how I can change this? Just edit /etc/passwd ?
But isn't this a security issue?
Many thanks in advance!
you can just edit /etc/passwd under sudo or you can use the change shell command

sudo chsh -s /bin/sh www-data

everything is a security issue but www-data has fairly restricted access rights anyway. If you are using external ports to get access then you want to add username passowrd control as per wiki

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RPi Cam Web Interface

Fri May 08, 2015 2:41 pm

Many thanks,
now it's working as suspected, and I've learned a new command.

ciro66
Posts: 15
Joined: Wed Dec 24, 2014 1:36 pm

Re: RPi Cam Web Interface

Sat May 09, 2015 8:29 am

hallo, can you help me to set the background color of rpicamwebinterface?
It is black and it's no good for me.
Thank you for great work

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Sat May 09, 2015 8:59 am

ciro66 wrote:hallo, can you help me to set the background color of rpicamwebinterface?
It is black and it's no good for me.
Thank you for great work
Under the system menu on the menu page there is a style selector which allows adding in different styling. Two styles are included, default which is a white background, and night which is a dark background (intended for use with telescope).

It should have defaulted to the white background, but check by selecting default style and press OK.

ciro66
Posts: 15
Joined: Wed Dec 24, 2014 1:36 pm

Re: RPi Cam Web Interface

Sat May 09, 2015 9:23 am

many thanks btidey

toebee
Posts: 1
Joined: Sat May 09, 2015 3:05 pm

Re: RPi Cam Web Interface

Sat May 09, 2015 3:12 pm

hi folks,

I have a very simple question: Why are changes that I make to any of the settings not adopted by the system? For instance I try to change the motion threshold from 1500 to 1000 and no matter if I use Firefox or IE or android, as I click to "save settings" the new values are gone... Thanks for your help in advance.

btidey
Posts: 1616
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Sat May 09, 2015 7:55 pm

toebee wrote:hi folks,

I have a very simple question: Why are changes that I make to any of the settings not adopted by the system? For instance I try to change the motion threshold from 1500 to 1000 and no matter if I use Firefox or IE or android, as I click to "save settings" the new values are gone... Thanks for your help in advance.
'There was an issue with a recent version where we had changed raspimjpeg to run as www-data rather than root and motion lost its abilities to save its setiings as /etc/motion.conf where they are saved was then denying access.

The latest installer has this fixed. You can also just manually change the ownership and permissions of motion.conf as described in a recent post (within the last couple of pages).

Return to “Camera board”