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

Re: RPi Cam Web Interface

Sat May 09, 2015 7:58 pm

To try out the experimental motion-detection branch I did:

Code: Select all

cd; rm -rf RPi_Cam_Web_Interface/
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface/
git checkout remotes/origin/MotionDetection
./RPi_Cam_Web_Interface_Installer.sh install
sudo reboot
and I observe that it mostly works (very nice low CPU load, without 'motion' running) but as you said, there are a number of issues reported in the log, a lot of Error: Error in iframe list (which I have seen before with the other code) and also frequently Error: Error in header bytes immediately after Capturing stopped which I have not seen before.

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

Re: RPi Cam Web Interface

Sun May 10, 2015 8:34 am

jbeale wrote:To try out the experimental motion-detection branch I did:

Code: Select all

cd; rm -rf RPi_Cam_Web_Interface/
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface/
git checkout remotes/origin/MotionDetection
./RPi_Cam_Web_Interface_Installer.sh install
sudo reboot
and I observe that it mostly works (very nice low CPU load, without 'motion' running) but as you said, there are a number of issues reported in the log, a lot of Error: Error in iframe list (which I have seen before with the other code) and also frequently Error: Error in header bytes immediately after Capturing stopped which I have not seen before.
Thanks for trying it out. I think silvan is checking out the iframe and eader errors as he can reproduce them now.

The vector motion algorithm still needs work to make it fully usable. I think the simple threshold, count and frame count method suffers quite a bit from the full frame rate processing as it means you can get quite a lot of 'still frames' even when there is motion going on. I am playing around with some methods which more smoothly integrate the vectors over frames to make that more reliable.

chum
Posts: 9
Joined: Wed Jan 28, 2015 8:56 pm

Re: RPi Cam Web Interface

Sun May 10, 2015 2:50 pm

I just upgraded to the latest 5.1.6 by running "install" again. I also did "update". I rebooted and when I access the web console, it seems to be stuck with "loading". Motion detection start button is unresposive as well. Any idea whats going on?

I'd hate to start over and am trying to have clear instructions for upgrade process as this branch is actively worked on. Thanks,

Hellcube
Posts: 10
Joined: Tue Apr 07, 2015 11:51 am

Re: RPi Cam Web Interface

Sun May 10, 2015 7:25 pm

./RPi_Cam_Web_Interface_Installer.sh: 141: ./RPi_Cam_Web_Interface_Installer.sh: Syntax error: redirection unexpected

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

Re: RPi Cam Web Interface

Mon May 11, 2015 3:31 am

Hellcube wrote:./RPi_Cam_Web_Interface_Installer.sh: 141: ./RPi_Cam_Web_Interface_Installer.sh: Syntax error: redirection unexpected
Did you follow the instructions at http://elinux.org/RPi-Cam-Web-Interface exactly? Which parameter did you pass to the script? I don't know that happened there, but I've installed six or seven RPi_Cam_Web systems ("install" parameter), including one yesterday and one today, and never seen that error. It should not happen on a clean install.

matthiaz
Posts: 2
Joined: Mon May 11, 2015 7:34 am

Re: RPi Cam Web Interface

Mon May 11, 2015 7:38 am

I have an issue with the current v5.1.6 release: I updated from v4.4.2R and now if i record a video or image, it creates a file of size 0kb. Everything is working besides that a it should (i.e. directly accessing the cam.jpg does work).

Is this an error which occured previously? Any help is highly appreciated.

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

Re: RPi Cam Web Interface

Mon May 11, 2015 12:00 pm

matthiaz wrote:I have an issue with the current v5.1.6 release: I updated from v4.4.2R and now if i record a video or image, it creates a file of size 0kb. Everything is working besides that a it should (i.e. directly accessing the cam.jpg does work).

Is this an error which occured previously? Any help is highly appreciated.
Image and video capture are working Ok in normal set ups.

