cardiffborn
Posts: 11
Joined: Mon Oct 05, 2015 4:04 pm

Re: RPi Cam Web Interface

Thu Oct 08, 2015 2:58 pm

I still have yet to be able to Edit the Motion Settings. I get a list of errors like this:

"conf_cmdparse: Unknown config option "webcam_limit"

every time I try to do something with Motion. So, if in motion.php we have

define('MOTION_URL', "http://127.0.0.1:6642/0/");
and then
$t = file_get_contents(MOTION_URL . "action/restart");

where does the config file actually reside? Any advice will be welcomed. Many thanks

wb4dhc
Posts: 10
Joined: Tue Jun 09, 2015 12:39 pm

Work Sample Study - more info

Thu Oct 08, 2015 5:27 pm

In addition to what I posted earlier I today looked into the source code at:
https://github.com/silvanmelchior/userl ... spiMJPEG.c to find out how it handles the FIFO file.
It seems that is an older version as install report as 5.2.10. At least in the code it seems straight forward that the FIFO file is being read. I also tried to run raspiMJPEG stand along but in that case it reads NOTHING from the FIFO pipe. Starting schedule.php does seem to make that work but then again after some random number of commands sent via the pipe it stops accepting them.

I would just use the built in scheduler but we will have > 40 intervals to record in a 12 hour shift :-(

Any thoughts or a pointer to the current source code would be appreciated.

Robert

Flavio Galtieri
Posts: 3
Joined: Mon Oct 20, 2014 6:50 pm

Re: RPi Cam Web Interface

Thu Oct 08, 2015 8:15 pm

Thanks, I'll give that a go.

Much appreciated!

input
Posts: 223
Joined: Sun Nov 02, 2014 9:18 am
Location: Netherlands

Re: RPi Cam Web Interface

Fri Oct 09, 2015 10:35 am

Hello,

I just installed the webcam but with browsing to my ipadres i get the error "error raspiMJPEG" and i can't see a image.

Any ideas ?

thanks
Last edited by input on Fri Oct 09, 2015 3:12 pm, edited 1 time in total.

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

Re: Work Sample Study - more info

Fri Oct 09, 2015 2:37 pm

wb4dhc wrote:In addition to what I posted earlier I today looked into the source code at:
https://github.com/silvanmelchior/userl ... spiMJPEG.c to find out how it handles the FIFO file.
It seems that is an older version as install report as 5.2.10. At least in the code it seems straight forward that the FIFO file is being read. I also tried to run raspiMJPEG stand along but in that case it reads NOTHING from the FIFO pipe. Starting schedule.php does seem to make that work but then again after some random number of commands sent via the pipe it stops accepting them.

I would just use the built in scheduler but we will have > 40 intervals to record in a 12 hour shift :-(

Any thoughts or a pointer to the current source code would be appreciated.

Robert
Source code for the overall project is split into 2 parts
1) Main end user install and web site - https://github.com/silvanmelchior/RPi_Cam_Web_Interface
2) raspimjpeg run time source code - https://github.com/roberttidey/userland

There is a case where FIFO could be misread as the commands are read in one FIFO read operation so it is possible that a read might get part of a command being written. I've never seen that happen myself using the web software. The read is fast and so probability of this occurring is low. If the write operation is slow in writing the overall command then that may increase the chances of it happening.

I have that down on my list of improvements. It would need line terminators being added onto the commands and the FIFO reader changed so it accumulates input and can tell when a command is complete.

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

Re: RPi Cam Web Interface

Fri Oct 09, 2015 2:59 pm

cardiffborn wrote:I still have yet to be able to Edit the Motion Settings. I get a list of errors like this:

"conf_cmdparse: Unknown config option "webcam_limit"

every time I try to do something with Motion. So, if in motion.php we have

define('MOTION_URL', "http://127.0.0.1:6642/0/");
and then
$t = file_get_contents(MOTION_URL . "action/restart");

where does the config file actually reside? Any advice will be welcomed. Many thanks
I haven't tried Motion with Jessie myself as I normally use the internal motion detection. Motion was working with Wheezy. It is also possible a later version of Motion has broken something.

