agentscreech
Posts: 1
Joined: Sun Aug 26, 2018 8:47 pm

Re: RPi Cam Web Interface

Sun Aug 26, 2018 8:49 pm

Looks like they need to upgrade their PHP version.

Wayback Machine can get you going in the mean time. It's got a copy from Dec 2017

https://web.archive.org/web/20171119195 ... -Interface

HaMaSch
Posts: 4
Joined: Fri Jun 15, 2018 11:36 pm

Re: RPi Cam Web Interface

Mon Aug 27, 2018 4:37 pm

oldjake wrote:
Sun Aug 26, 2018 6:06 pm
Disaster!

Just been to the wiki page as I have another Pi built and ready to go but the page is down. Do the install instructions exist anywhere else?

Cheers
Andy
Hi Andy,
I saved a local copy of the Instructions. Just put it up to my dropbox. You may download it from here: https://www.dropbox.com/s/kvd3r2mfxiqbm ... e.pdf?dl=1
Maybe it's not the newest, but helps you anyway.

Cheers
Hartmut

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Mon Aug 27, 2018 9:05 pm

Thanks, Hartmut. I've just checked and it's back online now. I think I might just save a copy just in case

bluesky55
Posts: 2
Joined: Thu Aug 30, 2018 6:47 pm

Re: RPi Cam Web Interface

Thu Aug 30, 2018 7:08 pm

Hi all, need a bit of help please - What I'm trying to do is start recording video on motion detect, then continue recording while there continues to be motion in the picture, this motion could continue for many minutes, and when the motion ceases, continue recording for a further 60 seconds, So this would produce just one clip. Have tried ca 1 60 in a schedule for the Motion start field, (Motion stop field left blank) but this doesn't appear to allow a fresh motion trigger to extend the recording. Hope that makes sense to someone, any thoughts ?

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Thu Aug 30, 2018 9:29 pm

Is it possible to use this as a trigger for IFTTT?

I have 2 Sonoff controlled lights in my garage and I would like to set them so that the Pi/camera in the garage acts as a motion detector that turns the lights on via IFTTT.

Long shot but the alternative seems to be flashing the firmware and doing all sorts of nasty sounding stuff.

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Fri Aug 31, 2018 8:21 am

@bluesky55:

What results are you getting at the moment? Have you got anything set for max_capture in the schedule? The reason I ask is that I have mine set up pretty much with the defaults and it does exactly what you're talking about. Motion gets triggered and I get anything from about 6s to several minutes. It's never many minutes but that's just the nature of it here. I think I got about 12 minutes when my other half was watering the plants in the front garden.

Be worth having a look in your logs as well to get an idea when capture is started and stopped.

bluesky55
Posts: 2
Joined: Thu Aug 30, 2018 6:47 pm

Re: RPi Cam Web Interface

Sat Sep 01, 2018 8:02 am

oldjake

Thanks for the reply, having looked at your suggestions, heres what I did
Re installed raspbian afresh. Installed RPi-Cam-Web-Interface.

Having done this the system worked alot better than before, the camera had randomly reset before the re-build.

Then changed the event_gap to 60 (under the Edit Motion Settings),
Now it works just how I wanted, :D That is, any movement inside a 60 second window allows recording to carry on, recording only stops after 60 seconds of no movement.
What a nice piece of software, thanks to the developers for all the hard work, I hope you are enjoying developing it, and its much appreciated out here.

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Fri Sep 07, 2018 8:33 pm

I've upcycled an old Kodak Brownie and installed a Pi Zero, camera and LiPo battery pack. The Pi runs RPi Cam Web Interface and I connect to it on my phone for previews and control. That all works brilliantly.

I've also got a physical button connected to a couple of GPIO pins. At the moment, I have to stop the camera in RPiCWI, ssh into the Pi and do:

Code: Select all

python cam.py
Then the physical button takes snaps and puts them into the media directory.

What I'd really like to do is be able to use the physical button to do the same as clicking the 'Record image' button on the interface. That way, I could just fire the camera up, take some pics (No preview screen, just the viewfinder on the camera) and then get the results when I get WiFi again. The Pi has rclone installed so it uploads to Google Drive if there's a connection.

Anyway, the question is whether I can take a pic using the physical button connected to the GPIO.

Cheers
Andy

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Sat Sep 08, 2018 12:48 am

With a bit of jiggery pokery, I now have a physical button that does the same as the 'Record Image' button in the web interface.

There's quite a lot to it (for a newbie like me) and it's 01.45am so I won't document it now but I will if anyone wants to do the same.

The most important thing I've learned is not to go to bed with an idea bubbling around your head!