One difference is that a recent change makes raspimjpeg (and motion) run under user www-data rather than the previous root. This is fine providing media storage locations are writeable by this user which the standard locations are.

Check in schedule log for error reports when saving files.

Hellcube
Posts: 10
Joined: Tue Apr 07, 2015 11:51 am

Re: RPi Cam Web Interface

Mon May 11, 2015 12:09 pm

I have tried experimental motion-detection branch. Made a clean install of standard version and every thing is working now.

matthiaz
Posts: 2
Joined: Mon May 11, 2015 7:34 am

Re: RPi Cam Web Interface

Mon May 11, 2015 12:41 pm

One difference is that a recent change makes raspimjpeg (and motion) run under user www-data rather than the previous root.
Thank you, that pointed me to the issue: I use fstab to mount a smb share, and with adding uid and gid it is working again. Thank you! :!:

lassiko
Posts: 10
Joined: Tue May 12, 2015 7:04 pm

Re: RPi Cam Web Interface

Tue May 12, 2015 7:08 pm

Hi,

I saw that his has been discussed earlier but did not find the solution/explanation to it.

Code: Select all

{2015/05/12 21:54:18} Motion detection started
{2015/05/12 21:55:26} Motion detection stopped
[2015/05/12 21:55:26] Stop capture request ignored, already stopped
I am getting that error all the time. Also, motion is running but not working. Was there some solution for this already?

Thank you!

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

Re: RPi Cam Web Interface

Wed May 13, 2015 8:01 am

lassiko wrote:Hi,

I saw that his has been discussed earlier but did not find the solution/explanation to it.

Code: Select all

{2015/05/12 21:54:18} Motion detection started
{2015/05/12 21:55:26} Motion detection stopped
[2015/05/12 21:55:26] Stop capture request ignored, already stopped
I am getting that error all the time. Also, motion is running but not working. Was there some solution for this already?

Thank you!
The capture request ignored is more information rather than an error. What it means is that the scheduler has received a command to start or stop a capture but it is unnecessary to pass that command onto raspimjpeg for some reason. For example, this can be because the scheduler has previously sent a stop (due to max video capture time). It can also be because the scheduler has got a stop request without having had a matching start request. This looks like what has happened here and may tie in with difficulties you are having with motion.

Motion does normally work so its likely to be something wrong with the config.

I have added some material on trouble shooting motion detection to the wiki at http://elinux.org/RPi-Cam-Web-Interface

chum
Posts: 9
Joined: Wed Jan 28, 2015 8:56 pm

Re: RPi Cam Web Interface

Wed May 13, 2015 5:37 pm

REPOST:
chum wrote:I just upgraded to the latest 5.1.6 by running "install" again. I also did "update". I rebooted and when I access the web console, it seems to be stuck with "loading". Motion detection start button is unresposive as well. Any idea whats going on?

I'd hate to start over and am trying to have clear instructions for upgrade process as this branch is actively worked on. Thanks,
Again, I think it is better to know the exact steps that are required to upgrade. I thought I did as suggested in the documentation and some posts that I read, but still, I ran into issues. Your help is appreciated!

chum
Posts: 9
Joined: Wed Jan 28, 2015 8:56 pm

Re: RPi Cam Web Interface

Wed May 13, 2015 5:43 pm

I think it might be desirable to:
1. have a 'Next' & 'Prev' button on the preview. I think this will help the usability immensely when you want to simply preview the last few recorded videos but you still have videos for a few days in the folder.
2. add playtime to the preview thumbnail.
I understand that some might be easy and some maybe more work but I wanted to throw out the idea for prioritization.
Cheers!

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

Re: RPi Cam Web Interface

Wed May 13, 2015 6:27 pm

chum wrote:REPOST:
chum wrote:I just upgraded to the latest 5.1.6 by running "install" again. I also did "update". I rebooted and when I access the web console, it seems to be stuck with "loading". Motion detection start button is unresposive as well. Any idea whats going on?

