User avatar
Mettauk
Posts: 238
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: RPi Cam Web Interface

Thu Feb 12, 2015 6:31 pm

Danieltuin1990 wrote:
Danieltuin1990 wrote:I've got a problem with loading the image. Raspimjpeg seems to be broken?!
Followed the instructions, but when installing its says:

Code: Select all

raspimjpeg: no process found
This message comes up during installation but after a few seconds the install continues..
So just checking you have allowed the install to run on.
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

Kanga-Who
Posts: 4
Joined: Thu Feb 12, 2015 3:15 am

Re: RPi Cam Web Interface

Fri Feb 13, 2015 2:43 am

Mettauk wrote:
Kanga-Who wrote:Hi all,

I'm having an issue getting the boot settings to stick with my new B2. I have a B+ running RPi cam v 4.2.3, and can navigate to 'cd RPi_Cam_Web_Interface/etc/raspimjpeg/' and 'run sudo nano raspimjpeg', and change the boot config and rename the camera and have it boot in 'night' mode'.
You seem to be editing the wrong file... Try

Code: Select all

sudo nano /etc/raspimjpeg
is the correct one, not as you have it in your post as; RPi_Cam_Web_Interface/etc/raspimjpeg/ that's the wrong file.
Thanks so much, I did have that saved in my little txt doc with shortcuts, but for some reason thought I needed to be in the RPi_Web_Cam_Interface directory to run it.

Very much appreciated the prompt response.

Also, I use the 'myipaddress:port/clean.php' and it works on my B+, but the same address on the B2 does not work, is there a work around for this? Loving the B2 so far!

User avatar
Mettauk
Posts: 238
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: RPi Cam Web Interface

Fri Feb 13, 2015 11:06 am

Kanga-Who wrote: Also, I use the 'myipaddress:port/clean.php' and it works on my B+, but the same address on the B2 does not work, is there a work around for this? Loving the B2 so far!
Not sure clean.php exists any more but look at
http://elinux.org/RPi-Cam-Web-Interface ... n_homepage
You can create your own!
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

ludespeedny
Posts: 103
Joined: Mon Oct 01, 2012 6:55 pm

Re: RPi Cam Web Interface

Fri Feb 13, 2015 8:13 pm

Can someone explain how to get the motion detection working? I click to start the motion detection and it never seems to do anything. I also want to save the images to my user home folder do I just redirect the paths in the motion.conf file?

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

Re: RPi Cam Web Interface

Fri Feb 13, 2015 8:51 pm

Motion detection works by starting up the motion process when you press that button and then feeding motion with a stream of mjpeg images for it to work on. When motion detects a difference then it sends a start capture command back to the raspimjpeg process which then starts capturing the video. Likewise when motion detects things have stabilised then it sends a stop command back to the raspimjpeg process.

So the actual capture is being done by raspimjpeg not by motion. The location of the stored data is arranged for the web interface The config parameters are in the /etc/raspimjpeg config file including the file paths to media directories. Rather than mess around with that just create a symbolic link in your home folder.

The parameters for the motion detection are in the /etc/motion/motion.conf file which should be largely set up.This has a lot of stuff in it but the most interesting parts are in the # Motion Detection Settings: area and in the #External Commands area. The latter should have on_event_start echo 'ca 1' > /var/www/FIFO and on_event_end echo 'ca 0' > /var/www/FIFO as the start and stop capture commands.

The netcam_url and netcam_userpass may need checking.

Two ways of debugging this area are by using a terminal window and the ps -A command When motion detect is on then there should be a process called motion in the list. When you turn motion detection off then this should not be in the list.

Secondly you can manually issue the echo -n 'ca 1' >/var/www/FIFO and the echo -n 'ca 0' >/var/www/FIFO from the command line and you should see the video capture start and stop.
Last edited by btidey on Fri Feb 13, 2015 9:01 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Fri Feb 13, 2015 9:01 pm

I have been doing a bit of work on a python helper program for this excellent camera app / web interface.

The primary purpose is to automate switching modes so that turning motion detection on and off and going into night mode can be automated and based on sunrise and sunset timings. I used to use a separate sunwait program to do some of this but it wasn't very flexible so I have moved it into a python program RaspiCam.py which then allows altering the logic more simply.

The code and documentation are at https://github.com/roberttidey/RaspiCam

One thing I have noticed in doing this is that the raspimjpeg process is a bit asymmetric comparing video capture and time lapse. In the former case it remembers that it was triggered by motion detection and returns to that state when finished. The same is not true for time lapse which sort of half-returns to non-motion detection, making it a little bit trickier to use as a response to motion triggers.

ludespeedny
Posts: 103
Joined: Mon Oct 01, 2012 6:55 pm

Re: RPi Cam Web Interface

Fri Feb 13, 2015 9:06 pm

The netcam url is http://localhost/cam_pic.php is that correct? The rest looks fine to me for the motion settings and I have it set to "best".
When I start motion detection I never see it show up using ps -A.

Also I created the symlink, but the permissions are for the root user and I would like to have access as the pi user accessing via samba.

