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

Re: RPi Cam Web Interface

Tue Mar 24, 2015 12:51 pm

0lly wrote:
boomlikethat wrote: error message
Go to /var/www and edit wrong values in uconfig
or in /etc/raspimjpeg

That helps a bunch. Thanks! Once I get this where I need it, Pi-Baker will keep it backed up!

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

Re: RPi Cam Web Interface

Tue Mar 24, 2015 12:56 pm

btidey wrote:
0lly wrote:
boomlikethat wrote: error message
Go to /var/www and edit wrong values in uconfig
or in /etc/raspimjpeg
Yes. The error is occuring as raspimjpeg tries to initialise the image format to be used for taking still images and gets an error back. It is most likely some illegal combination of image_width or image_height parameter. This is set initially to default in /etc/raspimjpeg but then can be overridden by the web camera settings and stored in uconfig.

You can also clear out the whole of uconfig by doing a reset settings under system
Robert, thanks for the reply. In trying to update not only RPi Cam, but the OS to the latest Raspian system, I caused myself a bit of a mess. I'll be keeping these fixes as reference. Thanks again.

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: RPi Cam Web Interface

Tue Mar 24, 2015 2:40 pm

Hello,
btidey wrote:Although I normally use Chrome, I find Firefox seems Ok, as do my phone browsers.
Works in Seamonkey on Windows 7.

Regards

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

Re: RPi Cam Web Interface

Tue Mar 24, 2015 4:32 pm

I have added a simple/full display toggle for the main page.

Default is the current full display. Toggling to Simple hides all the buttons leaving just the title bar, button to get back to full and the live image.

The last state is remembered in a cookie so this can be set differently on different browsers.
Attachments
Simple1.jpg
Simple1.jpg (8.86 KiB) Viewed 3018 times

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 6:41 pm

HI Robert,
It looks like that Simple button not working with Chrome, but it works with Firefox. :-)

thanks

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 6:50 pm

HI Robert,
One of my installed pi cam seems always getting into recording mode. I am not sure why. It's inside house facing window and there's not much change.

Is there any place that I can get a log for you to help check out?

thanks
Attachments
Screenshot12.png
Screenshot12.png (39.43 KiB) Viewed 2924 times

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 6:55 pm

It seems that the file is recorded non stopping. I have to reboot the box myself to get this back into monitor mode again.
Attachments
Screenshot18.png
Screenshot18.png (23.9 KiB) Viewed 2920 times

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 9:20 pm

piecam wrote:HI Robert,
It looks like that Simple button not working with Chrome, but it works with Firefox. :-)

thanks
That is strange as I use Chrome as my default browser and it works fine for me.

Do you mean you don't see the button on Chrome or you see it but pushing it has no effect. If the latter what is the label on the button? Does that change?

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 9:22 pm

piecam wrote:HI Robert,
One of my installed pi cam seems always getting into recording mode. I am not sure why. It's inside house facing window and there's not much change.

Is there any place that I can get a log for you to help check out?

thanks
The scheduler log records requests for video starts and stops and also the commands it sends to start and stop recording. So that is a good place to look to begin with.

cazz
Posts: 220
Joined: Wed Nov 14, 2012 9:01 pm
Location: Sweden

Re: RPi Cam Web Interface

Wed Mar 25, 2015 9:22 pm

Have a little problem with RPi Cam control.

I have download the update of the preview so it create thumbnails and that is cool but it take sometime to make it create the thumbnails.

And is not better when RPi Cam control recording everything, even when it is nothing there. I think it have to be the sun and the shadow make it recording the stuff.
It is ok but is it possible to have a filter so it delete or maybe does not create thumbnail if the file is less then x kb.
I have alot of mp4 file that is less then 100 kb, is no idea to create thumbnail of clip that tiny, or even save them.
/Cazz

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 9:30 pm

Currently the camera settings controls on the main page are a one way trip as they had no knowledge of current values. This made it trickier to know what one was changing from.

I have added in retrieving the current values and setting the controls to these values. This makes it much nicer to change values.

The page reads both the main raspimjpeg default values plus any changes held in the uconfig file. To read the former it uses a symbolic link.

Creating this symbolic link is in the installer script but won't be activated until the script itself is updated. This means the first update won't create this link but subsequent ones should.

If one wants to create the link manually then one should

Code: Select all

