GammaScorpii
Posts: 17
Joined: Wed Apr 13, 2016 1:25 pm

Re: RPi Cam Web Interface

Fri Feb 17, 2017 4:58 am

btidey wrote:
GammaScorpii wrote:I have a huge problem perhaps somebody out there can help me with. I've been using this great software to shoot lots of video clips and I have just lost a video file for some mysterious reason. The thumbnail jpg is still there in /var/media but the corresponding mp4/h264 file is nowhere to be found.

According to somebody who was watching the file grow as it was being shot, it disappeared most likely during the mp4 conversion process and never came back.

Any idea on what to do to recover it? It's an extremely important piece of footage and I'm worried now that I have tried using PhotoRec to recover any deleted files and haven't had any luck. PhotoRec did save the unknown data to a huge dd image but I have no idea on how to examine that.

My /var/media folder is an xfs partition if that helps.

Any advice on what to do next would be hugely appreciated and worth a credit on the film we're trying to make ;)
I can't directly help with your immediate problem here but let me explain what may have happened and what I have done to maybe help in future.

Videos are first recorded to h264 format. When this completes a boxing command is queued up to convert to mp4 format and remove the original h264 file. The command is actually a MP4Box cmd followed by a rm command. The MP4Box cmd is very reliable, but if a problem occurred then the rm command would still execute removing the original h264 file.

To improve this I have made 2 enhancements in the latest version.
First the command line that is used for Boxing is now a configurable item in the /etc/raspimjpeg file so its behaviour may be changed.
Second I have added an extra step in this command line so that if the MP4Box process throws an error then the rest of the command line is NOT executed. This would mean that if this occurs again then the original h264 file will be left intact in the media folder.

That of course doesn't help with your immediate problem. The chance of recovering the video data from your unknown blob will depend on how quickly this was picked up. After the original file was 'rm' then the filing space becomes available for re-use. If there were a large number of recordings made after then the chance of the 'unused space' being overwritten becomes higher.
Thanks for the information. No other recordings were made once this was noticed, which is why I was confident with finding the data with recovery tools. Unfortunately I've had no luck with my XFS filesystem. Looks as though they recovered files that weren't even deleted for some reason, as well as some that were. But not the one I need.

Do the temporary files ( *.mp4.h264 ) get saved to the same location?

vin100
Posts: 11
Joined: Tue Jan 24, 2017 10:58 pm

Re: RPi Cam Web Interface

Fri Feb 17, 2017 10:30 am

Hello btidey

I tried with the values you gave me and it's Ok :)
Do you always use the "start convert" or another program (ffmpeg?)

Thanks

Chris Doermann
Posts: 1
Joined: Tue Feb 21, 2017 2:59 pm

Re: RPi Cam Web Interface

Tue Feb 21, 2017 3:04 pm

I use the rotation option because my camera is mounted to get the picture in portrait orientation.
But now the preview shows the portrait picture in a landscape frame. How can I rotate the preview frame as well?
Debian on Raspberry Pi3 Model B

User avatar
gigpi
Posts: 17
Joined: Thu May 14, 2015 12:23 pm

Re: RPi Cam Web Interface

Wed Feb 22, 2017 11:33 am

I think there is something wrong with update.sh script.
I launched it, commits didn't match so it updated, but i still see the old 6.2.28 version instead of the new v6.2.31. If i look at the installation directory i can see config.php timestamp changed to when i launched the update.sh script, but no modification of the APP_VERSION string.

So now i don't know if i have the last files from github or not.

Here is the log of update.sh:

Code: Select all

+++ readlink -f ./update.sh
++ dirname /home/pi/bin/RPi_Cam_Web_Interface/update.sh
+ cd /home/pi/bin/RPi_Cam_Web_Interface
+ color_red='tput setaf 1'
+ color_green='tput setaf 2'
+ color_reset='tput sgr0'
+ trap fn_abort 0
+ set -e
++ git ls-remote -h origin master
++ awk '{print $1}'
+ remote=6f2339b3b6831b85dc52dae33219ec73abf9f186
++ git rev-parse HEAD
+ local=4fd51c0b817ab2469ee209fc4647568d3b540627
+ printf 'Local : %s\nRemote: %s\n' 4fd51c0b817ab2469ee209fc4647568d3b540627 6f2339b3b6831b85dc52dae33219ec73abf9f186
+ [[ 4fd51c0b817ab2469ee209fc4647568d3b540627 == 6f2339b3b6831b85dc52dae33219ec73abf9f186 ]]
+ dialog --title 'Update message' --infobox 'Commits don'\''t match. We update.' 4 35
+ sleep 2
+ git fetch origin master
+ trap : 0
+ dialog --title 'Update message' --infobox 'Update finished.' 4 20
+ sleep 2
+ '[' 0 -eq 0 ']'
+ ./install.sh
+ :
Thank you btidey for your work!