ludespeedny
Posts: 103
Joined: Mon Oct 01, 2012 6:55 pm

Re: RPi Cam Web Interface

Fri Feb 13, 2015 9:13 pm

Ok, I got the video working (I forgot I changed the port to 8081) so changed the netcam url to localhost:8081 etc.. I am still not getting images from the motion though.

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

Re: RPi Cam Web Interface

Fri Feb 13, 2015 9:19 pm

Have you checked username password in motion.conf? I think the defaults for everything else are OK (unless you change ports) which you have fixed.

ludespeedny
Posts: 103
Joined: Mon Oct 01, 2012 6:55 pm

Re: RPi Cam Web Interface

Fri Feb 13, 2015 9:22 pm

yeah, there is no username/password, but did find the tmp location was /tmp/motion and checked there and that is where it was saving the images, so changed that to go to the /var/www/media folder and appears to be working right now.

everything is saved with only the root permissions, is this normal? how do I give the pi user access to the media folder?

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

Re: RPi Cam Web Interface

Fri Feb 13, 2015 9:43 pm

I'm not sure about the change /tmp/motion. That doesn't sound right to me.

motion retrieves its input stream from the web server using the url cam_pic.php and providing the url and the username password is Ok then that is all motion needs to do the basic motion detection and provide the triggers.

The data in the media folder is owned by root but there is a read access for everybody so shouldn't be a problem if you are just trying to read stuff.

NeXCtP
Posts: 4
Joined: Sat Feb 14, 2015 6:47 pm

Re: RPi Cam Web Interface

Sat Feb 14, 2015 7:00 pm

Hi,

I love this software, but I have a request or I need help :)

Is it possible to specify another folder for time-lapse images?
This should not influence the location of single images.

My rig is an underwater camera that I also want to use on land.
However, when I run time laps over a couple of days and end up with anywhere from 3000 to 50 000 images (Depending on the interval setting). My Pi cannot handle more than 3-4000 files in a single folder. LS/CP/RM returns an error.
Since there is little point in viewing time-laps images “on the fly”, this folder does not need to be visible on the preview page.

Could anyone point me in the right direction?


Bst Rgrds,
NeXCtP

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

Re: RPi Cam Web Interface

Sat Feb 14, 2015 10:24 pm

I've been tweaking the recorded files section of the web page a bit as I was finding it a bit tedious to check the recordings just from the filename list.

The attachment shows where I have got so far. It gives a more tabular view with a thumbnail and a delete button for each recording. Clicking on the recording number brings up the full size player as before.

Thumbnails appear for recorded images and for videos recorded via motion detection as at the moment I am using the motion process to produce those.

The change requires replacing the preview.php file in /var/www, adding a couple of icon files, and making a couple of changes to motion.conf in /etc/motion.

Details for this and the files are at https://github.com/roberttidey/RaspiCam

This change can work with the python helper program but does not depend on it.

Edit1:
Couple of extra improvements added.
Proper thumbnails generated for Image files to avoid downloading large files.
Thumbnails generated even for manually recorded material.

The extra thumbnail generation is done using ffmpeg and is currently done on the fly for any new material that doesn't have a thumbnail so it can cause a delay of a few seconds when switching into the download list. Once any new thumbnails are generated then switching is faster.
Attachments
preview.jpg
preview.jpg (27.33 KiB) Viewed 4216 times

AlexYoung29
Posts: 1
Joined: Fri Feb 13, 2015 11:46 am

Re: RPi Cam Web Interface

Sun Feb 15, 2015 12:28 pm

Does this work with a usb camera? If i do lsusb i can see the webcam listed

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

Re: RPi Cam Web Interface

Sun Feb 15, 2015 4:38 pm

'motion' works with any video source including a webcam if it has a linux driver (eg. you have a device like /dev/video0 listed). The RPi Cam Web Interface works only with the R-Pi camera, because it uses the MMAL interface specific to that device.

chenks
Posts: 21
Joined: Mon Feb 02, 2015 9:50 am

Re: RPi Cam Web Interface

Sun Feb 15, 2015 6:00 pm

the rotation option on the webpage doesn't seem to be working for me.
i'm selecting 180 from the drop-down box, but nothing happens (same for any other option in that dropdown box).
the flip options also seem to do nothing.

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Sun Feb 15, 2015 10:04 pm

Love this. how about adding a 'Select' File(s) & 'Select All' like the 'Delete All' with an option to download the selected files? That would be awesome.
btidey wrote:I've been tweaking the recorded files section of the web page a bit as I was finding it a bit tedious to check the recordings just from the filename list.

The attachment shows where I have got so far. It gives a more tabular view with a thumbnail and a delete button for each recording. Clicking on the recording number brings up the full size player as before.

Thumbnails appear for recorded images and for videos recorded via motion detection as at the moment I am using the motion process to produce those.

The change requires replacing the preview.php file in /var/www, adding a couple of icon files, and making a couple of changes to motion.conf in /etc/motion.

Details for this and the files are at https://github.com/roberttidey/RaspiCam

This change can work with the python helper program but does not depend on it.