sudo ln -s /etc/raspimjpeg /var/www/raspimjpeg
Attachments
settings1.jpg
settings1.jpg (42.04 KiB) Viewed 2867 times

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 9:52 pm

cazz wrote:Have a little problem with RPi Cam control.

I have download the update of the preview so it create thumbnails and that is cool but it take sometime to make it create the thumbnails.

And is not better when RPi Cam control recording everything, even when it is nothing there. I think it have to be the sun and the shadow make it recording the stuff.
It is ok but is it possible to have a filter so it delete or maybe does not create thumbnail if the file is less then x kb.
I have alot of mp4 file that is less then 100 kb, is no idea to create thumbnail of clip that tiny, or even save them.
It doesn't take any significant time to make the thumbnails internally as it just copies the cam.jpg at the start of a capture. These are being continuously created anyway. What you may be seeing is a lot of video processing activity if you are getting lots of small recordings.

If you are getting previews with lots of thumbnails then that may be also slowing down the loading of the web page itself into the browser particularly if you don't have a fast connection from the browser to the raspberry. On my network I see about 15 thumbnails per second when first loaded but after that they are in the browser cache so subsequent loads are much faster.

If you are experiencing lots of triggers and recordings then the first step would be to try to optimise your motion trigger settings. Factors that can help a lot here are

a) Use a mask_file to limit the region of interest that motion will consider real movement is in.
b) Increase threshold and noise values. Noise determines whether a pixel is regarded as changing. I use a value of 80. Threshold determines how many pixels must change between frames. I use 3000.
c) minimum_motion_frames determines how many consecutive frames have to show movement before a trigger occurs. You can increase this a bit but it does delay the trigger a bit so best to use methods a) and b) first.

It would be possible to an auto-delete function into scheduler for small files but there is also a motion setting called gap which delays the end of a recording to merge adjacent files together. This is actually quite useful as say a gap of 6 seconds means that somebody pausing and then continuing to move within the 6 seconds creates just one recording. If one uses that then all videos are at least this long.

I have also been thinking of adding some auto-clean up settings into scheduler so that one could say configure removing recordings older than x days rather than have to do it manually.
Last edited by btidey on Wed Mar 25, 2015 9:56 pm, edited 1 time in total.

jmilligan
Posts: 12
Joined: Thu Jul 18, 2013 6:49 pm
Location: Carmarthen
Contact: Website

Re: RPi Cam Web Interface

Wed Mar 25, 2015 9:53 pm

Hi silvanmelchior

Great software however I have a problem I`m running it on a pi2 . When I press Stop Camera I am not able to restart it and when I reboot my Pi I get this error

Error in RaspiMJPEG: Could Not enable camera
Restart RaspiMJPEG (./RPI_Cam_web_Interface_Installer.sh Start) or the whole RPI

After a reboot I get the same error , if I run ***_Installer.sh Start I get an error Error: Could not enable camera

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

Re: RPi Cam Web Interface

Wed Mar 25, 2015 11:05 pm

jmilligan wrote:Hi silvanmelchior

Great software however I have a problem I`m running it on a pi2 . When I press Stop Camera I am not able to restart it and when I reboot my Pi I get this error

Error in RaspiMJPEG: Could Not enable camera
Restart RaspiMJPEG (./RPI_Cam_web_Interface_Installer.sh Start) or the whole RPI

After a reboot I get the same error , if I run ***_Installer.sh Start I get an error Error: Could not enable camera
That error is occurring right at the very start of raspimjpeg starting up and it is failing to make any connection to the camera.

What OS are you using? What version of RPi Cam are you using? Do you have any other camera apps running, as that might block raspimjpeg? Before trying to start RPi cam can you successfully use raspivid as that is connecting to the camera in a similar way?

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

Re: RPi Cam Web Interface

Thu Mar 26, 2015 6:35 am

btidey wrote:Currently the camera settings controls on the main page are a one way trip as they had no knowledge of current values. This made it trickier to know what one was changing from.
i think here is a bug, raspimjpeg is also korrect an the link is created.
Attachments
bug.JPG
bug.JPG (40.92 KiB) Viewed 2731 times

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

Re: RPi Cam Web Interface

Thu Mar 26, 2015 12:06 pm

Another noob here...

Having trouble changing parameters of any control settings within the web interface.