The config file is actually at /etc/motion/motion.conf. motion.php uses the web api provided by Motion to read and modify this file contents using web commands. Motion itself then makes the config changes.

webcam_limit was one of the parameters supported by Motion and is in the default motion.conf file supplied with the RPI_Cam install. It is possible that parameter has been removed in Motion which then triggers that parse error. This default file was originally generated from a Motion v3.2.12 version. The RPi_Cam use of Motion doesn't use the Webcam support in Motion so one could remove that parameter.

dutchronnie
Posts: 15
Joined: Sat Dec 15, 2012 11:15 am

Re: RPi Cam Web Interface

Fri Oct 09, 2015 3:59 pm

I constantly get the error: Error in RaspiMJPEG
Even after a reboot.
I can not start RPI Cam interface anymore.

Strange, the last month many problems, so last week i decided to start from scratch.
configured everthing from start.
And stil have problems to start RPI Cam.

Somebody know what can be the problem?


Just did the setup complete from start again.
new image and everthing installed

After install, started camera, and imidiatly the error message: Error in RaspiMJPEG

I think there is something wrong in the latest RPI Cam interface.


Solved:
I think it was a bad connection in the ribbon cable.
Now the cam interface is working again.

cardiffborn
Posts: 11
Joined: Mon Oct 05, 2015 4:04 pm

Re: RPi Cam Web Interface

Sat Oct 10, 2015 10:41 am

btidey wrote:
cardiffborn wrote:I still have yet to be able to Edit the Motion Settings. I get a list of errors like this:

"conf_cmdparse: Unknown config option "webcam_limit"

every time I try to do something with Motion. So, if in motion.php we have

define('MOTION_URL', "http://127.0.0.1:6642/0/");
and then
$t = file_get_contents(MOTION_URL . "action/restart");

where does the config file actually reside? Any advice will be welcomed. Many thanks
I haven't tried Motion with Jessie myself as I normally use the internal motion detection. Motion was working with Wheezy. It is also possible a later version of Motion has broken something.

The config file is actually at /etc/motion/motion.conf. motion.php uses the web api provided by Motion to read and modify this file contents using web commands. Motion itself then makes the config changes.

webcam_limit was one of the parameters supported by Motion and is in the default motion.conf file supplied with the RPI_Cam install. It is possible that parameter has been removed in Motion which then triggers that parse error. This default file was originally generated from a Motion v3.2.12 version. The RPi_Cam use of Motion doesn't use the Webcam support in Motion so one could remove that parameter.
Thank you for that. As there were quite a few parse errors it might be a version problem. I'll use the internal motion detection for the moment.

delta1071
Posts: 13
Joined: Tue Sep 22, 2015 9:48 pm

Re: RPi Cam Web Interface

Sat Oct 10, 2015 3:49 pm

I've been using the Cam Web Interface for a while now with Wheezy and it works like a charm! However, I tried to run it in Jessie using the './RPi_Cam_Web_Interface_Installer.sh start' command and I'm getting a "This account is currently not available" error and the camera will not start. It's not the camera; it responds to all the raspivid and raspistill commands. I get the same error whether running as root or as a user.

rmjspa
Posts: 13
Joined: Wed Jun 10, 2015 11:03 am

Re: RPi Cam Web Interface

Sat Oct 10, 2015 7:16 pm

Same Problem as delta1071 with "Jessie"

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

Re: RPi Cam Web Interface

Sat Oct 10, 2015 9:56 pm

delta1071 wrote:I've been using the Cam Web Interface for a while now with Wheezy and it works like a charm! However, I tried to run it in Jessie using the './RPi_Cam_Web_Interface_Installer.sh start' command and I'm getting a "This account is currently not available" error and the camera will not start. It's not the camera; it responds to all the raspivid and raspistill commands. I get the same error whether running as root or as a user.
See a few posts back for a more detailed description of this Jessie problem and some manual steps to overcome this.

It also means that at the moment it is tricky to install anywhere other than the default Jessie web home of /var/www/html

As this is affecting any new users or people switching to jessie I have added some notes on Jessie in the eLinus wiki install section.