p.s. the wiki, step 4, says ./upgrade.sh but i think should be ./update.sh

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

Re: RPi Cam Web Interface

Mon Feb 27, 2017 12:31 pm

gigpi wrote:I think there is something wrong with update.sh script.
I launched it, commits didn't match so it updated, but i still see the old 6.2.28 version instead of the new v6.2.31. If i look at the installation directory i can see config.php timestamp changed to when i launched the update.sh script, but no modification of the APP_VERSION string.

So now i don't know if i have the last files from github or not.

Here is the log of update.sh:

Code: Select all

+++ readlink -f ./update.sh
++ dirname /home/pi/bin/RPi_Cam_Web_Interface/update.sh
+ cd /home/pi/bin/RPi_Cam_Web_Interface
+ color_red='tput setaf 1'
+ color_green='tput setaf 2'
+ color_reset='tput sgr0'
+ trap fn_abort 0
+ set -e
++ git ls-remote -h origin master
++ awk '{print $1}'
+ remote=6f2339b3b6831b85dc52dae33219ec73abf9f186
++ git rev-parse HEAD
+ local=4fd51c0b817ab2469ee209fc4647568d3b540627
+ printf 'Local : %s\nRemote: %s\n' 4fd51c0b817ab2469ee209fc4647568d3b540627 6f2339b3b6831b85dc52dae33219ec73abf9f186
+ [[ 4fd51c0b817ab2469ee209fc4647568d3b540627 == 6f2339b3b6831b85dc52dae33219ec73abf9f186 ]]
+ dialog --title 'Update message' --infobox 'Commits don'\''t match. We update.' 4 35
+ sleep 2
+ git fetch origin master
+ trap : 0
+ dialog --title 'Update message' --infobox 'Update finished.' 4 20
+ sleep 2
+ '[' 0 -eq 0 ']'
+ ./install.sh
+ :
Thank you btidey for your work!

p.s. the wiki, step 4, says ./upgrade.sh but i think should be ./update.sh
I'm having the same issue, mine isn't updating either. I'm stuck on 6.2.29
Last edited by Gary Littlemore on Wed Mar 01, 2017 12:14 pm, edited 1 time in total.
3b+, 2b, b+, b, Zero & Zero-W

wojo1982
Posts: 2
Joined: Tue Feb 28, 2017 6:43 pm

Re: RPi Cam Web Interface

Tue Feb 28, 2017 6:57 pm

Hello. I install rpi cam web interface. It's fantastic but I have some question. Is it possible split video when I constantly record. Maybe cut record on 5 minutes video and stop record when I click on button stop record. Please help me. When I can modify code so as split video.
Thanks for help.

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

Re: RPi Cam Web Interface

Fri Mar 03, 2017 1:09 pm

gigpi wrote:I think there is something wrong with update.sh script.
I launched it, commits didn't match so it updated, but i still see the old 6.2.28 version instead of the new v6.2.31. If i look at the installation directory i can see config.php timestamp changed to when i launched the update.sh script, but no modification of the APP_VERSION string.

So now i don't know if i have the last files from github or not.


Thank you btidey for your work!

p.s. the wiki, step 4, says ./upgrade.sh but i think should be ./update.sh
The update script from 6.2.25 uses a git fetch rather than a pull so should not be suffering from mismatch commits.

Your log shows that fetch is indeed being used and then runs the install script afterwards so that does look right. You can check in the RPi_Cam_Web_Interface and see if the files are updated. The config.php file in the www folder is where the version number is contained so you should see that near the top of the file.

I'll check further but one can also do the equivalent of an update just by deleting the RPi folder and doing the git clone followed by ./install.sh

I corrected the wiki reference. Thanks.

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

Re: RPi Cam Web Interface

Fri Mar 03, 2017 1:18 pm