I'm using the latest versions of Safari and Firefox under Mac OS 10.10.2. Also have 4.4.1R of the RPi_Cam Control.

In Firefox, I can get into each field by right-clicking and using Select All, but cannot type anything into the filed. In Safari, I cannot select anything at all.

I'd also like to be able to change the "mycam@servername" as well. If not, it's not a big deal.

I also tried changing parameters in the raspimjepg file directly, but, being a noob, it won't let me overwrite the file.

Thanks in advance for your help.

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

Re: RPi Cam Web Interface

Thu Mar 26, 2015 1:47 pm

0lly wrote:
btidey wrote:Currently the camera settings controls on the main page are a one way trip as they had no knowledge of current values. This made it trickier to know what one was changing from.
i think here is a bug, raspimjpeg is also korrect an the link is created.
Not seeing that myself at the moment. However, looking at raspimjpeg config is not enough. Both raspimjpeg and the web interface read /etc/raspimjpeg AND the external config file uconfig which is in the /var/www folder. They are in the same format but uconfig only contains values which have been changed. /etc/raspimjpeg is never changed by the web and can be regarded as a 'factory default'. You can get back to this by the 'System -> reset settings' button.

So I suspect uconfig has got those funny values in. Selecting one of the resolution presets should set them to sensible numbers.

If you find a way of getting those numbers wrong by some means please let me know. There were quite a lot of changes to mak ehtis work and it is always possible one of the other controls is wrong.

Edit: Just spotted that was the uconfig you posted. Still try setting the default and then editing again. I'll try to reproduce.

Edit2: OK found it, Cut and paste error. Fixed on Github. If you want to fix it locally just edit /var/ww/index.php On Line 194 both names for video fps should be 'video_fps' rather than one of them being video_width
Last edited by btidey on Thu Mar 26, 2015 2:15 pm, edited 2 times in total.

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

Re: RPi Cam Web Interface

Thu Mar 26, 2015 2:01 pm

boomlikethat wrote:Another noob here...

Having trouble changing parameters of any control settings within the web interface.

I'm using the latest versions of Safari and Firefox under Mac OS 10.10.2. Also have 4.4.1R of the RPi_Cam Control.

In Firefox, I can get into each field by right-clicking and using Select All, but cannot type anything into the filed. In Safari, I cannot select anything at all.

I'd also like to be able to change the "mycam@servername" as well. If not, it's not a big deal.

I also tried changing parameters in the raspimjepg file directly, but, being a noob, it won't let me overwrite the file.

Thanks in advance for your help.
Others have also mentioned about not being able to change parameters. This some local browser issue probably associated with local css or java script set up.

Look at http://www.raspberrypi.org/forums/viewt ... start=1333 for some tests you can do.

It might also be worth trying Chrome as well.

To edit the file you need su privileges. So

Code: Select all

sudo nano /etc/raspimjpeg
raspimjpeg needs to be stopped and restarted to pick up the new settings.

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

Re: RPi Cam Web Interface

Thu Mar 26, 2015 3:49 pm

btidey wrote: Edit2: OK found it, Cut and paste error.
;)
ok,next i miss a 'ok'-button ?
ok.JPG
ok.JPG (21.29 KiB) Viewed 2639 times
Edit
White Balance is not static,edit to Auto, go to edit scheduler and go back to Cammera Settings.
balance.JPG
balance.JPG (12.18 KiB) Viewed 2631 times

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

Re: RPi Cam Web Interface

Thu Mar 26, 2015 4:22 pm

0lly wrote:
btidey wrote: Edit2: OK found it, Cut and paste error.
;)
ok,next i miss a 'ok'-button ?
ok.JPG
Edit
White Balance is not static,edit to Auto, go to edit scheduler and go back to Cammera Settings.
balance.JPG
Thanks for those. Both fixed now on Github.

Note there is a small trap for the unwary on custom background colour. This specifies a custom colour instead of the fixed v2 black, but it won't take effect unless the Background is On under Annotation.

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

Re: RPi Cam Web Interface

Thu Mar 26, 2015 7:15 pm

Pi with Pi CAM-+ TV, possible conferencing unit?

Would it be possible to use this, with a usb mic and hdmi tv to run as a ip conferencing unit?
H264 or pertentially H265 would be good for video and opus would be good with audito.

Now you just hook this up to your TV and you may have a good Ip conf unit with you parents, family around world.