stefan.knight
Posts: 24
Joined: Tue Dec 17, 2013 7:43 pm

Camera Choice

Sun Sep 09, 2018 5:35 pm

What is consensus for the camera choices listed on the wiki?

Code: Select all

Camera Choice
=========================
Raspberry Pi Camera Board - Night Vision & Fisheye 160° Lens - https://www.modmypi.com/raspberry-pi/camera/camera-boards/raspberry-pi-camera-board-night-vision-and-fisheye-160°-lens-5mp/?limit=50
Raspberry Pi Camera Board - Fisheye 160° Lens - https://www.modmypi.com/raspberry-pi/camera/camera-boards/raspberry-pi-camera-board-fisheye-160°-lens-5mp/?limit=50
Raspberry Pi Camera Board - Fisheye 222° Lens - https://www.modmypi.com/raspberry-pi/camera/camera-boards/raspberry-pi-camera-board-fisheye-222°-lens-5mp/?limit=50
Raspberry Pi Camera Board - Night Vision "IR-CUT" - https://www.modmypi.com/raspberry-pi/camera/camera-boards/raspberry-pi-night-vision-camera-ir-cut/?limit=50
I need something for day/night (as I just have the regular raspberry pi v1.3 cameras) and was thinking of getting the Raspberry Pi Camera Board - Night Vision "IR-CUT" instead of Raspberry Pi Camera Board - Night Vision & Fisheye 160° Lens.

Does either support hevc (h.265) onboard encoding?

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

Re: RPi Cam Web Interface

Mon Sep 10, 2018 9:36 am

I've been a long time user of this software and I'm still running Jessie Lite, is there any benefits for me starting a fresh install with Stretch?
3b+, 2b, b+, b, Zero & Zero-W

pumpkinpi
Posts: 132
Joined: Fri Apr 18, 2014 7:11 pm

Re: RPi Cam Web Interface

Sat Sep 15, 2018 10:43 pm

Hi folks,

I am trying to record videos for a dashcam with boxing off and do the mp4 boxing later on via this command:

Code: Select all

sudo echo 'sy startstop.sh start' >> /var/www/html/FIFO
I have used the bash script that comes with the software:

Code: Select all

#!/bin/bash
# example start up script which converts any existing .h264 files into MP4
#Check if script already running
mypidfile=/var/www/html/macros/startstop.sh.pid

NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
if [ -f $mypidfile ]; then
        echo "${NOW} Script already running..." >> /var/www/html/scheduleLog.txt
        exit
fi
#Remove PID file when exiting
trap "rm -f -- '$mypidfile'" EXIT

echo $$ > "$mypidfile"

#Do conversion
if [ "$1" == "start" ]; then
  cd $(dirname $(readlink -f $0))
  cd ../media
  shopt -s nullglob
  for f in *.h264
    do
      f1=${f%.*}
        NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
        echo "${NOW} Converting $f" >> /var/www/html/scheduleLog.txt
        #set -e;MP4Box -fps 25 -add $f $f1 > /dev/null 2>&1;rm $f;
        if MP4Box -fps 25 -add $f $f1; then
                NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
                echo "${NOW} Conversion complete, removing $f" >> /var/www/html/scheduleLog.txt
                rm $f
        else
                NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
                echo "${NOW} Error with $f" >> /var/www/html/scheduleLog.txt
        fi
    done
fi
The macro is executing just fine as I can see in the log file:

Code: Select all

more /var/www/html/scheduleLog.txt

{2018/09/15 17:59:22} Executing macro /var/www/html/macros/startstop.sh start &
-2018/09/15 17:59:22- Converting vi_0001_20180915_175821.h264
-2018/09/15 17:59:23- Conversion complete, removing vi_0001_20180915_175821.h264
-2018/09/15 17:59:23- Converting vi_0002_20180915_175838.h264
-2018/09/15 17:59:24- Conversion complete, removing vi_0002_20180915_175838.h264
The issue is that I am a total bash newbie and I can't figure out why the file names are not getting updated. This is what I see in the media folder:

Code: Select all

/var/www/html/media $ ls -la
total 13508
drwxr-xr-x 2 www-data www-data    4096 Sep 15 18:00 .
drwxr-xr-x 7 www-data www-data    4096 Sep 15 13:47 ..
-rw-r--r-- 1 www-data www-data 5507380 Sep 15 17:59 vi_0001_20180915_175821
-rw-r--r-- 1 www-data www-data   14737 Sep 15 17:58 vi_0001_20180915_175821.h264.v0001.th.jpg
-rw-r--r-- 1 www-data www-data 8279728 Sep 15 17:59 vi_0002_20180915_175838
-rw-r--r-- 1 www-data www-data   13923 Sep 15 17:58 vi_0002_20180915_175838.h264.v0002.th.jpg
The videos will only show up in the interface correctly if they look like this when the script is done:

