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

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Oct 25, 2017 3:27 am

I cannot install pikrellcam on current Raspbian Stretch Lite system from https://www.raspberrypi.org/downloads/raspbian/, as you see below. Looks like php5 is not available? Do I have to use php7? Any recommendations?

Code: Select all

[email protected]:~/pikrellcam $ uname -a
Linux rp4 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 armv6l GNU/Linux

[email protected]:~ $ git clone https://github.com/billw2/pikrellcam.git
Cloning into 'pikrellcam'...
remote: Counting objects: 1010, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 1010 (delta 0), reused 2 (delta 0), pack-reused 1005
Receiving objects: 100% (1010/1010), 3.06 MiB | 162.00 KiB/s, done.
Resolving deltas: 100% (703/703), done.
[email protected]:~ $ ls
pikrellcam
[email protected]:~ $ cd
.nano/      pikrellcam/
[email protected]:~ $ cd pikrellcam/
[email protected]:~/pikrellcam $ ls
etc                    libkrellm  pikrellcam  scripts-dist  www
install-pikrellcam.sh  LICENSE    README.md   src
[email protected]:~/pikrellcam $ ./install-pikrellcam.sh

Set the port for the nginx web server.
If you already have a web server configuration using the default
port 80, you should enter an alternate port for PiKrellCam.
Otherwise you can use the default port 80 or an alternate as you wish.
The port number will be set in: /etc/nginx.sites-available/pikrellcam.
Enter web server port: 80

For auto starting at boot, a PiKrellCam start command must be in rc.local.
If you don't start at boot, PiKrellCam can always be started and stopped
from the web page.
Do you want PiKrellCam to be auto started at boot? (yes/no): yes

Enter a password for a web page login for user: pi
Enter a blank entry if you do not want the password login.
Enter password:

