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

Re: RPi Cam Web Interface

Wed Jul 13, 2016 11:58 am

Pangu wrote:Does it matter how much RAM I assign to the GPU of the RPi for this RPi Cam Web Interface? I'd like to assign the minimum needed RAM to my GPU which is 16MB. So I have plenty of RAM available for Rasbpian Jessie OS. Will that affect RPi cam Web interface somehow negatively?
The camera / video recording needs substantial GPU RAM to operate properly particularly when using the higher resolutions. This is not directly to do with this interface but operation of the camera itself. I wouldn't go much below 128MB for normal use. Some people have pared that down a little bit (e.g. on a Model A which has less memory) but then use lower resolutions.

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

Re: RPi Cam Web Interface

Wed Jul 13, 2016 12:19 pm

Pangu wrote: Another think I could suggest to you for the next update if you have some free time to implement :)

On one of my RPi's I am using has connected the Raspberry Pi Cam v2.1 8MP. This camera supports images of 3280 × 2464 pixels. To get the maximum possible I needed to modify following files and lines to support this higher resolution in RPi Cam Web Interface:

/etc/raspimjpeg (line 78-79)

Code: Select all

image_width 3280
image_height 2464
/var/www/index.php (line 230-235)

Code: Select all

                             <option value="1920 1080 25 25 3280 2464">Select option...</option>
                                 <option value="1920 1080 25 25 3280 2464">Full HD 1080p 16:9</option>
                                 <option value="1280 0720 25 25 3280 2464">HD-ready 720p 16:9</option>
                                 <option value="1296 972 25 25 3280 2464">Max View 972p 4:3</option>
                                 <option value="768 576 25 25 3280 2464">SD TV 576p 4:3</option>
                                 <option value="1920 1080 01 30 3280 2464">Full HD Timelapse (x30) 1080p 16:9</option>
I replaced the default width value 2592 by 3280 and
I replaced the default heigh value 1944 by 2464

The default values were 2592x1944 and I replaced them by 3280x2464

Maybe you could integrate a configuration option so the user can choose if he uses the RPi cam v1 or v2.

Cheers,
Pangu
The width / height values in /etc/raspimjpeg are the default values before any custom changes are made via the web interface. Those changes are stored in uconfig (in the install folder) and override the values in /raspimjpeg.

You can just enter custom values on the web interface (e.g. 3280 x 2464) and they will then be saved and used from then on. The presets are just a convenient shortcut. You can also load a preset as a starting point and then customise the values and press OK. It is not obvious what is the 'best' way to handle the actual preset values as not everyone will have the same view on what suits them irrespective of whether they have a v1 or v2 camera.

I have a couple of ideas for improvements here. One is to separate out the presets into a separate config that users could edit themselves.

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Wed Jul 13, 2016 12:40 pm

Ok, thanks for listening.

The other issue I have still is unresolved for me and maybe you can give me a hint how to beat that.

I am creating a timelapse over a whole day (or severals) that will produce lots of images. How should I concatenate these images afterwards so I can get a video playback of the timelapse? Actually the "CONVERT" button will not work as it will time-out and the produced video (if it will be stored at all) is not read-/viewable because it's somehow corrupted. Is there any other solution you can suggest to me? It would be nice if I could start the conversion progress through the RPi Cam Web Interface, but somehow this does not work. Maybe I need to adjust the command "avconv ..." ?

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

Re: RPi Cam Web Interface

Wed Jul 13, 2016 3:20 pm

Pangu wrote:Ok, thanks for listening.

The other issue I have still is unresolved for me and maybe you can give me a hint how to beat that.

I am creating a timelapse over a whole day (or severals) that will produce lots of images. How should I concatenate these images afterwards so I can get a video playback of the timelapse? Actually the "CONVERT" button will not work as it will time-out and the produced video (if it will be stored at all) is not read-/viewable because it's somehow corrupted. Is there any other solution you can suggest to me? It would be nice if I could start the conversion progress through the RPi Cam Web Interface, but somehow this does not work. Maybe I need to adjust the command "avconv ..." ?
The current convert does work for a smallish number of time lapse images, but does struggle with larger numbers particularly if they are high resolution.