I am working on adjusting the install script but my time has been a bit limited recently.

rmjspa
Posts: 13
Joined: Wed Jun 10, 2015 11:03 am

Re: RPi Cam Web Interface

Sat Oct 10, 2015 11:38 pm

Thanks for your reply. I saw the notes a few earlier post's and followed them. But without success.

One difference is in my setup. I changed in the config file from /var/www/html to /var/www. Because I have different software using /var/www/shc/index.php and RPi Cam should be in /var/www/rcamMaster/index.php

I can retrive the webpage at local.host/rcamMaster/ but instead of a Pic I only see the word in big letters LOADING

raspistill -o test.jpg is working. It seems the Data get lost between raspistill and the RPi Cam Web Interface

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Sun Oct 11, 2015 10:37 am

HI Folks,

I have done a bit search on forum and haven't found out answer to my question. Hope you guys can help.

1. I tried to change file path from default to this structure,
image_path /var/www/media/%Y/im_%i_%Y%M%D_%h%m%s.jpg
lapse_path /var/www/media/%Y/tl_%i_%t_%Y%M%D_%h%m%s.jpg
video_path /var/www/media/%Y/vi_%v_%Y%M%D_%h%m%s.mp4

The result I get is,
2015@im_0006_20151011_062228.jpg

My question is how I can change path to /var/www/media/2015-10-10/DrivewayIR/im_%i_%Y%M%D_%h%m%s.jpg?

2. I have this mounted in NFS NAS with autofs.

pi@RPI ~ $ cat /etc/auto.qnap
media 192.168.100.10:/Recording

i@RPI ~ $ cat /etc/auto.master
/mnt /etc/auto.qnap

lrwxrwxrwx 1 root root 10 Oct 10 17:40 media -> /mnt/media
Do you have a better way to bind /var/www/media to /mnt/media, instead of link?

thanks
peng



Thanks
Peng

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

Re: RPi Cam Web Interface

Sun Oct 11, 2015 12:54 pm

piecam wrote:HI Folks,

I have done a bit search on forum and haven't found out answer to my question. Hope you guys can help.

1. I tried to change file path from default to this structure,
image_path /var/www/media/%Y/im_%i_%Y%M%D_%h%m%s.jpg
lapse_path /var/www/media/%Y/tl_%i_%t_%Y%M%D_%h%m%s.jpg
video_path /var/www/media/%Y/vi_%v_%Y%M%D_%h%m%s.mp4

The result I get is,
2015@im_0006_20151011_062228.jpg

My question is how I can change path to /var/www/media/2015-10-10/DrivewayIR/im_%i_%Y%M%D_%h%m%s.jpg?

2. I have this mounted in NFS NAS with autofs.

pi@RPI ~ $ cat /etc/auto.qnap
media 192.168.100.10:/Recording

i@RPI ~ $ cat /etc/auto.master
/mnt /etc/auto.qnap

lrwxrwxrwx 1 root root 10 Oct 10 17:40 media -> /mnt/media
Do you have a better way to bind /var/www/media to /mnt/media, instead of link?
The way subfolders in the media path works is as follows

Thumbnails are always stored in the base media folder and an @ is substituted for each '/' in the path to the full media file. This allows the web code to reconstruct the path to the full file from the thumbnail.

So when I use
image_path /var/www/media/%Y/im_%i_%M%D_%h%m%s.jpg

and do an image capture then in the media folder I get a thumbnail called
2015@im_0000_1011_133926.jpg.i0000.th.jpg

and a subfolder 2015 contains the actual image file
im_0000_1011_133926.jpg

For what you want to do the config would be something like

im_path /var/www/media/%Y-%M-%D/DrivewayIR/im_%i_%Y%M%D_%h%m%s.jpg

I would prove your naming scheme and folder set up locally before configuring the NAS set up. That way you separate out any problems.

The wiki at http://elinux.org/RPi-Cam-Web-Interface has advice on moving the data storage to external folders.

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

Re: RPi Cam Web Interface

Sun Oct 11, 2015 1:01 pm

rmjspa wrote:Thanks for your reply. I saw the notes a few earlier post's and followed them. But without success.