This will be with or without some SIP software.
Thanks

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

Re: RPi Cam Web Interface

Fri Mar 27, 2015 12:54 am

btidey wrote:Both fixed now on Github.
many Thanks :D

Sephiron
Posts: 13
Joined: Fri Mar 27, 2015 11:10 am

Re: RPi Cam Web Interface

Fri Mar 27, 2015 11:48 am

Hello.
First of all, thanks for such a great project. I able to set everything up and running in a few hours. There are some things that my current project needs, that I am slightly unclear about.
First of all: after video is recorded with motion detection, there is a step where it is getting processed- Am I correct to understand that it is getting compressed? If I set the "MP4Box false" as suggested, then I can't see the video. What do I need to do to see the video if it was not "boxed" after recording? How much bigger will the video file be if it is not "boxed"?
Also it seems that the program crashes if it runs for too long (it created a lot of small video files in motion detection mode), what could cause it and is there a way to fix it from config file? I am using basically default version that comes from repo, just added scripts for servos.

Edit: are there any recommendations as to what I should change in motion.conf to make camera work better as a surveillance camera? Also, is there any script or a project which I can use to edit the conf file from the webpage or do I need to write one for myself?

P.S. As I refresh the webpage, the servos got to some default position, which I didn't like, since I wanted for camera to remain in a steady position. Is there some easy way to enable that? I haven't found one, so I tried doing it myself. Hope this helps, if somebody else is also experiencing the same problem:
To fix the problem I added two scripts. First to the index.php, after the line "<script src="pipan.js"></script>":

Code: Select all

<?php
      $tr = fopen("FIFO_pipan", "r");
      if($tr){
    while(($line = fgets($tr)) != false){
      $vals = explode(" ", $line);
      if($vals[0] == "servo"){
          echo '<script type="text/javascript">init_pt(',$vals[1],',',$vals[2],');</script>';
      }
    }
      }
    ?>
and the corresponding function to the the pipan.js:

Code: Select all

function init_pt(p,t){
  pan = p;
 tilt = 2*t-240;
}
for some reason, if I just used tilt from the one that is saved to FIFO_pipan, then the camera just starts looking in weird directions, after a few experiments I came up with the formula and it started working properly. With this the camera continues to look at the same spot even if the webpage is refreshed from remote location.

P.P.S. When there are a lot of video files in /media folder, then sifting through them can be quite painful, so I modified the preview.php file slightly to make that process easier. My code is atrocious, but at least it works properly, as it sorts the stored files by months and days, so finding the file you need is much easier. I have added it as an attachment. Does anybody have better solutions for it?
Attachments
preview.zip
(1.25 KiB) Downloaded 46 times

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

Re: RPi Cam Web Interface

Fri Mar 27, 2015 2:09 pm

Sephiron wrote:Hello.
First of all, thanks for such a great project. I able to set everything up and running in a few hours.
Quite a lot of questions there! I think you are using the original silvanmelchior code as described in the wiki. It was the difficulty of managing the preview page that started me making some modifications which are available at https://github.com/roberttidey/RPi_Cam_Web_Interface

Video processing / Mp4Box. This is relevant to all video recording not just motion triggered. The video is captured and stored in raw h264 format. That is compressed but does not have a wrapper around it that allows it to be played by most players including browsers. The MP4Box process reformats the h264 file into a mp4 format. It does not re-encode the data just wraps it up as a media file. MP4Box false disables this and is only useful if you are going to post-process the files somewhere else. My version of this has a third option'background' that allows the MP4Box processing to be done in the background so you don't see the 'video processing' state in the web interface.

Getting motion config set up is key to avoiding too many small and false recordings. See the post a few above this one to get some ideas on this.

My version has access to most of the config from the web pages now allowing it to be tuned up without resorting to text editing files.

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

Re: RPi Cam Web Interface

Fri Mar 27, 2015 5:23 pm

Added some more automation functions into scheduler and relaid out the screen a bit to accommodate more config.

This now runs a periodic management task (default once per hour). This can include a user command and automated purging of old files. The purge settings are off by default and it will only delete files that have thumbnails with the correct naming in its media folder.

Note that if the software is updated then scheduler must be stopped and started from its screen to make sure it is running the new version.
Attachments
schedule5.jpg
schedule5.jpg (51.85 KiB) Viewed 2458 times

Return to “Camera board”