1.The download to convert them on a PC is now much faster. I did a test with 1700 full res captures and it took 180 seconds to zip and 80 seconds to download the zip to the client PC

2. It is good to set the capture resolution to resolution of the video required and keep that as low as possible.

3. I am working on figuring out a gstreamer command line to replace the avconvert which should speed up the raspberry based conversion. As soon as I get a suitable pipeline and it shows improvement then I'll add that in.

While doing the test in 1) I found a bug if the time lapse interval is set to 1 second or less. This can result in timestamps of files being the same which was causing a problem in identifying all the files in a time lapse batch. I have got a fix for that which I'll include on next update.

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

Re: RPi Cam Web Interface

Thu Jul 14, 2016 3:00 pm

Few updates in most recent version.

1. uPresets.html - This is an optional file in the web install folder. If present then it controls the list of camera format presets available under camera settings. An example version of this is included in the install (uPresetsV2.html). If edited and renamed then it will take effect.

2. Commands into the FIFO pipe. Previously these were simple unterminated strings. This carried a small risk that partial commands would get actioned although I haven't seen that myself under normal use. Commands can now be terminated with LF and this is recommended for future use although unterminated ones continue to be supported. This means that echo does not need the -n option any more.

3. Multiple command FIFO pipes are now supported. This different sources of commands to use different pipes and avoid any clashes. The main pipe remains FIFO. Additional pipes called FIFO11 to FIFO19 may be used. There is no difference between these; commands will be recognised on any of these. The installer just creates FIFO11. If you want further ones then just create them; they will be recognised next time the camera is started.

4. An img_start macro has been added. If present this is called just before an image is captured to complement the end_img macro called after an image is captured.

anglaborg
Posts: 15
Joined: Thu Jun 02, 2016 4:53 pm

Re: RPi Cam Web Interface

Thu Jul 14, 2016 5:47 pm

btidey wrote:
There are a few differences here but probably the one causing the problem is

videodevice /dev/video0