One difference is in my setup. I changed in the config file from /var/www/html to /var/www. Because I have different software using /var/www/shc/index.php and RPi Cam should be in /var/www/rcamMaster/index.php

I can retrive the webpage at local.host/rcamMaster/ but instead of a Pic I only see the word in big letters LOADING

raspistill -o test.jpg is working. It seems the Data get lost between raspistill and the RPi Cam Web Interface
So far I have only used Jessie with /var/www/html. Changing to other subfolder setup is likely not to work with Jessie at the moment without other changes to the rest of the RPi_Cam set up.. That is what I am trying to work out at the moment. It is made a bit trickier as I need to keep it compatible with Wheezy as well.

wb4dhc
Posts: 10
Joined: Tue Jun 09, 2015 12:39 pm

Re: Work Sample Study - more info

Sun Oct 11, 2015 2:15 pm

btidey wrote:
wb4dhc wrote:In addition to what I posted earlier I today looked into the source code at:
https://github.com/silvanmelchior/userl ... spiMJPEG.c to find out how it handles the FIFO file.
It seems that is an older version as install report as 5.2.10. At least in the code it seems straight forward that the FIFO file is being read. I also tried to run raspiMJPEG stand along but in that case it reads NOTHING from the FIFO pipe. Starting schedule.php does seem to make that work but then again after some random number of commands sent via the pipe it stops accepting them.

I would just use the built in scheduler but we will have > 40 intervals to record in a 12 hour shift :-(

Any thoughts or a pointer to the current source code would be appreciated.

Robert
Source code for the overall project is split into 2 parts
1) Main end user install and web site - https://github.com/silvanmelchior/RPi_Cam_Web_Interface
2) raspimjpeg run time source code - https://github.com/roberttidey/userland

There is a case where FIFO could be misread as the commands are read in one FIFO read operation so it is possible that a read might get part of a command being written. I've never seen that happen myself using the web software. The read is fast and so probability of this occurring is low. If the write operation is slow in writing the overall command then that may increase the chances of it happening.

I have that down on my list of improvements. It would need line terminators being added onto the commands and the FIFO reader changed so it accumulates input and can tell when a command is complete.
Thanks very much for the info and your time to reply. That does seem to be the case and would explain why the situation is seemingly random. I backed up a bit and found something that might be an alternative approach. While looking at how schedule.php handled the FIFO pipe it looked like it could handle more intervals from schedule.json than were showing on the GUI. After manually editing the sections Commands_On, Commands_Off, Modes and Times (using the "ca 1" + recording time that you added a while back) and sending a manual "9" to FIFO1 the additional intervals were handled fine! A surprise was that the GUI expanded to show the additional intervals! Now I will modify the Python program to update schedule.json and then send one command to FIFO1 instead of repeating the "ca 1" "ca 0" to FIFO. At least it will minimize the opportunity for a conflict! I'll have lots of time in the evenings this week to work that solution as I'm in DTW for training. Thanks for the great software and interaction.

tianheng123
Posts: 13
Joined: Mon Aug 03, 2015 4:14 pm

Re: RPi Cam Web Interface

Sun Oct 11, 2015 9:07 pm

First of all, this web interface is really amazing in my opinion.
I am not complaining anything bad about it but i think there must be someone else who is also suffering from same bug and wants to fix it to have better images.

My problem is the images I take (no matter with web interface or with raspistill command), they always have this red colour around edges of images. Today I searched a way to resolve this by using raspistill -st. It says the function of -st is Force recomputation of statistics on stills capture pass.

Also, when we are previewing on the web interface, the images are normal, but when we record images, the red colour just appear somehow.

I am wondering whether we can embed -st function to web interface as well?

Image

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Sun Oct 11, 2015 10:12 pm

btidey wrote:
piecam wrote:HI Folks,

I have done a bit search on forum and haven't found out answer to my question. Hope you guys can help.

1. I tried to change file path from default to this structure,
image_path /var/www/media/%Y/im_%i_%Y%M%D_%h%m%s.jpg
lapse_path /var/www/media/%Y/tl_%i_%t_%Y%M%D_%h%m%s.jpg
video_path /var/www/media/%Y/vi_%v_%Y%M%D_%h%m%s.mp4