Starting PiKrellCam install...
Installing packages:  gpac php5 php5-common php5-fpm nginx libav-tools bc sshpas                                                                                s mpack imagemagick apache2-utils libasound2-dev libmp3lame0 libmp3lame-dev
Running: apt-get update
Get:1 http://mirrordirector.raspbian.org/raspbian stretch InRelease [15.0 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian stretch/main armhf Packages [1                                                                                1.7 MB]
Hit:3 http://archive.raspberrypi.org/debian stretch InRelease
Fetched 11.7 MB in 2min 33s (76.2 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-common is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-fpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5' has no installation candidate
E: Package 'php5-common' has no installation candidate
E: Package 'php5-fpm' has no installation candidate
./install-pikrellcam.sh: line 137: bc: command not found
./install-pikrellcam.sh: line 140: [: -gt: unary operator expected
Making /usr/local/bin/pikrellcam link.
./pikrellcam: error while loading shared libraries: libmp3lame.so.0: cannot open                                                                                 shared object file: No such file or directory
Unexpected failure to create config file /home/pi/.pikrellcam/pikrellcam.conf

User avatar
Gavinmc42
Posts: 2136
Joined: Wed Aug 28, 2013 3:31 am

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Oct 25, 2017 5:23 am

I edited the install script and changed "Jessie" to "Stretch", but don't do it for the nginx section of the install.
It is not perfect but it did work.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

billw
Posts: 363
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Oct 25, 2017 3:30 pm

jbeale wrote:
Wed Oct 25, 2017 3:27 am
I cannot install pikrellcam on current Raspbian Stretch Lite system from https://www.raspberrypi.org/downloads/raspbian/, as you see below. Looks like php5 is not available? Do I have to use php7? Any recommendations?
I changed the install script to install php7.0 for Stretch, so try a redo of the git clone.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Oct 25, 2017 9:49 pm

Many thanks for that lightning-quick fix! I tried a fresh install of the full desktop Raspbian Stretch on a RPi-2, and then the git pikrellcam stage. I was able to install without seeing any errors. I rebooted and I see pikrellcam is running with about 5% of CPU, so that much may be OK. However when I try to access 127.0.0.1 in Chromium also on the same Pi, I only see a page saying "502 Bad Gateway nginx/1.10.3" so I wonder if this is related to the PHP7 change.

In /tmp/pikrellcam.log I do see one line saying "Server: error binding" but then the next line says "Server running...waiting for connections." Let me know what I can do to help debug, thanks!
nginx seems to be running as far as I know:

Code: Select all

[email protected]:~ $ sudo service nginx status
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2017-10-25 14:39:48 PDT; 15min ago
     Docs: man:nginx(8)
  Process: 414 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS
  Process: 373 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=
 Main PID: 430 (nginx)
   CGroup: /system.slice/nginx.service
           ├─430 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           ├─432 nginx: worker process
           ├─433 nginx: worker process
           ├─434 nginx: worker process
           └─435 nginx: worker process

Oct 25 14:39:46 rp100 systemd[1]: Starting A high performance web server and a reverse proxy server...
Oct 25 14:39:48 rp100 systemd[1]: Started A high performance web server and a reverse proxy server.

Code: Select all

[email protected]:~ $ ps aux | grep nginx
root       430  0.0  0.1  47044  1216 ?        Ss   14:39   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data   432  0.0  0.3  47196  3432 ?        S    14:39   0:00 nginx: worker process
www-data   433  0.0  0.3  47196  2792 ?        S    14:39   0:00 nginx: worker process
www-data   434  0.0  0.3  47196  2792 ?        S    14:39   0:00 nginx: worker process
www-data   435  0.0  0.3  47196  2792 ?        S    14:39   0:00 nginx: worker process
pi        1762  0.0  0.0   4376   564 pts/0    S+   14:58   0:00 grep --color=auto nginx

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Oct 26, 2017 12:05 am

I see that the nginx config file /etc/nginx/sites-available/pikrellcam includes the line

Code: Select all

fastcgi_pass unix:/var/run/php5-fpm.sock
even though this is now using PHP7.

I don't know what this means; on the off-chance, I changed this line to "fastcgi_pass unix:/var/run/php/php7-fpm.sock" but that didn't help.

billw
Posts: 363
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Oct 26, 2017 2:55 am

jbeale wrote:
Thu Oct 26, 2017 12:05 am
I see that the nginx config file /etc/nginx/sites-available/pikrellcam includes the line

Code: Select all

fastcgi_pass unix:/var/run/php5-fpm.sock
even though this is now using PHP7.

I don't know what this means; on the off-chance, I changed this line to "fastcgi_pass unix:/var/run/php/php7-fpm.sock" but that didn't help.
Can you try with php7.0 instead of just php7?

Code: Select all

fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
Edit: after the change, restart nginx:

Code: Select all

sudo service nginx restart

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Oct 26, 2017 3:29 am

Thank you, yes that was it! Now it is working again, I am very relieved. I have another system with a failing SD card, now I can upgrade it to the new version.

thanks again,
John

budlande
Posts: 4
Joined: Sun Oct 29, 2017 1:36 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Oct 29, 2017 1:46 pm

I have pikrellcam setup and working for video, however am having issues with audio. I see the dB bar moving up and down, but when I click to manually record, there doesn’t seem to be sound on the video.
Here is the log entry from the manual record:
08:44:05 : command_process: record on
08:44:05 : Manual record start - /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264
08:44:05 : event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg
08:44:14 : command_process: record off
08:44:14 : execl[wait:0]: (nice -n 5 MP4Box -quiet -tmp /tmp -fps 24.001 -add /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264 -add /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp3 /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp4 2> /dev/null && rm /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264 /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp3 /run/pikrellcam/motion_converting )
08:44:14 : Manual record stop (size:6.9MB < /tmp:20766.9MB) vid_time:9.67 vid_fps:24.00 audio_frames:463971 audio_rate:48000
08:44:15 : execl[wait:0]: convert /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg -resize 150x84 /home/pi/pikrellcam/media/thumbs/manual_2017-10-29_08.44.05_0.th.jpg && rm /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg

When I hit the arrow key in the mic controls, I am see the following in the logs:
08:28:27 : Failed to open audio FIFO (no reader?): /home/pi/pikrellcam/www/audio_FIFO. No such device or address


Any thoughts?

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

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Oct 29, 2017 5:27 pm

After about a year of working OK, one of my pikrellcam units gets a frozen camera image every 1 or 2 days. The RPi itself is still running OK and I can browse earlier captures, but the live camera is frozen and nothing new can be recorded. Rebooting gets it going again. I assume there is some intermittent hardware problem, because a brand-new SD card with a fresh Raspbian install did not fix it. I guess I have to just replace the whole thing, but meanwhile is there a better way to workaround it than a script like the below (reboot on too-old mjpeg file?)

Code: Select all

#!/bin/bash
sleep 60  # delay @ startup for manual escape from reboot cycle in case of a bug
while true
do
  sleep 5
  age=$(($(date +%s) - $(date +%s -r "/var/run/pikrellcam/mjpeg.jpg")))
  if [ "$age" -gt "1" ]; then
    echo "mjpeg age: $age" | /usr/bin/logger -t pikrellcam-reboot
    sudo reboot
  fi
done

xzanfr
Posts: 17
Joined: Wed Jun 20, 2012 12:52 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Oct 29, 2017 8:11 pm

Like you John, I've been running this for years with uptime in the months and only ever had hardware errors, specifically SD cards and power. You've probably tried the following but perhaps one of these will work:
If you've eliminated the SD card then check on the power - some of my battery ones have done a similar thing when the battery ran low (not enough amps going to the cam). Change the cable and power adaptor if you can - the cable specifically can be an issue and I've had multiple similar issues with low quality or long leads.
I've had SD cards that went wrong out of the box (some have fallen apart!) so possibly take a new card with an older os.
Have a look at the flat cable running to the camera as I've had one that cracked causing an intermittent fault
Replace the camera if you've got a spare, clean it and double check the sunny connector - you never know, it might be shorting somewhere.
Finally change the pi.
I hope you get this sorted and will be interested in what you've found :)

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

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 30, 2017 5:22 am

Ah, you make a good point about the power supply. I didn't think of that this time, but it's good to check- as I recall this one was pretty cheap and I've had others go bad before.

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

what causes camera to not take picture sometimes?

Mon Oct 30, 2017 2:05 pm

I just set up a different system and power supply from the Pi I just posted about. Installed pikrellcam from git yesterday, so it is current code. This one has an external motion sensor connected to a GPIO and I have my own process watching the GPIO and sending a command into the Pikrellcam FIFO

Code: Select all

"echo 'still' > /home/pi/pikrellcam/www/FIFO"
to capture a still image when motion happens.

The external sensor went off twice last night, at 2:13 am and 6:17 am according to the log from my own software. Only the second signal caused an image to be recorded (of a stray cat), there was no photo taken at 2:13 even though both signals do show up in the Pikrellcam log. Is there any likely explanation for this? Would there be some note in the log if the camera were temporarily not working?

Code: Select all

========================================================
======= PiKrellCam 4.0.5 started at 2017-10-29 14:36:17
========================================================
command FIFO: /home/pi/pikrellcam/www/FIFO
audio FIFO  : /home/pi/pikrellcam/www/audio_FIFO
mjpeg stream: /run/pikrellcam/mjpeg.jpg

[...many lines omitted for brevity...]

========================================================
2017-10-30 ================== New Day ==================
========================================================
sunrise/sunset times: valid  dawn/dusk times: valid
  dawn:    5:20
  sunrise: 5:45
  sunset:  16:45
  dusk:    17:09
00:00:00 :   execl[wait:1]: /home/pi/pikrellcam/scripts-dist/_log-lines 500 /tmp/pikrellcam.log
02:13:04 : command_process: still
06:17:06 : command_process: still
06:17:06 : Still: /home/pi/pikrellcam/media/stills/image_2017-10-30_06.17.06_74.jpg

billw
Posts: 363
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 30, 2017 3:09 pm

budlande wrote:
Sun Oct 29, 2017 1:46 pm
I have pikrellcam setup and working for video, however am having issues with audio. I see the dB bar moving up and down, but when I click to manually record, there doesn’t seem to be sound on the video.
Here is the log entry from the manual record:
08:44:05 : command_process: record on
08:44:05 : Manual record start - /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264
08:44:05 : event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg
08:44:14 : command_process: record off
08:44:14 : execl[wait:0]: (nice -n 5 MP4Box -quiet -tmp /tmp -fps 24.001 -add /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264 -add /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp3 /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp4 2> /dev/null && rm /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264 /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp3 /run/pikrellcam/motion_converting )
08:44:14 : Manual record stop (size:6.9MB < /tmp:20766.9MB) vid_time:9.67 vid_fps:24.00 audio_frames:463971 audio_rate:48000
08:44:15 : execl[wait:0]: convert /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg -resize 150x84 /home/pi/pikrellcam/media/thumbs/manual_2017-10-29_08.44.05_0.th.jpg && rm /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg

When I hit the arrow key in the mic controls, I am see the following in the logs:
08:28:27 : Failed to open audio FIFO (no reader?): /home/pi/pikrellcam/www/audio_FIFO. No such device or address


Any thoughts?
A moving VU meter and your log says audio data is being read and written. The "Manual record stop" line shows the audio frames
read and the calculated audio rate which looks good. Could the sound card audio playback be muted? That has to be dealt with
outside of pikrellcam.

Stop pikrellcam with the web control, and then run from a terminal:

Code: Select all

$ pikrellam -ad 1
Then after a video record the raw audio data read will be saved to /tmp/debug.wav. Can that be played with aplay?
Also, what about an arecord then aplay test?

About the audio_FIFO error, is there any error farther up in the log about the audio_FIFO being created?
Do the files ~/pikrellcam/www/FIFO and ~/pikrellcam/www/audio_FIFO exist?

billw
Posts: 363
Joined: Tue Sep 18, 2012 8:23 pm

Re: what causes camera to not take picture sometimes?

Mon Oct 30, 2017 3:38 pm

jbeale wrote:
Mon Oct 30, 2017 2:05 pm
I just set up a different system and power supply from the Pi I just posted about. Installed pikrellcam from git yesterday, so it is current code. This one has an external motion sensor connected to a GPIO and I have my own process watching the GPIO and sending a command into the Pikrellcam FIFO

Code: Select all

"echo 'still' > /home/pi/pikrellcam/www/FIFO"
to capture a still image when motion happens.

The external sensor went off twice last night, at 2:13 am and 6:17 am according to the log from my own software. Only the second signal caused an image to be recorded (of a stray cat), there was no photo taken at 2:13 even though both signals do show up in the Pikrellcam log. Is there any likely explanation for this? Would there be some note in the log if the camera were temporarily not working?
The still command sets up for a still capture callback and if that succeeds or there is any error in doing that there should be a log entry.
So there should have been something after the first "command process: still" line regardless of camera callback. It's as if the command
came in but the still capture function did not get called which I'm at a loss to explain at the moment.

The second still has a sequence number 74, is there a still sequence 73 at some other time than your logged 2:13 still command?

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

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 30, 2017 4:27 pm

There was a bunch of activity the previous day (10/29) that I omitted for brevity. I can check the log this evening but it is quite possible there were 73 photos taken the previous day. As far as I noticed it did capture every image when requested yesterday, but there was only the one photo successfully taken this morning. Pikrellcam is running without internal motion detection activated, in this case I am using it only to take the still image when signalled. I wonder if this is a rare situation, if most people use it with the internal motion detection active. I wonder if there is some edge case such that the very first external signal seen after midnight doesn't activate a process that otherwise would work, if it had come from internal motion detect?

The hardware in this case is an old RPi Model A with a wifi adaptor on its single USB port. I have another similar setup working reliably with Pikrellcam so I assume there is no hardware issue, but I guess anything's possible.

If it's relevant, here is the C code running that watches the GPIO and when triggered, sends the signal to the FIFO. I was planning to eventually ask for video recording also, but have not yet included that call. https://github.com/jbeale1/Lidar/blob/master/mdet2.c

EDIT: for what its worth, looks like it worked OK yesterday, and this morning. So whatever happened, seems to be unusual.

Code: Select all

22:53:24 : command_process: still
22:53:24 : Still: /home/pi/pikrellcam/media/stills/image_2017-10-30_22.53.24_78.jpg
23:42:10 : command_process: still
23:42:10 : Still: /home/pi/pikrellcam/media/stills/image_2017-10-30_23.42.10_79.jpg
23:54:07 : command_process: still
23:54:07 : Still: /home/pi/pikrellcam/media/stills/image_2017-10-30_23.54.07_80.jpg
23:54:29 : command_process: still
23:54:29 : Still: /home/pi/pikrellcam/media/stills/image_2017-10-30_23.54.29_81.jpg
23:58:57 : command_process: still
23:58:57 : Still: /home/pi/pikrellcam/media/stills/image_2017-10-30_23.58.57_82.jpg

========================================================
2017-10-31 ================== New Day ==================
========================================================
sunrise/sunset times: valid  dawn/dusk times: valid
  dawn:    5:21
  sunrise: 5:45
  sunset:  16:44
  dusk:    17:08
00:00:00 :   execl[wait:1]: /home/pi/pikrellcam/scripts-dist/_log-lines 500 /tmp/pikrellcam.log
01:25:44 : command_process: still
01:25:44 : Still: /home/pi/pikrellcam/media/stills/image_2017-10-31_01.25.44_83.jpg
Last edited by jbeale on Tue Oct 31, 2017 2:02 pm, edited 1 time in total.

budlande
Posts: 4
Joined: Sun Oct 29, 2017 1:36 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 31, 2017 1:39 am

billw, thanks so much for the reply. I tried what you suggested, see my results below.
billw wrote:
Mon Oct 30, 2017 3:09 pm
budlande wrote:
Sun Oct 29, 2017 1:46 pm
I have pikrellcam setup and working for video, however am having issues with audio. I see the dB bar moving up and down, but when I click to manually record, there doesn’t seem to be sound on the video.
Here is the log entry from the manual record:
08:44:05 : command_process: record on
08:44:05 : Manual record start - /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264
08:44:05 : event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg
08:44:14 : command_process: record off
08:44:14 : execl[wait:0]: (nice -n 5 MP4Box -quiet -tmp /tmp -fps 24.001 -add /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264 -add /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp3 /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp4 2> /dev/null && rm /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.h264 /home/pi/pikrellcam/media/videos/manual_2017-10-29_08.44.05_0.mp3 /run/pikrellcam/motion_converting )
08:44:14 : Manual record stop (size:6.9MB < /tmp:20766.9MB) vid_time:9.67 vid_fps:24.00 audio_frames:463971 audio_rate:48000
08:44:15 : execl[wait:0]: convert /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg -resize 150x84 /home/pi/pikrellcam/media/thumbs/manual_2017-10-29_08.44.05_0.th.jpg && rm /run/pikrellcam/manual_2017-10-29_08.44.05_0.jpg

When I hit the arrow key in the mic controls, I am see the following in the logs:
08:28:27 : Failed to open audio FIFO (no reader?): /home/pi/pikrellcam/www/audio_FIFO. No such device or address


Any thoughts?
A moving VU meter and your log says audio data is being read and written. The "Manual record stop" line shows the audio frames
read and the calculated audio rate which looks good. Could the sound card audio playback be muted? That has to be dealt with
outside of pikrellcam.

Stop pikrellcam with the web control, and then run from a terminal:

Code: Select all

$ pikrellam -ad 1
Then after a video record the raw audio data read will be saved to /tmp/debug.wav. Can that be played with aplay?
Also, what about an arecord then aplay test?
I did this and then scp'd it over to my mac. The debug.wav file played just fine. Then on a hunch, I copied the mp4 file over to my mac and opened the file in VLC versus quicktime player. It played fine in VLC. Ultimately I want this to work for my church to record the sermons for our pastor and congregation. I am going to upload it to google drive and see if it will convert it.
billw wrote:
Mon Oct 30, 2017 3:09 pm
About the audio_FIFO error, is there any error farther up in the log about the audio_FIFO being created?
Do the files ~/pikrellcam/www/FIFO and ~/pikrellcam/www/audio_FIFO exist?
Yes both files exist:

Code: Select all

prw-rw-r--  1 pi       www-data      0 Oct 30 19:47 audio_FIFO
prw-rw-r--  1 pi       www-data      0 Oct 30 19:53 FIFO
Again, I appreciate the help with this. It looks like it will not natively play on my mac and/or iPhone. I suppose I could try vlc on the mac, but that still leaves the iPhone out. Hopefully the Google Drive trick will work, it does a nice job of converting to multiple formats... I will report back on what I find.

budlande
Posts: 4
Joined: Sun Oct 29, 2017 1:36 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 31, 2017 3:35 am

budlande wrote:
Tue Oct 31, 2017 1:39 am
billw, thanks so much for the reply. I tried what you suggested, see my results below.
.....
I did this and then scp'd it over to my mac. The debug.wav file played just fine. Then on a hunch, I copied the mp4 file over to my mac and opened the file in VLC versus quicktime player. It played fine in VLC. Ultimately I want this to work for my church to record the sermons for our pastor and congregation. I am going to upload it to google drive and see if it will convert it.
.....
Again, I appreciate the help with this. It looks like it will not natively play on my mac and/or iPhone. I suppose I could try vlc on the mac, but that still leaves the iPhone out. Hopefully the Google Drive trick will work, it does a nice job of converting to multiple formats... I will report back on what I find.
This ended up working. Once converted by Google Drive, the file was playable from my mac and my iPhone. I think I have a workable solution now. Thanks for you confirmation and help billw, great software!

budlande
Posts: 4
Joined: Sun Oct 29, 2017 1:36 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 31, 2017 3:41 am

Hey, I came up with another thought... Can you run a script after triggering a manual start and stop of the video? I know there is the on_motion_end script, but is there a on_manual_end script as well? I searched the forum and looked at the pikrellcam.conf file, but didn't see anything? I would like to manually record a movie and then have the script copy it up to google drive for me. I have the google drive script ready and working for on_motion_end.

qils
Posts: 3
Joined: Tue Oct 31, 2017 9:39 am

can't access the pikrell webpage after installation

Tue Oct 31, 2017 9:42 am

hi. ive installed the pikrellcam but i cant access it on my web browser.can you help me? and what is nginx? am i supposed to install that before pikrellcam?

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

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 31, 2017 1:55 pm

If you install Pikrellcam by doing

Code: Select all

cd /home/pi
git clone https://github.com/billw2/pikrellcam.git
cd pikrellcam
./install-pikrellcam.sh
running the install script will automatically download and install nginx. I have installed this many times on many systems, and it has worked for me. If nginx is not running on your system after the install script completes successfully there must be something different about your R-Pi. Which version of Raspbian are you running?

qils
Posts: 3
Joined: Tue Oct 31, 2017 9:39 am

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 31, 2017 3:32 pm

jbeale wrote:
Tue Oct 31, 2017 1:55 pm
If you install Pikrellcam by doing

Code: Select all

cd /home/pi
git clone https://github.com/billw2/pikrellcam.git
cd pikrellcam
./install-pikrellcam.sh
running the install script will automatically download and install nginx. I have installed this many times on many systems, and it has worked for me. If nginx is not running on your system after the install script completes successfully there must be something different about your R-Pi. Which version of Raspbian are you running?
jessie

qils
Posts: 3
Joined: Tue Oct 31, 2017 9:39 am

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 31, 2017 3:42 pm

Code: Select all

[code]
[/code]
jbeale wrote:
Tue Oct 31, 2017 1:55 pm
If you install Pikrellcam by doing

Code: Select all

cd /home/pi
git clone https://github.com/billw2/pikrellcam.git
cd pikrellcam
./install-pikrellcam.sh
running the install script will automatically download and install nginx. I have installed this many times on many systems, and it has worked for me. If nginx is not running on your system after the install script completes successfully there must be something different about your R-Pi. Which version of Raspbian are you running?
[email protected]:~ $ cd /home/pi
[email protected]:~ $ git clone https://github.com/billw2/pikrellcam.git
fatal: destination path 'pikrellcam' already exists and is not an empty directory.
[email protected]:~ $ cd pikrellcam
[email protected]:~/pikrellcam $ ./install-pikrellcam.sh

Set the port for the nginx web server.
If you already have a web server configuration using the default
port 80, you should enter an alternate port for PiKrellCam.
Otherwise you can use the default port 80 or an alternate as you wish.
The port number will be set in: /etc/nginx.sites-available/pikrellcam.
Enter web server port: 80

For auto starting at boot, a PiKrellCam start command must be in rc.local.
If you don't start at boot, PiKrellCam can always be started and stopped
from the web page.
Do you want PiKrellCam to be auto started at boot? (yes/no): yes

A web password is already set.
Do you want to change the password (yes/no)? yes
Enter a password for a web page login for user: pi
Enter a blank entry if you do not want the password login.
Enter password: qilah

Starting PiKrellCam install...
No packages need to be installed.
Adding a pikrellcam autostart command to /etc/rc.local:
su pi -c '(sleep 5; /home/pi/pikrellcam/pikrellcam) &'
Adding to /etc/sudoers.d: www-data permission to run pikrellcam as user pi:
Adding password for user pi
Installing /etc/nginx/sites-available/pikrellcam
nginx web server port: 80
nginx web server root: /home/pi/pikrellcam/www
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.

Install finished.
This install script does not automatically start pikrellcam.
To start pikrellcam, open a browser page to:
http://your_pi
and click on the "System" panel and then the "Start PiKrellCam" button.
PiKrellCam can also be run from a Pi terminal for testing purposes.
Automatic pikrellcam starting at boot is enabled.

**Is this what you got when you installed pikrellcam?

User avatar
underwhelmd
Posts: 93
Joined: Fri Jul 08, 2016 10:05 pm
Location: East Coast, Canada

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 31, 2017 4:34 pm

Just wanted to bring attention to a small bug (not a complaint!, I love this software)

I can re-create this on all 5 pi, all running stretch except 1 is jessie. pikrellcam is up to date. It has to do with the TIMES section in setup. When I set the pre or post capture time, and click select, the menu will freeze there requiring a "stop" and then "start" to get it responsive again.

There is nothing in the logs that looks wrong. It appeared several versions of pikrellcam ago and I've just learned to set the times manually by editing the conf and restarting pikrellcam. Am I doing something wrong or is this a problem?

billw
Posts: 363
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Nov 01, 2017 2:39 am

budlande wrote:
Tue Oct 31, 2017 3:41 am
Hey, I came up with another thought... Can you run a script after triggering a manual start and stop of the video? I know there is the on_motion_end script, but is there a on_manual_end script as well?
There's not a on_manual_end, but I'll put one in.

billw
Posts: 363
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Nov 01, 2017 2:42 am

underwhelmd wrote:
Tue Oct 31, 2017 4:34 pm
When I set the pre or post capture time, and click select, the menu will freeze there requiring a "stop" and then "start" to get it responsive again.
Thanks for mentioning this. I see I overlooked something when I made a change a while back and will get a fix out soon.

Return to “Camera board”