Code: Select all

-rw-r--r-- 1 www-data www-data 5507380 Sep 15 17:59 vi_0001_20180915_175821.mp4
-rw-r--r-- 1 www-data www-data   14737 Sep 15 17:58 vi_0001_20180915_175821.mp4.v0001.th.jpg
-rw-r--r-- 1 www-data www-data 8279728 Sep 15 17:59 vi_0002_20180915_175838.mp4
-rw-r--r-- 1 www-data www-data   13923 Sep 15 17:58 vi_0002_20180915_175838.mp4.v0002.th.jpg
Can anybody help me with the bash updates needed to add the correct suffix onto the file names?

Thanks,
PPi

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

Re: RPi Cam Web Interface

Wed Sep 19, 2018 10:19 pm

I've just done a fresh install using Raspbian Stretch Lite, installed the web interface. All is fine, I'm just wondering which 'Motion detect mode' is best to use these days? External or Internal?
3b+, 2b, b+, b, Zero & Zero-W

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Thu Sep 20, 2018 5:58 am

If definitely say internal based on my experience running one in my garage for a month or so and another at the front door for about 3 months.

atccodex
Posts: 3
Joined: Sat Jun 02, 2018 3:40 pm

Re: RPi Cam Web Interface

Sat Sep 22, 2018 7:23 pm

Ok, I am a bit lost on this one. Is there anyway to combine the select all, the zip function and the delete function all into one button on the main interface? I would like just a single button press to select all the images, zip them all, then delete them all once the zip is complete.

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

Re: RPi Cam Web Interface

Wed Sep 26, 2018 7:46 am

atccodex wrote:
Sat Sep 22, 2018 7:23 pm
Ok, I am a bit lost on this one. Is there anyway to combine the select all, the zip function and the delete function all into one button on the main interface? I would like just a single button press to select all the images, zip them all, then delete them all once the zip is complete.
To do this the preview.php would need to be modified along the following lines

1. Add a new button to initiate this action. This can be found round about line 455. Copy one of the existing lines and change it to have a new name and a value like zipAllDelete. You can have a user confirm if you want. The code there shows both buttons with and without confirm.

2. Add a new 'action' case statement around line 134 using 'zipAllDelete'

3. In the code for that you need to zip all the files to return them and then delete them. There is a function called getZip() that will do the zip part. It needs a parameter holding the array of the files to zip. The function getThumbnails() will get an array of all the files. After that you need to delete the files which can be done by calling maintainFolders(MEDIA_PATH, true, true)

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

Re: RPi Cam Web Interface

Wed Sep 26, 2018 8:03 am

pumpkinpi wrote:
Sat Sep 15, 2018 10:43 pm
Hi folks,

I am trying to record videos for a dashcam with boxing off and do the mp4 boxing later on via this command:

Code: Select all

sudo echo 'sy startstop.sh start' >> /var/www/html/FIFO
I have used the bash script that comes with the software:

Code: Select all

#!/bin/bash
# example start up script which converts any existing .h264 files into MP4
#Check if script already running
mypidfile=/var/www/html/macros/startstop.sh.pid

NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
if [ -f $mypidfile ]; then
        echo "${NOW} Script already running..." >> /var/www/html/scheduleLog.txt
        exit
fi
#Remove PID file when exiting
trap "rm -f -- '$mypidfile'" EXIT

echo $$ > "$mypidfile"

#Do conversion
if [ "$1" == "start" ]; then
  cd $(dirname $(readlink -f $0))
  cd ../media
  shopt -s nullglob
  for f in *.h264
    do
      f1=${f%.*}
        NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
        echo "${NOW} Converting $f" >> /var/www/html/scheduleLog.txt
        #set -e;MP4Box -fps 25 -add $f $f1 > /dev/null 2>&1;rm $f;
        if MP4Box -fps 25 -add $f $f1; then
                NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
                echo "${NOW} Conversion complete, removing $f" >> /var/www/html/scheduleLog.txt
                rm $f
        else
                NOW=`date +"-%Y/%m/%d %H:%M:%S-"`
                echo "${NOW} Error with $f" >> /var/www/html/scheduleLog.txt
        fi
    done
fi
Can anybody help me with the bash updates needed to add the correct suffix onto the file names?