The result I get is,
2015@im_0006_20151011_062228.jpg

My question is how I can change path to /var/www/media/2015-10-10/DrivewayIR/im_%i_%Y%M%D_%h%m%s.jpg?

2. I have this mounted in NFS NAS with autofs.

pi@RPI ~ $ cat /etc/auto.qnap
media 192.168.100.10:/Recording

i@RPI ~ $ cat /etc/auto.master
/mnt /etc/auto.qnap

lrwxrwxrwx 1 root root 10 Oct 10 17:40 media -> /mnt/media
Do you have a better way to bind /var/www/media to /mnt/media, instead of link?
The way subfolders in the media path works is as follows

Thumbnails are always stored in the base media folder and an @ is substituted for each '/' in the path to the full media file. This allows the web code to reconstruct the path to the full file from the thumbnail.

So when I use
image_path /var/www/media/%Y/im_%i_%M%D_%h%m%s.jpg

and do an image capture then in the media folder I get a thumbnail called
2015@im_0000_1011_133926.jpg.i0000.th.jpg

and a subfolder 2015 contains the actual image file
im_0000_1011_133926.jpg

For what you want to do the config would be something like

im_path /var/www/media/%Y-%M-%D/DrivewayIR/im_%i_%Y%M%D_%h%m%s.jpg

I would prove your naming scheme and folder set up locally before configuring the NAS set up. That way you separate out any problems.

The wiki at http://elinux.org/RPi-Cam-Web-Interface has advice on moving the data storage to external folders.
HI Bitdey,
Much appreciated for your help!!!!!

One other question, that you guys may have mentioned, is that in "view and download" page, with this NAS/NFS setup, it seems that I can not delete image/video in subfolder. It works on base /media folder, though.

Just want to confirm that this is what we have now. If this can not be modified, I can live with this and do "delete" through other means.
please let me know.

thanks

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

Re: RPi Cam Web Interface

Sun Oct 11, 2015 10:24 pm

piecam wrote: One other question, that you guys may have mentioned, is that in "view and download" page, with this NAS/NFS setup, it seems that I can not delete image/video in subfolder. It works on base /media folder, though.

Just want to confirm that this is what we have now. If this can not be modified, I can live with this and do "delete" through other means.
please let me know.

thanks
If the media in subfolders is not deleting then this is probably due to the permissions set up. The web interface runs under user www-data and this user therefore needs read/write permissions on the media folder and any sub-folders. Normally the web interface creates sub-folders with appropriate permissions if it can. If you have created sub-folders yourself from another user then that would stop that happening.

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

Re: RPi Cam Web Interface

Sun Oct 11, 2015 10:31 pm

tianheng123 wrote:First of all, this web interface is really amazing in my opinion.
I am not complaining anything bad about it but i think there must be someone else who is also suffering from same bug and wants to fix it to have better images.

My problem is the images I take (no matter with web interface or with raspistill command), they always have this red colour around edges of images. Today I searched a way to resolve this by using raspistill -st. It says the function of -st is Force recomputation of statistics on stills capture pass.

Also, when we are previewing on the web interface, the images are normal, but when we record images, the red colour just appear somehow.

I am wondering whether we can embed -st function to web interface as well?

Image
Not really seen that effect myself, but my images are fairly colourful anyway so it may be less noticeable. The stills and videos are taken by direct interface to the MMAL camera layer. They do not use the raspistill command itself but use the same sort of MMAL calls that raspistill uses.. If the -st option in raspistill is just extra MMAL parameter then it should be possible to add that in. This will take a bit of research first.

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

Re: RPi Cam Web Interface

Sun Oct 11, 2015 10:37 pm

cardiffborn wrote: Thank you for that. As there were quite a few parse errors it might be a version problem. I'll use the internal motion detection for the moment.
I have checked the motion.conf that the motion installs now and it does differ quite a bit from the previous one even though the nominal base version of motion is the same. For example, all the parameters that were webcam_ are now stream_