In mine this is commented out (# or ; at front)

This is telling motion to collect its comparison data from a real video device like a webcam and although the netcam_url is also set up I suspect that motion is trying to use the video device.

The install.sh script does comment out videodevice but if you used the RPi_Cam_Web_Installer method it is possible this didn't get done. Wiki recommends using the install.sh method and that is the only one I maintain.

Also the height and width lines are set to 1080 and 1920. These actually get ignored when the netcam_url method is working but I emphasise again that any settings in motion.conf have nothing to do with how the video is actually captured.

Try commenting out that line in /etc/motion/motion.conf
Changed the /dev/video0 line to

Code: Select all

# Videodevice to be used for capturing  (default /dev/video0)
# for FreeBSD default is /dev/bktr0
; videodevice /dev/video0
Is that right?

Do you think it would be good to run the install.sh too?

User avatar
xaver
Posts: 20
Joined: Thu Dec 10, 2015 3:35 pm
Location: Czech Republic

Re: RPi Cam Web Interface

Thu Jul 14, 2016 7:38 pm

Hello,

I am using two raspberry Pis with cameras to watch my frontgate and backyard. I partially wrote, partially used other scripts and made this:

Code: Select all

<html>
  <head>
    <title>Fabrika - security system</title>
    <script src="script_min.js"></script>
  </head>
  <body bgcolor=#6699cc onload="setTimeout('init();', 100);">
    <center>
     <div><img id="mjpeg_dest" />
     <img id=frontgate src="http://192.168.1.9:97/cam/cam.jpg">
        <br>
     <a href=cam/index.php>BackYard</a> <a href=http://192.168.1.9:97/cam/index.php>FrontGate</a>
</div>
<script>
setInterval(function() {
    var myImageElement = document.getElementById('frontgate');
    myImageElement.src = 'http://192.168.1.9:97/cam/cam.jpg?rand=' + Math.random();
}, 50);</script>

    </center>
 </body>
</html>
which runs on BackYard device. It shows a stream captured from the device itself and downloads + refreshes the picture from the other device, so it seems like two simultaenous streams.

I would like to make those pictures go fullscreen onclick, such as it is on the default CWI homepage, but I was unable to reproduce the same output when I used parts of code from RPI CWI. How should I proceed with that?


The other and much more important question is about the motion detection. While the internal motion detection is great, I would like to use PIR sensors. I know I can set the detection mode to external in CWI, but what to do next to make the system record a video on movement?

thank you, Filip.

nospam
Posts: 54
Joined: Sun Jun 14, 2015 10:38 pm

Re: RPi Cam Web Interface

Thu Jul 14, 2016 8:35 pm

Pangu wrote:Ok, thanks for listening.

The other issue I have still is unresolved for me and maybe you can give me a hint how to beat that.

I am creating a timelapse over a whole day (or severals) that will produce lots of images. How should I concatenate these images afterwards so I can get a video playback of the timelapse? Actually the "CONVERT" button will not work as it will time-out and the produced video (if it will be stored at all) is not read-/viewable because it's somehow corrupted. Is there any other solution you can suggest to me? It would be nice if I could start the conversion progress through the RPi Cam Web Interface, but somehow this does not work. Maybe I need to adjust the command "avconv ..." ?
I did something similar - made a HD video time-lapse using RasPi snapshots taken every 10 minutes 24/7 for a year. My images were 2592x1944 jpegs. I used a sourceforge project called "makeavi" to convert the stills into a movie file. I then compressed the video file using handbrake to make it manageable. I ended up with a 1GB video file after compression. Lots of RAM, a fast CPU and a big fast HD will be your best friend.

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

Re: RPi Cam Web Interface

Fri Jul 15, 2016 10:29 am

I have now made the time lapse convert on the Raspberry Pi use a gstreamer pipeline which makes it much faster then the previous avconvert.

This will only work on a Jessie install which has the base gstreamer support and only needs gstreamer-tools. You must use the ./install.sh method unless you want to manually install gstreamer1.0-tools

A 500 shot sequence at 640 x 480 converted in a few seconds. I am doing some more tests at higher resolutions but I wouldn't use images above HD video as I suspect that will cause GPU memory problems.

Edit: A second test at 1280 x 960 with 1900 images converted successfully in 58 seconds (on a Pi2) which I think is pretty good. I think higher resolutions may be less stable. It might be interesting to try with a Pi3 and aso playing around allocating more memory to GPU.

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

Re: RPi Cam Web Interface

Mon Jul 18, 2016 9:17 am

Is anyone running the RPi Cam Web Interface on the new Pi Zero with the camera port? What's it like? Is it powerful enough to run it fine?
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Mon Jul 18, 2016 8:03 pm

I want to schedule timelapse for daylight only (dawn to dusk) but I am failing to understand the scheduler or its only for motion capture?

Can anyone help with something along the lines of still capture every 15 mins dawn to dusk using RPi Cam?

Thanks
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

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

Re: RPi Cam Web Interface

Mon Jul 18, 2016 8:22 pm

Gary Littlemore wrote:Is anyone running the RPi Cam Web Interface on the new Pi Zero with the camera port? What's it like? Is it powerful enough to run it fine?
Running RPI Cam on a Pi 0 with old camera module set fo full view 792p with wifi and solar charged battery power. Only been running for 12 hours so far but all seems fine.... fingers crossed
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

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

Re: RPi Cam Web Interface

Mon Jul 18, 2016 8:28 pm

Mettauk wrote:
Gary Littlemore wrote:Is anyone running the RPi Cam Web Interface on the new Pi Zero with the camera port? What's it like? Is it powerful enough to run it fine?
Running RPI Cam on a Pi 0 with old camera module set fo full view 792p with wifi and solar charged battery power. Only been running for 12 hours so far but all seems fine.... fingers crossed
Cheers, I'm going to order tomorrow then.
3b+, 2b, b+, b, Zero & Zero-W

rhabyt
Posts: 4
Joined: Wed Jul 20, 2016 6:44 pm

Re: RPi Cam Web Interface

Wed Jul 20, 2016 6:56 pm

I can't get a basic installation of RPi Cam Web Interface working. I've now plowed 8 hours into this. Can someone please help?

Started with NOOBS 1.92 (downloaded July 16, 2016) which I installed.
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Then I went to Raspberry Pi Configuration, enabled the camera, and rebooted

At this point, pi@raspberrypi:~ $ raspistill -o cam.jpg gives me a good image.

Also, running the Python 3 example:
from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview()
sleep(10)
camera.stop_preview()
works great. I see a picture from the camera for 10 seconds. So hardware seems good.

Then I followed the RPi-Cam-Web-Interface installation instructions here: http://elinux.org/RPi-Cam-Web-Interface
Following the Basic Instructions (can't use the Original Installation Method becausee I have Jessie).
First (Step 3) I update my RPi with
sudo apt-get update
sudo apt-get dist-upgrade
it upgraded
The following packages will be upgraded:
dmsetup dpkg dpkg-dev firmware-atheros firmware-brcm80211 firmware-libertas
firmware-ralink firmware-realtek gir1.2-gdkpixbuf-2.0 initramfs-tools
libavcodec56 libavformat56 libavresample2 libavutil54
libdevmapper-event1.02.1 libdevmapper1.02.1 libdpkg-perl libexpat1
libexpat1-dev libgd3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libksba8
liblvm2app2.2 libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc
libraspberrypi0 libsmbclient libssl1.0.0 libswscale3 libwbclient0
libxapian22 libxml2 libxslt1.1 openssl perl perl-base perl-modules
python-picamera python3-picamera raspberrypi-bootloader raspberrypi-kernel
samba-common samba-libs tzdata xarchiver
47 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
....(snip)
This included the lines:
Get:46 http://archive.raspberrypi.org/debian/ jessie/main python-picamera armhf 1.11 [120 kB]
Get:47 http://archive.raspberrypi.org/debian/ jessie/main python3-picamera armhf 1.11 [118 kB]

Then (Step 4), I clone the code from github
git clone https://github.com/silvanmelchior/RPi_C ... erface.git
cd RPi_Cam_Web_Interface
chmod u+x *.sh
./install.sh
which ended on the blue Configuration Options screen telling me I had RPi Cam v6.2.10
I left it with the default options
Cam subfolder: html
Autostart:yes
Server:apache
User: (blank)
Password: (blank)

After I hit Y, it says
raspimjpeg: no process found
php: no process found
motion: no process found
then starts reading packages for an installation, from what goes by it looks like apache/mysql/php

Then it goes to a new blue screen labelled Start camera system now. I say Yes.
It starts with
raspimjpeg: no process found
php: no process found
motion: no process found
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
Then says
pi@raspberrypi:~/RPi_Cam_Web_Interface $ mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
The last two line repeat endlessly.

If I try a ^C, it will continue to repeat
If I end the terminal session, open a new one and try
raspistill -o cam.jpg
I get an error:
pi@raspberrypi:~ $ raspistill -o cam.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

Simlarly, if I try the python example, I get an error:
>>>
Traceback (most recent call last):
File "/home/pi/camertest.py", line 4, in <module>
camera = PiCamera()
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 417, in __init__
self._init_preview()
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 496, in _init_preview
self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
File "/usr/lib/python3/dist-packages/picamera/renderers.py", line 512, in __init__
self.renderer.connect(source)
File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 1465, in connect
self._connection = MMALConnection(source, self.inputs[0])
File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 1278, in __init__
prefix="Failed to enable connection")
File "/usr/lib/python3/dist-packages/picamera/exc.py", line 157, in mmal_check
raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources (other than memory)
>>>

I have consistently repeated this sequence (with early successes and then failure after trying to install RPi Cam Web Interface). Tried it three times on my RPi B+ v1.2 and once on my RPi 3 B v1.2

Can anyone help me get this installed? What am I doing wrong?

Thanks

burnhaj
Posts: 24
Joined: Sun Mar 09, 2014 3:43 am

Set capture length to Max_Capture

Thu Jul 21, 2016 1:13 am

I have been a little baffled and have tried just about everything I can think of to figure it out. In the user set up manual notes it says: Max_Capture determines the maximum capture period. If motion sends a start command and doesn’t send a stop command then the scheduler will automatically stop the capture after this interval. This can be used to make all recordings this length by configuring motion never to send stop commands. The scheduler will then always time out and stop the recording. A value of 0 means no timeout.

If I set up Motion to send a start command but not a stop command [change on_event_end to (null)] it won't detect subsequent motion as the event started never ends. I want it to go back to detecting motion and starting capture again after the first capture times out.

If in Scheduler I put in ca 1 for Motion Start and leave Motion Stop blank, the capture starts but never ends, even when timing out.

Am I missing something or can someone point me in the right direction? What I would like to do is to start a video capture on motion detection and have it run for say 20 minutes regardless of whether subsequent motion has been detected. Then when it times out (Max_Capture), it resets and will again start capturing when motion is next detected.

User avatar
xaver
Posts: 20
Joined: Thu Dec 10, 2015 3:35 pm
Location: Czech Republic

Re: RPi Cam Web Interface

Thu Jul 21, 2016 7:15 am

set Frames to stop (or something similar) in motion detection to [number of frames per second] x (60x20)

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

Re: Set capture length to Max_Capture

Thu Jul 21, 2016 9:55 am

burnhaj wrote:I have been a little baffled and have tried just about everything I can think of to figure it out. In the user set up manual notes it says: Max_Capture determines the maximum capture period. If motion sends a start command and doesn’t send a stop command then the scheduler will automatically stop the capture after this interval. This can be used to make all recordings this length by configuring motion never to send stop commands. The scheduler will then always time out and stop the recording. A value of 0 means no timeout.

If I set up Motion to send a start command but not a stop command [change on_event_end to (null)] it won't detect subsequent motion as the event started never ends. I want it to go back to detecting motion and starting capture again after the first capture times out.

If in Scheduler I put in ca 1 for Motion Start and leave Motion Stop blank, the capture starts but never ends, even when timing out.

Am I missing something or can someone point me in the right direction? What I would like to do is to start a video capture on motion detection and have it run for say 20 minutes regardless of whether subsequent motion has been detected. Then when it times out (Max_Capture), it resets and will again start capturing when motion is next detected.
Max_Capture in Scheduler works by sending whatever is in the MotionStop setting if the timeout occurs and a Motion Stop trigger has not been received. You cannot blank the Motion Stop setting out in scheduler as otherwise it doesn't know what to do.

If using External motion then you can null out the on_event_end and then the capture will indeed be terminated by Max_Capture as described and it will return to waiting for the next motion trigger.

If using internal motion then there is no setting to null out the motion stop. Setting stop frame count to the length of recording wanted would sort of work but any extra movement would extend the recording. I might make a small change here to improve this.

However, the better way to achieve a fixed length from a motion start is to use the optional duration parameter on the ca 1 command. E.g. ca 1 1200 will do a 20 minute recording.

Edit: I have updated raspimjpeg so that internal motion is reset if a ca 0 or tl 0 command is received. This means that if a capture is terminated by say a MAX_CAPTURE from scheduler than internal motion is ready for next trigger. It is still better to use the timed ca 1 command.
Last edited by btidey on Thu Jul 21, 2016 12:09 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Thu Jul 21, 2016 10:11 am

rhabyt wrote:I can't get a basic installation of RPi Cam Web Interface working. I've now plowed 8 hours into this. Can someone please help?


I have consistently repeated this sequence (with early successes and then failure after trying to install RPi Cam Web Interface). Tried it three times on my RPi B+ v1.2 and once on my RPi 3 B v1.2

Can anyone help me get this installed? What am I doing wrong?

Thanks
I can'r see anything obviously wrong at the moment. RPi_CAm does install apache and php but not mysql.

The error you are getting is because the raspimjpeg process can't connect to the camera when it is trying to start up. This could be because some other process has got the camera connection and has not released it for some reason. This would explain why the other camera apps fail at that point.

After a reboot do a sudo killall raspimjpeg to make sure no camera process is running from RPi_Cam then try raspistill? Does that work? If yes then try ./start.sh from RPi_Cam folder.

If that doesn't help I would start with a clean OS. raspi-config enable camera etc and then install RPi_Cam without putting any other camera apps on yet. Whilst RPi_Cam is running it has the camera connection so raspistill etc will not work. However, you can stop (and start) the RPI_Cam camera connection from its web interface to allow other apps to use the camera.

rhabyt
Posts: 4
Joined: Wed Jul 20, 2016 6:44 pm

Re: RPi Cam Web Interface

Thu Jul 21, 2016 8:54 pm

Based on this advice from btidey
btidey wrote:
rhabyt wrote: The error you are getting is because the raspimjpeg process can't connect to the camera when it is trying to start up. This could be because some other process has got the camera connection and has not released it for some reason. This would explain why the other camera apps fail at that point.

After a reboot do a sudo killall raspimjpeg to make sure no camera process is running from RPi_Cam then try raspistill? Does that work? If yes then try ./start.sh from RPi_Cam folder.
I ran

Code: Select all

pi@raspberrypi:~ $ sudo killall raspimjpeg
pi@raspberrypi:~ $ raspistill -o cam.jpg
Now I get an image.

Next to start RPi Cam Web Interface:

Code: Select all

pi@raspberrypi:~/RPi_Cam_Web_Interface $ ./start.sh
raspimjpeg: no process found
php: no process found
motion: no process found
bash: php: command not found
That last line worries me. I’m only a beginner, but did php not install correctly? How do I tell?

Just to check if RPi Cam Web Interface is running, I aim my browser at http://10.0.0.13/ (what I get from hostname -I and from ifconfig)
Could not connect: Connection refused
Same for http://localhost/

if I look in /var/www/html, there are clearly some files from RPi Cam Web Interface

Code: Select all

pi@raspberrypi:/var/www/html $ ls
cam_get.php      Copyright.txt  index.php    pipan.php         status_mjpeg.txt
cam.jpg          css            js           preview.php       timelapse.png
cam_pic_new.php  delete.png     loading.jpg  raspimjpeg        unavailable.jpg
cam_pic.php      FIFO           macros       raspizip.sh       updating.jpg
cmd_func.php     FIFO1          media        scheduleLog.txt   uPresetsv2.html
cmd_pipe.php     FIFO11         motion.php   schedule.php      video.png
config.php       fonts          pilight_off  servo_off
convertCmd.txt   image.png      pipan_off    status_mjpeg.php
but no index.html

I know the default webpage changed from /var/www/index.html in Wheezy to /var/www/html/index.html in Jessie. Would that have anything to do with it?

Can I install php after the fact? Or is it already there, but start.sh is just not seeing it?

Thanks again

User avatar
xaver
Posts: 20
Joined: Thu Dec 10, 2015 3:35 pm
Location: Czech Republic

Re: RPi Cam Web Interface

Fri Jul 22, 2016 11:12 am

check if apache service is running.

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

Re: RPi Cam Web Interface

Fri Jul 22, 2016 2:30 pm

rhabyt wrote: I ran

Code: Select all

pi@raspberrypi:~ $ sudo killall raspimjpeg
pi@raspberrypi:~ $ raspistill -o cam.jpg
Now I get an image.

Next to start RPi Cam Web Interface:

Code: Select all

pi@raspberrypi:~/RPi_Cam_Web_Interface $ ./start.sh
raspimjpeg: no process found
php: no process found
motion: no process found
bash: php: command not found
That last line worries me. I’m only a beginner, but did php not install correctly? How do I tell?
index.html is not used. The default start page is set to be index.php

Both Apache and php are installed by the installer. If php is not available then something is seriously wrong.

You can test that php is available by running php --version

Although you can install php separately I would advise against trying that as it is unlikely to be the only problem amd also may not get set up correctly for Apache use.

You could try just running the install.sh again as this is quite harmless and does check and install any prerequisites that are missing. Make sure the config page of the install dialog says apache.

Failing that I'd do the clean install suggested before without installing anything else beforehand.

sej7278
Posts: 249
Joined: Tue Jan 22, 2013 6:43 pm

Re: RPi Cam Web Interface

Sun Jul 24, 2016 3:28 pm

does internal motion detection work yet on jessie?

i can't get it to work with timelapse - i just get the regular 3sec pictures whether there's a change in the photo or not.

how is it supposed to be configured, maybe i'm doing something wrong, i assumed you have to have both timelapse and motion detection enabled.

there doesn't seem to be any way to just take a single photo upon motion, which seems odd, isn't that the whole point?

6.0.37 seems totally different to the elinux instructions.

external motion detection doesn't seem to work either, i get a regular 3secs photo whether there's motion or not.

User avatar
xaver
Posts: 20
Joined: Thu Dec 10, 2015 3:35 pm
Location: Czech Republic

Re: RPi Cam Web Interface

Sun Jul 24, 2016 7:10 pm

I have working internal motion on Jessie, but I don't know about timelapse - I've set it to record a few sec video on frame change.

How did you get external motion working? I would like to set it to work with PIR sensor, asked a question about it here a few days ago but no one answered...

Thank you

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

Re: RPi Cam Web Interface

Sun Jul 24, 2016 9:12 pm

sej7278 wrote:does internal motion detection work yet on jessie?

i can't get it to work with timelapse - i just get the regular 3sec pictures whether there's a change in the photo or not.

how is it supposed to be configured, maybe i'm doing something wrong, i assumed you have to have both timelapse and motion detection enabled.

there doesn't seem to be any way to just take a single photo upon motion, which seems odd, isn't that the whole point?

6.0.37 seems totally different to the elinux instructions.

external motion detection doesn't seem to work either, i get a regular 3secs photo whether there's motion or not.
I don't think RPi Cam works that way. Either timelapse stills OR motion detection video.

Internal motion detection works on Jessie for me but I have not even tried to adjust any of the settings except changing the ram capture to 3000 to make sure the "event" is captured in the video.
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

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

Re: RPi Cam Web Interface

Sun Jul 24, 2016 9:36 pm

sej7278 wrote:does internal motion detection work yet on jessie?

i can't get it to work with timelapse - i just get the regular 3sec pictures whether there's a change in the photo or not.

how is it supposed to be configured, maybe i'm doing something wrong, i assumed you have to have both timelapse and motion detection enabled.

there doesn't seem to be any way to just take a single photo upon motion, which seems odd, isn't that the whole point?

6.0.37 seems totally different to the elinux instructions.

external motion detection doesn't seem to work either, i get a regular 3secs photo whether there's motion or not.
Yes. Internal motion detection works with Jessie

Current version is 6.2.11. 6.0.37 is from April. What is totally different in the wiki?

Motion detection (internal or external) provides a start and stop trigger into the scheduler. The scheduler set up determines what commands to send when it gets those triggers.

Using an im command in motion start will result in a single image capture when it detects a motion starting

Using tl1 in motion start and tl 0 in motion stop will result in a time lapse sequence while motion is occurring with the interval determined by camera settings

Using ca 1 in motion start and ca 0 in motion stop will result in a video capture while motion is occurring.

One can send multiple commands during motion start and stop, so for example one can do both time lapse and video capture together.

Return to “Camera board”