I'd hate to start over and am trying to have clear instructions for upgrade process as this branch is actively worked on. Thanks,
Again, I think it is better to know the exact steps that are required to upgrade. I thought I did as suggested in the documentation and some posts that I read, but still, I ran into issues. Your help is appreciated!
Running the script with install to upgrade effectively updates everything including the config files. It is the safest way to ensure that everything is fully updated including any new parametrs that are in the config files. It will, however, wipe out any changes you may have made in these configs so you may want to keep a separate copy. The two main files to worry about are /etc/raspimjpeg which may have your own setings fo rstorage paths etc, and th emotion set up as kept in /etc/motion/motion.conf

Running the script with update just refreshes the web pages and the raspimjpeg executable and doesn't touch any configs. The risk here is that if any new config variables have been introduced then they wouldn't get put in and might cause problems.

It should be harmless to try update and if any problems are noticed then use install.

If you have problems after an upgrade then look in he logs and try to post details of what is not working.

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

new failure mode: "error in iframe" blocks recording

Wed May 13, 2015 6:32 pm

I am running with a 3000 msec buffer, to capture the full motion event. In the past I have occasionally seen about 10 or 20 consecutive lines in the log saying "Error: error in iframe" but the system seemed to work normally despite that. Yesterday however, the system stopped recording motion events and from the time it stopped, the log had thousands of consecutive lines with "error in iframe" all with the same timestamp. So this can be a significant error. I don't know what specifically is going on but it blocked further motion event recording, even though the live preview on the web page was still updating normally.

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

Re: RPi Cam Web Interface

Wed May 13, 2015 6:37 pm

chum wrote:I think it might be desirable to:
1. have a 'Next' & 'Prev' button on the preview. I think this will help the usability immensely when you want to simply preview the last few recorded videos but you still have videos for a few days in the folder.
2. add playtime to the preview thumbnail.
I understand that some might be easy and some maybe more work but I wanted to throw out the idea for prioritization.
Cheers!
Prev and Next might be possible. I assume it would stay in category. I.e if there was a mix of images and videos then next when viewing a video would find the next video.

Playtime on the thumbnail imay be possible by checking filetime of the thumbnail which is captured at the start with filetime of the video which should show end. I definitely don't want to start digging into each file to get video parameters as that would slow things a lot.

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

Re: new failure mode: "error in iframe" blocks recording

Wed May 13, 2015 6:44 pm

jbeale wrote:I am running with a 3000 msec buffer, to capture the full motion event. In the past I have occasionally seen about 10 or 20 consecutive lines in the log saying "Error: error in iframe" but the system seemed to work normally despite that. Yesterday however, the system stopped recording motion events and from the time it stopped, the log had thousands of consecutive lines with "error in iframe" all with the same timestamp. So this can be a significant error. I don't know what specifically is going on but it blocked further motion event recording, even though the live preview on the web page was still updating normally.
Yes, once it is erroring like that it is bust until it self recovers which sometimes is quick but other times can go on for a long while. It also breaks the watchdog. I think silvan is checking into the cause. If we can't fix it soon then I'll see if I can make more than a second or so of these be another reason to activate the watchdog.

I have got the sync of watchog restart and scheduler going here but needs a bit of tidying up before I push it.

lassiko
Posts: 10
Joined: Tue May 12, 2015 7:04 pm

Re: RPi Cam Web Interface

Thu May 14, 2015 12:10 pm

Not sure how rpi IR cam works, but is it possible to add option to RPi Cam Control to change camera to IR mode?

btw, i got motion working after reassembling motion packages completely.

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

Re: RPi Cam Web Interface

Thu May 14, 2015 4:02 pm

The RPi cam software works only with the RPi camera (the little $25 board that connects to the Pi board using the 15-way ribbon cable, not USB). There are two separate versions of the camera hardware, the normal version (green PCB) with an IR-block filter, and the Pi No-IR (black PCB) which has no IR filter so it can see near-infrared as well as normal light. There is no software-selectable "IR mode" unless you mean just convert the color image to black&white, which you can do.