Edit1:
Couple of extra improvements added.
Proper thumbnails generated for Image files to avoid downloading large files.
Thumbnails generated even for manually recorded material.

The extra thumbnail generation is done using ffmpeg and is currently done on the fly for any new material that doesn't have a thumbnail so it can cause a delay of a few seconds when switching into the download list. Once any new thumbnails are generated then switching is faster.
3b+, 2b, b+, b, Zero & Zero-W

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Sun Feb 15, 2015 10:09 pm

Today I've done a 11 hours timelapse taking a picture every 8 seconds. I thought I'd share... Credit given to Silvan for this amazing project.

http://youtu.be/hkWVlfBXYh4
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Sun Feb 15, 2015 10:51 pm

Gary Littlemore wrote:Love this. how about adding a 'Select' File(s) & 'Select All' like the 'Delete All' with an option to download the selected files? That would be awesome.
btidey wrote:I've been tweaking the recorded files section of the web page a bit as I was finding it a bit tedious to check the recordings just from the filename list.
I started doing a version with check boxes per files and then actions as that would be nice. It's a little bit trickier as I would normally have used POST to pass the file list whereas the current page is set up using GET so I did the simplified one first as at least one can do relatively quick deletes rather than go through full previews.

It is possible to either switch over to POST or use GET array syntax so I may revisit the select version later when I get a moment.

chenks
Posts: 21
Joined: Mon Feb 02, 2015 9:50 am

Re: RPi Cam Web Interface

Mon Feb 16, 2015 7:56 am

chenks wrote:the rotation option on the webpage doesn't seem to be working for me.
i'm selecting 180 from the drop-down box, but nothing happens (same for any other option in that dropdown box).
the flip options also seem to do nothing.
update on this.
the settings work when using Chrome on windows (v40.x), but they don't work when using Chrome on mac (v40.x).

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

Re: RPi Cam Web Interface

Mon Feb 16, 2015 11:06 pm

Few more tweaks to the preview page. Adding selection checkboxes and explicit preview and delete buttons.
Global buttons allow select all, select none, and delete selected, in addition to the previous delete all.

Files on Github updated. Seems to work but I haven't given it much testing yet.

File download still just the preview one at the moment.
Attachments
preview2.jpg
preview2.jpg (30.53 KiB) Viewed 3946 times

scanner
Posts: 15
Joined: Tue Dec 23, 2014 4:25 pm

Re: RPi Cam Web Interface

Tue Feb 17, 2015 12:04 pm

I'm new to all this and having problems with the motion detection not working on rpi 2 b
I have installed from fresh, twice so far, the first time I managed to get the motion detection to work by accident. I installed a mixture of this web interface and mmal now after a fresh install of noobs the motion detection does not record, all the other web buttons work I cannot remember what I did to get it working.
I have no security settings and everything is default except for the enabling motion to work on startup
any suggestions?

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

Re: RPi Cam Web Interface

Tue Feb 17, 2015 1:00 pm

Some basic debugging steps so you can discover where the problem might be.

1) With motion detection off then use the command ps -A in a terminal window. This gives a list of processes running. This should NOT include motion.

2) Now turn on motion detection from the web interface. Doing a second ps -A in the terminal window and you should now see motion in the list probably near the bottom. You can repeat turning detection on and off and motion should only be in the list with detection on. This proves that motion is being started and stopped OK by the camera interface.

3) With motion detection off, issue a command echo 'ca 1' >/var/www/FIFO The web interface should show that capture has started.

4) Now issue a command echo -n 'ca 0' >/var/www/FIFO and the capture should stop. These 2 commands are what motion issues when it detects motion to control the actual capture.

If those steps are working then the problem is either in motion retrieving the image stream that it works with or in the actual motion detection parameters. You can check the first by checking the url defined in the /etc/motion/motion.conf file under netcam_url If you paste this url into a browser and replace localhost by the ip address of the camera then you should get back a single image frame from the camera.

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Tue Feb 17, 2015 1:04 pm

Have you changed the port number in the following:

/etc/apache2/ports.conf
/etc/apache2/sites-enabled/000-default

If so, did you also change the port number in the following:

/etc/motion/motion.conf
scanner wrote:I'm new to all this and having problems with the motion detection not working on rpi 2 b
I have installed from fresh, twice so far, the first time I managed to get the motion detection to work by accident. I installed a mixture of this web interface and mmal now after a fresh install of noobs the motion detection does not record, all the other web buttons work I cannot remember what I did to get it working.
I have no security settings and everything is default except for the enabling motion to work on startup
any suggestions?
3b+, 2b, b+, b, Zero & Zero-W

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Tue Feb 17, 2015 1:07 pm

Great work, could this have a push-request with https://github.com/silvanmelchior/RPi_Cam_Web_Interface ?
btidey wrote:Few more tweaks to the preview page. Adding selection checkboxes and explicit preview and delete buttons.
Global buttons allow select all, select none, and delete selected, in addition to the previous delete all.

Files on Github updated. Seems to work but I haven't given it much testing yet.

File download still just the preview one at the moment.
3b+, 2b, b+, b, Zero & Zero-W

Return to “Camera board”