wojo1982 wrote:Hello. I install rpi cam web interface. It's fantastic but I have some question. Is it possible split video when I constantly record. Maybe cut record on 5 minutes video and stop record when I click on button stop record. Please help me. When I can modify code so as split video.
Thanks for help.
Video recordings are normally started using the ca 1 command (which is what is sent when the start video button on the web interface is pressed. A second parameter can be used with the ca command which then controls the length of the recording. For example, a ca 1 300 starts a recording and stops it automatically after 5 minutes. There is currently no inbuilt control to restart it but a end_vid macro script could do that by issuing another ca 1 300 command.

I will see if there is an easier way to do it.

rahlquist
Posts: 149
Joined: Tue Jan 21, 2014 1:02 pm

Re: RPi Cam Web Interface

Mon Mar 06, 2017 3:18 pm

Been using this software a long time now and I just have to say the Reset Settings button, I hate it with a passion. Several times I have wiped my settings on accident when trying to reboot from the button next to it. Any chance you could change it to back the settings up before it wipes?

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

Re: RPi Cam Web Interface

Mon Mar 06, 2017 4:13 pm

rahlquist wrote:Been using this software a long time now and I just have to say the Reset Settings button, I hate it with a passion. Several times I have wiped my settings on accident when trying to reboot from the button next to it. Any chance you could change it to back the settings up before it wipes?
Two changes in latest version.

Web interface now puts up a confirm box when Reset settings is pressed.
A uconfig.bak file is created from current one before it is cleared.

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

Re: RPi Cam Web Interface

Mon Mar 06, 2017 5:27 pm

btidey wrote:
wojo1982 wrote:Hello. I install rpi cam web interface. It's fantastic but I have some question. Is it possible split video when I constantly record. Maybe cut record on 5 minutes video and stop record when I click on button stop record. Please help me. When I can modify code so as split video.
Thanks for help.
Video recordings are normally started using the ca 1 command (which is what is sent when the start video button on the web interface is pressed. A second parameter can be used with the ca command which then controls the length of the recording. For example, a ca 1 300 starts a recording and stops it automatically after 5 minutes. There is currently no inbuilt control to restart it but a end_vid macro script could do that by issuing another ca 1 300 command.

I will see if there is an easier way to do it.
The latest version now has a video split capability. Under camera settings there is a new setting called video split. If this is 0 then behaviour is as before with continuous recording between a video start and stop. If set non-zero then the recording will be stopped and restarted at this interval whilst vide is active. So if set to say 300 then a new recording will be made at 5 minute intervals. Each recording has its own thumbnail and behaves the same as if it had been manually stopped and restarted at this interval.

wojo1982
Posts: 2
Joined: Tue Feb 28, 2017 6:43 pm

Re: RPi Cam Web Interface

Mon Mar 06, 2017 6:48 pm

Thank you. I have to upgade my installation. Once again thanks for help.

Mr.Greenfield
Posts: 23
Joined: Mon Mar 06, 2017 7:33 pm

Re: RPi Cam Web Interface

Mon Mar 06, 2017 7:41 pm

I am not really sure what is going on, but when I go to the website to view my pi recording, I just get a black screen with Index of / (see attachment) Can someone help me to solve this problem. I've already checked the raspimjpeg, but I can't find motion but they don't tell me how to add it :? Help would be appreciated :D
Attachments
PiCam.png
PiCam.png (9.52 KiB) Viewed 6065 times

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

Re: RPi Cam Web Interface

Mon Mar 06, 2017 9:28 pm

Mr.Greenfield wrote:I am not really sure what is going on, but when I go to the website to view my pi recording, I just get a black screen with Index of / (see attachment) Can someone help me to solve this problem. I've already checked the raspimjpeg, but I can't find motion but they don't tell me how to add it :? Help would be appreciated :D
From your description it doesn't sound like you are seeing any of the normal web interface.

Note that the url of the website should include the subfolder you have installed in. For example, when you install there is a subfolder setting which is html. If you do not change this then you browse to http://yourIP/html (Substitute yourIP with the IP of the raspberry. This inclusion of the subfolder is deliberate to allow the webserver to be used to host other websites using the standard port 80. You can clear the subfolder field in the install and then the website will be installed in /var/www and the url will be just http://yourIP

If this is not the issue please post again with more details of your setup.

quavoce
Posts: 109
Joined: Fri Nov 27, 2015 9:11 am

Re: RPi Cam Web Interface

Thu Mar 09, 2017 8:56 pm

Is it possible to check the status of a command/option to see if, for example, whether motion detection is turned on or off please? I'm setting up a remote monitoring script that can alert me if motion has stopped, or the Pi is down, or whether something else has broken for example.

I understand that either pressing the "Motion Detection Start" button or sending a echo 'md 1' >/var/www/FIFO would start the process, but is this state recorded anywhere?

I checked uconfig and /etc/raspimjpeg but didn't see anything change in these files.

Running 'ls -lrt' to show latest changed files in /var/www/html shows that scheduleLog.txt acknowledges that the command was received, but doesn't quite do what I'm after.

Thanks.

quavoce
Posts: 109
Joined: Fri Nov 27, 2015 9:11 am

Re: RPi Cam Web Interface

Thu Mar 09, 2017 9:06 pm

quavoce wrote:Is it possible to check the status of a command/option to see if, for example, whether motion detection is turned on or off please? I'm setting up a remote monitoring script that can alert me if motion has stopped, or the Pi is down, or whether something else has broken for example.

I understand that either pressing the "Motion Detection Start" button or sending a echo 'md 1' >/var/www/FIFO would start the process, but is this state recorded anywhere?

I checked uconfig and /etc/raspimjpeg but didn't see anything change in these files.

Running 'ls -lrt' to show latest changed files in /var/www/html shows that scheduleLog.txt acknowledges that the command was received, but doesn't quite do what I'm after.

Thanks.
I think I've found it:
/var/www/html/status_mjpeg.txt -> /run/shm/mjpeg/status_mjpeg.txt

This normally shows "status" when i cat the file. It changes to "md_video" when recording, and shows "md_ready" when idle.

budman1758
Posts: 9
Joined: Mon Dec 19, 2016 8:44 pm

Re: RPi Cam Web Interface

Sun Mar 12, 2017 3:05 am

Not sure what is going on here. I have installed this software on 2 RPI Zero's and all is working great on those two. On the third camera install I get this error...The error repeats over and over in the terminal window right after the install process ends and asks for start or not.

Code: Select all

 mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/cam/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/cam/macros/error_hard.sh: Permission denied 
The only difference in any of this is on the 3rd camera setup I am using the newest version of Jessie Lite as opposed to and older (but updated b4 cam software install). This has happened twice now using 2 SD cards, 2 different PI's and 2 different camera boards.

I am going to try again tomorrow using the older Jessie image and see what happens. Otherwise, any ideas on this?
Thanks.

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

Re: RPi Cam Web Interface

Mon Mar 13, 2017 12:33 pm

budman1758 wrote:Not sure what is going on here. I have installed this software on 2 RPI Zero's and all is working great on those two. On the third camera install I get this error...The error repeats over and over in the terminal window right after the install process ends and asks for start or not.

Code: Select all

 mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/cam/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/cam/macros/error_hard.sh: Permission denied 
The only difference in any of this is on the 3rd camera setup I am using the newest version of Jessie Lite as opposed to and older (but updated b4 cam software install). This has happened twice now using 2 SD cards, 2 different PI's and 2 different camera boards.

I am going to try again tomorrow using the older Jessie image and see what happens. Otherwise, any ideas on this?
Thanks.
Search is your friend: search.php?keywords=could+not+create+co ... sf=msgonly
3b+, 2b, b+, b, Zero & Zero-W

shinji2009
Posts: 27
Joined: Thu Jan 16, 2014 12:21 pm

Re: RPi Cam Web Interface

Mon Mar 13, 2017 1:44 pm

hi. motion detection stops for no reason from time to time. example in log after 07:07:45. Motion detect mode: internal. md 1 in Period Start. if press motion detection start button it starts again. help please. how to find why and how to fix.

Code: Select all

{2017/03/13 07:07:44} recommended video buffers 1
{2017/03/13 07:07:44} h264 buffers set to recommended 1
{2017/03/13 07:07:44} Set up internal detect width=121 height=68
{2017/03/13 07:07:44} Opening FIFO 0 /var/www/html/FIFO 7
{2017/03/13 07:07:44} Opening FIFO 1 /var/www/html/FIFO11 8
{2017/03/13 07:07:44} MJPEG streaming, ready to receive commands
{2017/03/13 07:07:44} send smd 9
{2017/03/13 07:07:44} Starting command loop
[2017/03/13 07:07:44] Reload parameters command requested
[2017/03/13 07:07:44] Scheduler loop is started
{2017/03/13 07:07:45} DEBUG 3
[2017/03/13 07:07:45] Scheduled management tasks. Next at 1489363965
[2017/03/13 07:12:46] Scheduled management tasks. Next at 1489364266
[2017/03/13 07:17:47] Scheduled management tasks. Next at 1489364567
[2017/03/13 07:22:48] Scheduled management tasks. Next at 1489364868
[2017/03/13 07:27:49] Scheduled management tasks. Next at 1489365169
[2017/03/13 07:32:50] Scheduled management tasks. Next at 1489365470

budman1758
Posts: 9
Joined: Mon Dec 19, 2016 8:44 pm

Re: RPi Cam Web Interface

Thu Mar 16, 2017 6:57 pm

I can confirm that the problem seems to be the newer Jessie Lite image. (2017-01-11) Using an older image (2016-09-23) and doing a complete update/upgrade b4 installing RPi Cam Web Interface works fine with zero errors.
Search is your friend: sear ... sf=msgonly
This search did not produce any results exactly relevant to my problem.

If it makes any difference the only options changed during install were installing nginx instead of Apache and the html folder was changed to "cam"

Hope someone finds this useful.

Ryciboss
Posts: 3
Joined: Sat Mar 11, 2017 12:38 pm

Re: RPi Cam Web Interface

Sat Mar 18, 2017 10:03 am

Does it support having more cameras on a single web page?

Thanks

strawberry
Posts: 62
Joined: Tue Oct 30, 2012 10:44 am

Re: RPi Cam Web Interface

Sat Mar 18, 2017 11:21 am

I want pictures to be stored on an external HD, by default this drive is mounted in /media/pi/drive. Create a folder pictures on the drive and I thought the easiest way to get them on the drive was to make a link with between the folder on the drive and the media folder:

ln -s /media/pi/drive/pictures /var/www/media

but for some reason it's not recording videos/pictures anymore, don't understand why because I can read / write in the /var/www/media folder without a problem.

virgesmith
Posts: 2
Joined: Fri Nov 09, 2012 11:44 am

Re: RPi Cam Web Interface

Sat Mar 18, 2017 1:27 pm

FYI Just installed RPi-Cam-Web-Interface using nginx as the web sever. Didn't work "out-of the box" kept getting 403/404/500 errors depending on page i requested, and nginx error log had stuff like

Code: Select all

directory index of "/var/www/" is forbidden, client: ...
rewrite or internal redirection cycle while internally redirecting to "/index.html"
eventually worked out the problem was this line in /etc/nginx/sites-available/rpicam

Code: Select all

root /var/www
which should read

Code: Select all

root /var/www/html
...as this is where the installer actually put the web interface files.

Oregane
Posts: 1
Joined: Sat Mar 18, 2017 2:55 pm

Re: RPi Cam Web Interface

Sat Mar 18, 2017 3:23 pm

Hello,

last weekend i set up my raspberry pi zero with the RPi Cam Web Interface. I followed the Instructions and set it to "Detection Mode". So far everything works fine. I just have 2 questions.

- This one is not directly about the cam, but maybe someone can help me anyway. I have set up 2 WiFi Networks to connect, but the Pi seem only to search for networks on startup. Is there a way to constantly search for available networks? The Pi is mounted out of reach from my home WiFi, but i want to check it sometimes from my phone WiFi. As said the Pi will only connect after i manually reset it.

- Second question. After one Week of filming i deleted all Videos. The used storage went up to 20%. After i set it up last week it was at 12%. How do i get this space back? I already cleared the log in the schedule settings and set the log size to 0 now.

I am fairly new to the Pi and a total noob at coding/programming but this Guide was really good, and i hope that someone can help me with my 2 problems.

~Ore

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

Re: RPi Cam Web Interface

Tue Mar 21, 2017 8:31 am

Hello, I am using this great system at my workplace (where it works almost flawlessly) and now there is single installation checking my yard at home.

The thing is, I can't make it to work correctly on internal detection mode, as it often misses even a car leaving or parking in. I would like it to react even on human motion, like walking. I have read the instructions here and on wiki, I have set %c and %f flags to annotation to see what is going on, but it still shows zeros. I am including one short videos - one is a video of a man walking, this was recorded manually. Then I have a video of a man loading up cargo/kid into the red van (so at a close distance) and then there is a third one which is a video of two cars approaching around the white house. The first car approaching was a white van, so it was a larger car. The second two were recorded automatically, but there are only zeros in the annotation. I would have included these as well, but they are fairly large and it seems that my laptop wouldn't handle video cutting :-)

So what have I done wrong? It would be great if someone could help me with this ;-)

http://vohrada.cz/vi_2616_20170320_111719.mp4

I am using rPi 3, Camera v2.1 (I think) and RPi Cam Control v6.3.1

EDIT: the annotation line looks like this:

Code: Select all

vohrada predek %h:%m:%s %Y-%M-%D  debug: %c  %f

Return to “Camera board”