There are some IP security cameras, usually with a wireless or ethernet connection that have a mechanical solenoid to push an IR filter in and out of the optical path under computer control, but that is a different category of camera; not something you can control with the RPi Cam software as far as I know.

User avatar
gigpi
Posts: 17
Joined: Thu May 14, 2015 12:23 pm

Re: RPi Cam Web Interface

Thu May 14, 2015 6:05 pm

Hello!
i just discovered this wonderful piece of software to manage my camera and even if i'm not a developer i'd like to give my little contribute.

I've found that in a fresh installation on my rPi-2 (raspbian 2015-05-05) there was always the process "startpar" running even after boot ended (~17% cpu usage).
So after some searching [0][1] i fixed this behaviour by simply adding "2>&1" to the lines in rc.local added by RPi-Cam-Web.
Here is code corrected:

Code: Select all

#START RASPIMJPEG SECTION
mkdir -p /dev/shm/mjpeg
sleep 4;raspimjpeg > /dev/null 2>&1 &
sleep 4;su www-data -c 'php /var/www/camweb/schedule.php > /dev/null 2>&1 &'
#END RASPIMJPEG SECTION
This worked for me both in official silvanmelchior project and pan/tilt skalad version, now i have no more "startpar" process running when raspi is on.
I hope this can help real developers!


As a side note, i used to launch a command from rc.local file and discovered the hard way that it's overwritten every time you install/reinstall or simply change autostart option in RPi-Cam-Web, throwing away lines added by user, i think it could be a better solution to just append (>>) the lines from RPi-Cam-Web.

Bye!

[0] viewtopic.php?f=66&t=96045
[1] https://serverfault.com/questions/58597 ... -or-init-d

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

Re: RPi Cam Web Interface

Thu May 14, 2015 7:40 pm

btidey wrote:
chum wrote:I think it might be desirable to:
1. have a 'Next' & 'Prev' button on the preview. I think this will help the usability immensely when you want to simply preview the last few recorded videos but you still have videos for a few days in the folder.
2. add playtime to the preview thumbnail.
I understand that some might be easy and some maybe more work but I wanted to throw out the idea for prioritization.
Cheers!
Prev and Next might be possible. I assume it would stay in category. I.e if there was a mix of images and videos then next when viewing a video would find the next video.

Playtime on the thumbnail imay be possible by checking filetime of the thumbnail which is captured at the start with filetime of the video which should show end. I definitely don't want to start digging into each file to get video parameters as that would slow things a lot.
I have added duration in seconds onto video thumbnails and previous next buttons after a thumbnail is selected for larger viewing.

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

Re: RPi Cam Web Interface

Thu May 14, 2015 8:01 pm

gigpi wrote:Hello!
I've found that in a fresh installation on my rPi-2 (raspbian 2015-05-05) there was always the process "startpar" running even after boot ended (~17% cpu usage).
So after some searching [0][1] i fixed this behaviour by simply adding "2>&1" to the lines in rc.local added by RPi-Cam-Web.
Here is code corrected:

As a side note, i used to launch a command from rc.local file and discovered the hard way that it's overwritten every time you install/reinstall or simply change autostart option in RPi-Cam-Web, throwing away lines added by user, i think it could be a better solution to just append (>>) the lines from RPi-Cam-Web.
Thanks for that. There must be some dependency on Rasbian version there or maybe an interaction with other software, as I haven't seen that startpar behaviour myself.

I have added the redirects in to avoid the problem there.

Your comment on the installer with respect to overwrite is in our issues list together with some other installer 'unfriendliness' like overwriting Apache settings etc. Append can help but then there has to be checks to makes sure one is doing extra appends during upgrades. One can check for previous stuff and skip but then one might not be doing a change one wants to do. Really we should be deleting previous stuff before adding stuff during upgrades. Not too difficult to do but can be time consuming to test.