That is a bit of a pain particularly if either version could get installed. It probably means that the install strategy of copying in a tailored version of motion.conf fro RPI_Cam won't work too well now and should be replaced by one that just edits the parameters in place instead.

YrBo
Posts: 2
Joined: Thu Mar 27, 2014 7:51 pm

Re: RPi Cam Web Interface

Tue Oct 13, 2015 1:06 pm

Hi all,

This project is really great and i'm using it for 6 months.
I build my camera into my outdoor intercom.
I'm trying to figure out how i can switch the exposure modes during day and night.
I've tried this with the schedule settings on Sun Based mode
Period Motion Start Motion Stop Period Start
Night ca 1 ca 0 em night
Dawn ca 1 ca 0 md 1;em night
Day ca 1 ca 0 em auto
Dusk ca 1 ca 0 md 0;em night

The camera is not changing to the desired exposure mode at sun based times.
What am i doing wrong?

Thanks allready

YrBo

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

Re: RPi Cam Web Interface

Wed Oct 14, 2015 11:51 am

YrBo wrote:Hi all,

This project is really great and i'm using it for 6 months.
I build my camera into my outdoor intercom.
I'm trying to figure out how i can switch the exposure modes during day and night.
I've tried this with the schedule settings on Sun Based mode
Period Motion Start Motion Stop Period Start
Night ca 1 ca 0 em night
Dawn ca 1 ca 0 md 1;em night
Day ca 1 ca 0 em auto
Dusk ca 1 ca 0 md 0;em night

The camera is not changing to the desired exposure mode at sun based times.
What am i doing wrong?

Thanks allready

YrBo
I assume you have set up your location (log/lat) and timezone. You can then see the predicted sunrise and sunset times in the schedule panel and the schedule log should show the settings being applied.

When em night is used the preview should be considerably lighter during dawn and dusk periods (if video buffer is 0) but the captured video will still be dark. This is because the night exposure mode relies on using long exposure times to capture enough light. When video captures (or if video buffering is used) then night exposure settings get overridden by the frame rate (25 fps). One can improve this by using a different frame rate for video at night (e.g. 3 fps).

tianheng123
Posts: 13
Joined: Mon Aug 03, 2015 4:14 pm

Re: RPi Cam Web Interface

Sat Oct 17, 2015 9:55 am

btidey wrote:
tianheng123 wrote:First of all, this web interface is really amazing in my opinion.
I am not complaining anything bad about it but i think there must be someone else who is also suffering from same bug and wants to fix it to have better images.

My problem is the images I take (no matter with web interface or with raspistill command), they always have this red colour around edges of images. Today I searched a way to resolve this by using raspistill -st. It says the function of -st is Force recomputation of statistics on stills capture pass.

Also, when we are previewing on the web interface, the images are normal, but when we record images, the red colour just appear somehow.

I am wondering whether we can embed -st function to web interface as well?

Image
Not really seen that effect myself, but my images are fairly colourful anyway so it may be less noticeable. The stills and videos are taken by direct interface to the MMAL camera layer. They do not use the raspistill command itself but use the same sort of MMAL calls that raspistill uses.. If the -st option in raspistill is just extra MMAL parameter then it should be possible to add that in. This will take a bit of research first.

Hi thanks for the information! Do you know is there anyone who I should turn to if i want to add this function to the current web interface?

Sorry I don't have much programming experience so it might be difficult for me to fork the project

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

Re: RPi Cam Web Interface

Sat Oct 17, 2015 12:40 pm

tianheng123 wrote:
Hi thanks for the information! Do you know is there anyone who I should turn to if i want to add this function to the current web interface?

Sorry I don't have much programming experience so it might be difficult for me to fork the project
The relevant MMAL parameter seems to be MMAL_PARAMETER_CAPTURE_STATS_PASS but it is not obvious what to do with this.

I have added into the latest version a new Camera Setting (Camera Statistics) which controls a new variable stat_pass. This is then is then sent into the camera control port at the start of each still image capture.

It seems to be harmless at least, but I don't know if it is effective for you as I don't really see this effect myself.

Return to “Camera board”