Thanks,
PPi
I think you just need to change $f1 to "$f1.mp4" in the Mp4Box command

atccodex
Posts: 3
Joined: Sat Jun 02, 2018 3:40 pm

Re: RPi Cam Web Interface

Thu Sep 27, 2018 2:24 am

btidey wrote:
Wed Sep 26, 2018 7:46 am
atccodex wrote:
Sat Sep 22, 2018 7:23 pm
Ok, I am a bit lost on this one. Is there anyway to combine the select all, the zip function and the delete function all into one button on the main interface? I would like just a single button press to select all the images, zip them all, then delete them all once the zip is complete.
To do this the preview.php would need to be modified along the following lines

1. Add a new button to initiate this action. This can be found round about line 455. Copy one of the existing lines and change it to have a new name and a value like zipAllDelete. You can have a user confirm if you want. The code there shows both buttons with and without confirm.

2. Add a new 'action' case statement around line 134 using 'zipAllDelete'

3. In the code for that you need to zip all the files to return them and then delete them. There is a function called getZip() that will do the zip part. It needs a parameter holding the array of the files to zip. The function getThumbnails() will get an array of all the files. After that you need to delete the files which can be done by calling maintainFolders(MEDIA_PATH, true, true)
Ok, so this is what I tried. What happens is it for some reason tries to download the zip first, then checks all the files off, then deletes it, instead of checking them , downloading, then deleting....confused lol.

Code: Select all

 case 'zipAllDelete':
            $dSelect = "checked";
            if (!empty($_POST['check_list'])) {
                getZip($_POST['check_list']);
                return;
            }
            echo "No files selected to zip."; 
            maintainFolders(MEDIA_PATH, true, true);
            break;

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

Re: RPi Cam Web Interface

Thu Sep 27, 2018 7:37 am

atccodex wrote:
Thu Sep 27, 2018 2:24 am


Ok, so this is what I tried. What happens is it for some reason tries to download the zip first, then checks all the files off, then deletes it, instead of checking them , downloading, then deleting....confused lol.

Code: Select all

 case 'zipAllDelete':
            $dSelect = "checked";
            if (!empty($_POST['check_list'])) {
                getZip($_POST['check_list']);
                return;
            }
            echo "No files selected to zip."; 
            maintainFolders(MEDIA_PATH, true, true);
            break;
Don't bother to try to check the files, that won't work as the select needs the web page to be processed again. Just feed the getZip with a list of all the files.

I think

getZip(getThumbnails());

should do the trick

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Tue Oct 02, 2018 8:05 am

Playback speed

I'm not sure if this has been happening since the start or if this is something that has just started happening. I haven't noticed it before about a week ago.

When streaming, playback is perfect. I've got my camera settings at 25fps streaming and 25fps boxing. The preview is set to Q=8 and Wi=384. The video resolution is set to 900 x 1200.

When I play back through the RPi stored videos section the videos playback at double speed, or certainly faster than it should.

Any ideas? Is it something I'm doing wrong?

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

Re: RPi Cam Web Interface

Tue Oct 02, 2018 10:27 am

oldjake wrote:
Tue Oct 02, 2018 8:05 am
Playback speed

I'm not sure if this has been happening since the start or if this is something that has just started happening. I haven't noticed it before about a week ago.

When streaming, playback is perfect. I've got my camera settings at 25fps streaming and 25fps boxing. The preview is set to Q=8 and Wi=384. The video resolution is set to 900 x 1200.

When I play back through the RPi stored videos section the videos playback at double speed, or certainly faster than it should.

Any ideas? Is it something I'm doing wrong?
Strange. I just did a quick test recording a 20 second clip at 1200 x 900 and it played back normally at the correct speed.

Normally a difference in playback speed is caused by boxing at a different frame rate to the recording. So boxing at 50 fps while recording at 25 fps will playback at double speed. But you have boxing and video both set to 25 fps. Preview is done by an independent mechanism and should have no effect on this.

I can only think that either the settings have got confused or there is some subtle interaction with some other camera settings. It might also be worth checking the integrity of the camera cable at both ends and the mini cable at the camera in case there is some hardware cause.

I would also try clearing any user specific camera settings (rename uconfig in the www install folder when camera is closed then start it up again).

If you can't resolve this then if you zip your uconfig and your /etc/raspimjpeg main config file up and post here then it can be checked out.

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

Re: RPi Cam Web Interface

Fri Oct 05, 2018 10:23 am

btidey wrote:
Tue Oct 02, 2018 10:27 am
oldjake wrote:
Tue Oct 02, 2018 8:05 am
Playback speed