Always happy to receive code / installer mods!

boomlikethat
Posts: 85
Joined: Sun Aug 03, 2014 10:32 pm

Re: RPi Cam Web Interface - freezing system

Fri May 15, 2015 11:36 am

Hey Robert,

I'm using the latest version (5.1.6), and am still experiencing freezing issues on both of my RPIs (one B, one B+, both using latest stuff, and 128 meg GPU).

Here's a snippet of the log, maybe this will help:

{2015/05/13 16:59:41} Capturing stopped
{2015/05/13 16:59:41} Add /var/www/media/0036_2015.05.13_16.59.35.mp4 to Box Queue at pos 12
{2015/05/13 16:59:41} Start boxing /var/www/media/0036_2015.05.13_16.59.35.mp4 from Box Queue at pos 12
{2015/05/13 16:59:44} Finished boxing /var/www/media/0036_2015.05.13_16.59.35.mp4 from Box Queue at pos 12
[2015/05/13 16:59:55] Scheduled management tasks. Next at 1431554395
[2015/05/13 17:01:20] Start capture requested
[2015/05/13 17:01:20] Send ca 1
{2015/05/13 17:01:20} Capturing started
[2015/05/13 17:01:23] Stop capture requested
[2015/05/13 17:01:23] Send ca 0
{2015/05/13 17:01:23} Error: Could not send buffers to port
{2015/05/13 17:01:24} RaspiMJPEG Version 5.1.3
{2015/05/13 17:01:24} Error: Could not enable camera
{2015/05/13 17:01:25} RaspiMJPEG Version 5.1.3

I need to restart every day, at seemingly random times does the crash occur.

I'm stumped. Thanks.

lassiko
Posts: 10
Joined: Tue May 12, 2015 7:04 pm

Re: RPi Cam Web Interface

Fri May 15, 2015 11:44 am

jbeale wrote:The RPi cam software works only with the RPi camera (the little $25 board that connects to the Pi board using the 15-way ribbon cable, not USB). There are two separate versions of the camera hardware, the normal version (green PCB) with an IR-block filter, and the Pi No-IR (black PCB) which has no IR filter so it can see near-infrared as well as normal light. There is no software-selectable "IR mode" unless you mean just convert the color image to black&white, which you can do.

There are some IP security cameras, usually with a wireless or ethernet connection that have a mechanical solenoid to push an IR filter in and out of the optical path under computer control, but that is a different category of camera; not something you can control with the RPi Cam software as far as I know.
I have normal, green PCB camera attached to my raspi at the moment. I was just wondering that if i buy NoIR camera, that would work also with RPi cam software? I also have a IR led light source i could use at night with NoIR camera.

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

Re: RPi Cam Web Interface

Fri May 15, 2015 12:05 pm

lassiko wrote:
jbeale wrote:The RPi cam software works only with the RPi camera (the little $25 board that connects to the Pi board using the 15-way ribbon cable, not USB). There are two separate versions of the camera hardware, the normal version (green PCB) with an IR-block filter, and the Pi No-IR (black PCB) which has no IR filter so it can see near-infrared as well as normal light. There is no software-selectable "IR mode" unless you mean just convert the color image to black&white, which you can do.

There are some IP security cameras, usually with a wireless or ethernet connection that have a mechanical solenoid to push an IR filter in and out of the optical path under computer control, but that is a different category of camera; not something you can control with the RPi Cam software as far as I know.
I have normal, green PCB camera attached to my raspi at the moment. I was just wondering that if i buy NoIR camera, that would work also with RPi cam software? I also have a IR led light source i could use at night with NoIR camera.
Yes. This software will run fine with NoIR camera; I use one NoIR myself. As jbeale said the only difference is the filter in front of the sensor. There is no difference in the sensor or electronics.

Return to “Camera board”