I'm not sure if this has been happening since the start or if this is something that has just started happening. I haven't noticed it before about a week ago.

When streaming, playback is perfect. I've got my camera settings at 25fps streaming and 25fps boxing. The preview is set to Q=8 and Wi=384. The video resolution is set to 900 x 1200.

When I play back through the RPi stored videos section the videos playback at double speed, or certainly faster than it should.

Any ideas? Is it something I'm doing wrong?
Strange. I just did a quick test recording a 20 second clip at 1200 x 900 and it played back normally at the correct speed.

Normally a difference in playback speed is caused by boxing at a different frame rate to the recording. So boxing at 50 fps while recording at 25 fps will playback at double speed. But you have boxing and video both set to 25 fps. Preview is done by an independent mechanism and should have no effect on this.

I can only think that either the settings have got confused or there is some subtle interaction with some other camera settings. It might also be worth checking the integrity of the camera cable at both ends and the mini cable at the camera in case there is some hardware cause.

I would also try clearing any user specific camera settings (rename uconfig in the www install folder when camera is closed then start it up again).

If you can't resolve this then if you zip your uconfig and your /etc/raspimjpeg main config file up and post here then it can be checked out.
I've just logged on here to look at the same problem, mine was a fresh install with Stretch Lite to the current 6.4.30. I've downloaded a clip and that still plays really fast.
Last edited by Gary Littlemore on Fri Oct 05, 2018 10:46 am, edited 1 time in total.
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Fri Oct 05, 2018 10:40 am

Gary Littlemore wrote:
Fri Oct 05, 2018 10:23 am
btidey wrote:
Tue Oct 02, 2018 10:27 am
oldjake wrote:
Tue Oct 02, 2018 8:05 am
Playback speed

I'm not sure if this has been happening since the start or if this is something that has just started happening. I haven't noticed it before about a week ago.

When streaming, playback is perfect. I've got my camera settings at 25fps streaming and 25fps boxing. The preview is set to Q=8 and Wi=384. The video resolution is set to 900 x 1200.

When I play back through the RPi stored videos section the videos playback at double speed, or certainly faster than it should.

Any ideas? Is it something I'm doing wrong?
Strange. I just did a quick test recording a 20 second clip at 1200 x 900 and it played back normally at the correct speed.

Normally a difference in playback speed is caused by boxing at a different frame rate to the recording. So boxing at 50 fps while recording at 25 fps will playback at double speed. But you have boxing and video both set to 25 fps. Preview is done by an independent mechanism and should have no effect on this.

I can only think that either the settings have got confused or there is some subtle interaction with some other camera settings. It might also be worth checking the integrity of the camera cable at both ends and the mini cable at the camera in case there is some hardware cause.

I would also try clearing any user specific camera settings (rename uconfig in the www install folder when camera is closed then start it up again).

If you can't resolve this then if you zip your uconfig and your /etc/raspimjpeg main config file up and post here then it can be checked out.
I've just logged on here to look at the same problem, mine was a fresh install with Stretch Lite to the current 6.4.30. I've downloaded a clip and that still plays really fast.
Robert/Oldjake, after reading your post I reselected the 'Load Preset' option and keyed in the '25' again on both the recording and boxing. The first motion detected video it recorded after resetting the resolutions the video is playing at normal speed again.
3b+, 2b, b+, b, Zero & Zero-W

oldjake
Posts: 47
Joined: Fri Aug 03, 2018 12:39 pm

Re: RPi Cam Web Interface

Fri Oct 05, 2018 11:23 am

Hi Gary

Thanks for that. I'm doing some work on my Pis tomorrow as I've just put in a new router with some BT Whole Home disks so I need to set them all up again on the new WiFi. Once that's done, I'll try what you suggested.

I did do a reset settings on the one I was having problems with and just changed the bits I needed but that didn't make any difference.

Cheers
Andy

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

Re: RPi Cam Web Interface

Fri Oct 05, 2018 2:57 pm

oldjake wrote:
Fri Oct 05, 2018 11:23 am
Hi Gary

Thanks for that. I'm doing some work on my Pis tomorrow as I've just put in a new router with some BT Whole Home disks so I need to set them all up again on the new WiFi. Once that's done, I'll try what you suggested.

I did do a reset settings on the one I was having problems with and just changed the bits I needed but that didn't make any difference.

Cheers
Andy
It sounds like the boxing fps is getting set wrong but still showing 25 on the web interface. I am not sure how that could happen.

If you get this problem please save the uconfig file (e.g. in /var/www/html), zip it and upload here. The uconfig file contains changes to the standard configuration when you change something.

Return to “Camera board”