Witska
Posts: 5
Joined: Tue Oct 04, 2016 6:37 pm

Re: RPi Cam Web Interface

Tue Oct 04, 2016 9:23 pm

btidey wrote: See the posts just above this.

Convert uses gstreamer1.0 which is standard on full Raspbian but is not present in Jessie Lite. I did a gstreamer1.0 install but that is a very heavy install. Pangu has done some research and has narrowed down the minimum extra packages to be added to Lite, and asked for verification.

If this is OK then I could add these to the install script.
These 9 packages already is in full Jessie version. After apt-get install gstreamer1.0 need to download 68.2 MB archives. After this operation will be used for an additional 226 MB of disk space.
And I'm getting error and conversion does not work anyway.

Code: Select all

Errors were encountered while processing:
  /var/cache/apt/archives/gnome-packagekit-data_3.14.0-1_all.deb
  /var/cache/apt/archives/gnome-packagekit-session_3.14.0-1+b1_armhf.deb
E: Sub-process / usr / bin / dpkg returned an error code (1)

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

Re: RPi Cam Web Interface

Wed Oct 05, 2016 8:17 am

Witska wrote:
btidey wrote: See the posts just above this.

Convert uses gstreamer1.0 which is standard on full Raspbian but is not present in Jessie Lite. I did a gstreamer1.0 install but that is a very heavy install. Pangu has done some research and has narrowed down the minimum extra packages to be added to Lite, and asked for verification.

If this is OK then I could add these to the install script.
These 9 packages already is in full Jessie version. After apt-get install gstreamer1.0 need to download 68.2 MB archives. After this operation will be used for an additional 226 MB of disk space.
And I'm getting error and conversion does not work anyway.

Code: Select all

Errors were encountered while processing:
  /var/cache/apt/archives/gnome-packagekit-data_3.14.0-1_all.deb
  /var/cache/apt/archives/gnome-packagekit-session_3.14.0-1+b1_armhf.deb
E: Sub-process / usr / bin / dpkg returned an error code (1)
What image resolution are you using? The gstreamer convert uses the GPU and will only work for 'video' type resolutions within the GPU capabilities. It will not work with the highest resolution images like 2592 x 1944. Try starting with 1296 x 972. I think 1920 x 1080 is about the highest.

Witska
Posts: 5
Joined: Tue Oct 04, 2016 6:37 pm

Re: RPi Cam Web Interface

Wed Oct 05, 2016 8:32 am

Thanks. Work 1296 x 972, 1920 x 1080 not work. I'll try to find the maximum resolution.

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

Re: RPi Cam Web Interface

Wed Oct 05, 2016 9:04 am

Witska wrote:Thanks. Work 1296 x 972, 1920 x 1080 not work. I'll try to find the maximum resolution.
OK. Let me know the result. 1920 x 1080 worked for me on Jessie full on a Pi 3
Edit. Also on Pi 0 running Jessie Lite + gstreamer install

Witska
Posts: 5
Joined: Tue Oct 04, 2016 6:37 pm

Re: RPi Cam Web Interface

Wed Oct 05, 2016 11:54 am

In full Jessie version 1920 x 1080 work. In Lite version after install 9 packages 1920 x 1080 work, but with artifact, the green line at the bottom.
Edit. And after install full gstreamer1.0 1920 x 1080 work, but with artifact, the green line at the bottom.

apmartins
Posts: 2
Joined: Thu Jan 28, 2016 5:46 pm

Re: RPi Cam Web Interface

Wed Oct 05, 2016 3:09 pm

Hello Guys!

Firstly I would to say congratulations for this code.

Secondly, I'm sorry for my terrible english. :(

Thirdly, What I would know is How the function "record image" works?
I ask because I'm trying to use this function without the click button. So, if I detect someone, I'm gonna take a photo and send on email. I know that you can use raspistill, but I know, also, that can't use together with the raspimjpeg. Does anyone knows how this "function"works?

thanx, André

apmartins
Posts: 2
Joined: Thu Jan 28, 2016 5:46 pm

Re: RPi Cam Web Interface

Wed Oct 05, 2016 4:58 pm

apmartins wrote:Hello Guys!

Firstly I would to say congratulations for this code.

Secondly, I'm sorry for my terrible english. :(

Thirdly, What I would know is How the function "record image" works?
I ask because I'm trying to use this function without the click button. So, if I detect someone, I'm gonna take a photo and send on email. I know that you can use raspistill, but I know, also, that can't use together with the raspimjpeg. Does anyone knows how this "function"works?

thanx, André
Hey guys, I think I got the anwser! FIFO!

echo 'im' >/var/www/FIFO

thanx!

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

Re: RPi Cam Web Interface

Wed Oct 05, 2016 5:47 pm

Witska wrote:[...] In Lite version after install 9 packages 1920 x 1080 work, but with artifact, the green line at the bottom.
Edit. And after install full gstreamer1.0 1920 x 1080 work, but with artifact, the green line at the bottom.
I am also having this green artifact line on the bottom of the produced timelapse video. I have no clue yet where this is related to. If anyone got more information about it and how to fix (which package is needed to avoid it) then please share this information with us. Thank you

snirhordan
Posts: 5
Joined: Wed Oct 05, 2016 11:08 pm

Installation

Wed Oct 05, 2016 11:21 pm

Hi !
After following the steps on the linux page the interface installation gives the following error:

//*
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
dialog
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
Need to get 233 kB of archives.
After this operation, 750 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
dialog
E: There are problems and -y was used without --force-yes
Raspbian Jessie
File /etc/rc.local Exist.
File /etc/passwd Exist.
*//

And for starting:
//*
raspimjpeg: no process found
php: no process found
motion: no process found
This account is currently not available.
This account is currently not available.8*//

Is this a common problem? How can I fix it?

Thanks
Senir Hordan

User avatar
kyoukoku
Posts: 6
Joined: Sun Jan 03, 2016 1:10 pm
Location: London, UK

Re: RPi Cam Web Interface

Thu Oct 06, 2016 12:54 am

I've been trying to get RPiCWI to record video using the v2 Cam module's 720p@90fps (mode 6) capability, but when clicking the "record video start" button, nothing happens & if I have a terminal window open on the Pi, I see this error come up:

Code: Select all

pi@RasPi:~/RPi_Cam_Web_Interface $ mmal: mmal_vc_port_enable: failed to enable port vc.ril.video_encode:in:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable connected port (vc.ril.video_encode:in:0(OPQV))0x1baa100 (EINVAL)
mmal: mmal_connection_enable: output port couldn't be enabled
It works fine with 480p@90fps (v2's mode 7) and I can get 720p@90fps video out directly/manually via both:

Code: Select all

sudo modprobe bcm2835-v4l2
v4l2-ctl -p 90
v4l2-ctl -v width=1280,height=720,pixelformat=H264
v4l2-ctl --stream-mmap=3 --stream-count=900 --stream-to=test1-90fps.h264
&

Code: Select all

raspivid -w 1280 -h 720 --mode 6 -fps 90 -t 10000 -o test2-90fps.h264
So why is it not working with RPiCWI?

I've tried this on a Pi0, Pi2 & Pi3, all with exactly the same error.

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

Re: RPi Cam Web Interface

Thu Oct 06, 2016 1:21 pm

kyoukoku wrote:I've been trying to get RPiCWI to record video using the v2 Cam module's 720p@90fps (mode 6) capability, but when clicking the "record video start" button, nothing happens & if I have a terminal window open on the Pi, I see this error come up:

Code: Select all

pi@RasPi:~/RPi_Cam_Web_Interface $ mmal: mmal_vc_port_enable: failed to enable port vc.ril.video_encode:in:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable connected port (vc.ril.video_encode:in:0(OPQV))0x1baa100 (EINVAL)
mmal: mmal_connection_enable: output port couldn't be enabled
It works fine with 480p@90fps (v2's mode 7) and I can get 720p@90fps video out directly/manually via both:

Code: Select all

sudo modprobe bcm2835-v4l2
v4l2-ctl -p 90
v4l2-ctl -v width=1280,height=720,pixelformat=H264
v4l2-ctl --stream-mmap=3 --stream-count=900 --stream-to=test1-90fps.h264
&

Code: Select all

raspivid -w 1280 -h 720 --mode 6 -fps 90 -t 10000 -o test2-90fps.h264
So why is it not working with RPiCWI?

I've tried this on a Pi0, Pi2 & Pi3, all with exactly the same error.
I haven't tried this but I suspect it is because raspimjpeg actually makes several connections to the MMAL interface for the video, vectors and mjpeg live stream and this may be beyond the GPU capabilities at this frame rate and resolution. It might be worth trying increasing the GPU memory allocation to see if that makes a difference.

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

Re: Installation

Thu Oct 06, 2016 1:31 pm

snirhordan wrote:Hi !
After following the steps on the linux page the interface installation gives the following error:

//*
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
dialog
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
Need to get 233 kB of archives.
After this operation, 750 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
dialog
E: There are problems and -y was used without --force-yes
Raspbian Jessie
File /etc/rc.local Exist.
File /etc/passwd Exist.
*//

And for starting:
//*
raspimjpeg: no process found
php: no process found
motion: no process found
This account is currently not available.
This account is currently not available.8*//

Is this a common problem? How can I fix it?

Thanks
Senir Hordan
First time a sequence like this has been reported so I don't think this is a common problem.

When the install.sh is run for the first time then it first installs the dialog package which allows for a simple menu to be used in the rest of the install. It sounds like this did not work for some reason.

Did you get a menu offering the options for the rest of the install? What did you start from, a standard jessie install or has other stuff been loaded first?

The install.sh also writes a file called install.txt while it is running which logs the steps it is taking. That can give a better idea where something may be going wrong.

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

Re: RPi Cam Web Interface

Mon Oct 10, 2016 3:39 pm

Anyone knows why there is a green artifact line on the bottom when you create a timelapse video?

all the images contained within a timelapse recording does not show any artifact. After pressing the "CONVERT" button and the convert finished, the produced .mp4 timelapse video shows an annoying and disturbing green artifact line on the bottom of the video. Tried various pixel settings for the recorded timelapse images but it didnt help.

Any clues?

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

Re: RPi Cam Web Interface

Mon Oct 10, 2016 4:23 pm

Pangu wrote:Anyone knows why there is a green artifact line on the bottom when you create a timelapse video?

all the images contained within a timelapse recording does not show any artifact. After pressing the "CONVERT" button and the convert finished, the produced .mp4 timelapse video shows an annoying and disturbing green artifact line on the bottom of the video. Tried various pixel settings for the recorded timelapse images but it didnt help.

Any clues?
I can't reproduce this at the moment. Tried a couple of resolutions 1280x960, 1296x972; no green line.

Can you tell whether the artefact is 1 pixel line or more? Can you also see if the video resolution matches exactly the image resolution. E.g. if converting 1280x960 is the video also 1280x960?

Witska
Posts: 5
Joined: Tue Oct 04, 2016 6:37 pm

Re: RPi Cam Web Interface

Mon Oct 10, 2016 5:03 pm

Green artifact line on the bottom of the video:
1920x1080
1296x972
Edit. 768x576, 1280x720 and 1280x960 without green artifact.

HSternIsBatman
Posts: 7
Joined: Tue Sep 16, 2014 6:18 pm

Re: RPi Cam Web Interface

Tue Oct 11, 2016 4:39 pm

I'm probably missing something obvious here...

Can I schedule a timelapse to run between Time A and Time B? I don't need any motion to trigger a capture....

thanks,

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

Re: RPi Cam Web Interface

Tue Oct 11, 2016 6:02 pm

Witska wrote:Green artifact line on the bottom of the video:
1920x1080
1296x972
Edit. 768x576, 1280x720 and 1280x960 without green artifact.
confirming that

lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Re: RPi Cam Web Interface

Wed Oct 12, 2016 5:49 pm

Loving this app so far the best solution I have found for using the camera on the Pi and will allow us to push forward with are projects...

Two this that would be great to see is a dedicate app but most of all support for 3d side by side(google card board)...
if this could be implimented it would be fantastic...


Please keep up the fantastic work...


regards
Lohtse
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

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

Re: RPi Cam Web Interface

Thu Oct 13, 2016 3:12 pm

@btidey:

I'd like to perform some timelapse conversion tests locally on my RPi at the shell prompt. Can you provide some information on how this command needs to be executed on the shell ?

Example:
My goal is to create the timelapse video for the timelapse image records 0023

here is the output of following command:

Code: Select all

 ls -lhu /var/www/media/tl_0023* | head
-rw-r--r-- 1 www-data www-data 80K Okt 12 07:12 tl_0023_0001_20161012_071252.jpg
-rw-r--r-- 1 www-data www-data 10K Okt 12 07:12 tl_0023_0001_20161012_071252.jpg.t0023.th.jpg
-rw-r--r-- 1 www-data www-data 81K Okt 12 07:12 tl_0023_0002_20161012_071257.jpg
-rw-r--r-- 1 www-data www-data 81K Okt 12 07:13 tl_0023_0003_20161012_071302.jpg
-rw-r--r-- 1 www-data www-data 81K Okt 12 07:13 tl_0023_0004_20161012_071307.jpg
-rw-r--r-- 1 www-data www-data 81K Okt 12 07:13 tl_0023_0005_20161012_071312.jpg
-rw-r--r-- 1 www-data www-data 81K Okt 12 07:13 tl_0023_0006_20161012_071317.jpg
-rw-r--r-- 1 www-data www-data 81K Okt 12 07:13 tl_0023_0007_20161012_071322.jpg
-rw-r--r-- 1 www-data www-data 81K Okt 12 07:13 tl_0023_0008_20161012_071327.jpg
How do I need to execute this command so it will convert only the tl_0023* stuff ??

Code: Select all

gst-launch-1.0  -v multifilesrc location=i_%05d.jpg caps=\"image/jpeg,framerate=\(fraction\)30/1\" ! jpegdec ! queue ! videoscale ! video/x-raw ! queue ! omxh264enc target-bitrate=15000000 control-rate=variable ! video/x-h264, profile=high ! h264parse ! mp4mux ! filesink location=
Thanks in advance

GOPI56
Posts: 29
Joined: Sat Aug 13, 2016 10:13 am
Location: Malaysia

Re: RPi Cam Web Interface

Tue Oct 18, 2016 2:05 pm

Hi All,

I would like to create a pop up notification on the Web Interface when motion is detected. How should i do that anyone ?

Thank you.

snirhordan
Posts: 5
Joined: Wed Oct 05, 2016 11:08 pm

Schedule Settings Day Mode

Wed Oct 19, 2016 3:03 pm

Hi,

I am trying to set a scheduler on day mode, so it starts/stops recording on an hourly basis. I am getting this message:

[2016/10/19 17:48:58] Start capture request ignored, day period not initialised yet

Do I need to reconfigure the config.php file?

Thanks!! :D

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

Re: RPi Cam Web Interface

Wed Oct 19, 2016 8:58 pm

Tutorial: Turn on and off motion detection using IFTTT Do Buttons

Would you like the ability to turn on and off motion detection on your Rpi Cam Web Interface from your phone with just the press of an IFTTT DO button (rather than logging into the camera's website)?

An extra bonus on the iPhone is the ability to add DO button to the home screen widget, so it's really easy to control your camera. Plus it's not limited to motion detection - anything the pipe commands can do (http://elinux.org/RPi-Cam-Web-Interface#Pipe), the DO button can do too!

Code: Select all

cd ~
git clone https://github.com/andreafabrizi/Dropbox-Uploader.git
cd Dropbox-Uploader/
chmod +x dropbox_uploader.sh
./dropbox_uploader.sh
(Instructions from within dropbox-uploader)
- Open the following URL in your Browser, and log in using your account: https://www.dropbox.com/developers/apps
- Click on "Create App", then select "Dropbox API app"
- Now go on with the configuration, choosing the app permissions and access restrictions to your DropBox folder
- Enter the "App Name" that you prefer (e.g. MyPiUploader)

- Now, click on the "Create App" button.

- When your new App is successfully created, please click on the Generate button
under the 'Generated access token' section, then copy and paste the new access token here:

# Access token: <paste here>

Code: Select all

cd ~
git clone https://github.com/enkydu/Raspi_Runner
cd Raspi_Runner/
chmod +x raspi_runner.sh
./raspi_runner.sh
What is name of Dropbox folder, for Raspi Runner commands? (i.e. Raspi_Commands): scripts
what is the full path to your Dropbox Uploader? (i.e. /home/pi/Dropbox_Uploader): /home/pi/Dropbox-Uploader
Note - ensure the path has Dropbox-Uploader instead of the default Dropbox_Uploader

Create a text file with the following content and copy to scripts folder in dropbox:

Code: Select all

echo 'md 1' > /var/www/html/FIFO
Test by running the command below (it should turn on motion detection - 'md 0' will turn off motion)

Code: Select all

/home/pi/Raspi_Runner/raspi_runner.sh
(it will delete the file created above after executing the echo command)

Optional:
If you've installed raspi_runner on a central Pi server, you can send commands via ssh to remote cameras using the following command in the text file:

On

Code: Select all

echo "md 1" | ssh camserv 'cat > /var/www/html/FIFO'
Off

Code: Select all

echo "md 0" | ssh camserv 'cat > /var/www/html/FIFO'
You will need to set up public/private key authentication between the Pis:
https://www.howtoforge.com/set-up-ssh-w ... ebian-etch

As above, test by running /home/pi/Raspi_Runner/raspi_runner.sh
Set a schedule in cron:

Code: Select all

crontab -e
Paste the following line:

Code: Select all

*/2 * * * * /home/pi/Raspi_Runner/raspi_runner.sh > /dev/null 2>&1
And save.

Create Do Button:
(assumes you've created an IFTTT account and linked DropBox to it)


1. Press the Mortar and Pestle button bottom right or find the My Recipes page.
2. Press the + button
3. Select Channels
4. Press Dropbox
5. Press Create a New Recipe
6. Press Create a text file
7. Give your Recipe a
a. Title, e.g. Outside On (Motion)
b. Name, e.g on
c. Content, e.g. echo 'md 1' > /var/www/html/FIFO
d. Dropbox folder path, e.g. scripts
8. Click Add

What's nice about this method is that you can turn off motion detection in the middle of a recording, whereas the website button to turn motion off is greyed out until no more motion is detected.

Based on this guide here: https://github.com/enkydu/Raspi_Runner

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

Re: RPi Cam Web Interface

Mon Oct 24, 2016 12:35 pm

Hi Folks,

I just recently discovered this package and have been playing around with it. Fantastic work! I was configuring motion manually before on my Pi, but this is waaaay better.

I am having a small issue that I am hoping somebody can help with. I am attempting to save motion detection videos to a NFS drive on another Pi. I used to set these options:
target_dir /home/pi/PiHome/Media
movie_filename %Y%m%d/Cam1-%Y%m%d-%H%M%S
jpeg_filename %Y%m%d/Cam1-%Y%m%d-%H%M%S

And every new day, motion would create a new folder. I have attempted to set this here, but it just does not take. The files are saved in /home/pi/PiHome/Media instead of with the date subfolder structure.

Also, the files do not get saved with the file names I want. They are saved with {"vi-"...} the default file names that include a sequential number (which I am trying to avoid since the date and time are in the name).

I have looked in /etc/motion/motion.conf and the options are being passed from the web interface to the config file correctly.

I have also tried it this way but it does not work either:

target_dir /home/pi/PiHome/Media/%Y%m%d
picture_filename Cam1-%Y%m%d-%H%M%S
movie_filename Cam1-%Y%m%d-%H%M%S

I checked permissions on the folder and it seems ok:
pi@pimotion1:~/PiHome $ ls -la
total 4584
drwxrwxrwx 7 root root 4096 Oct 16 09:52 .
drwxr-xr-x 21 pi pi 4096 Oct 23 21:49 ..
drwxrwxrwx 25 www-data www-data 4096 Oct 24 03:00 Media

Any tips or things to try would be greatly appreciated.

Thanks!

PPi

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

Re: RPi Cam Web Interface

Mon Oct 24, 2016 1:42 pm

Hi,
Not 100% sure but you can try editing

Code: Select all

/etc/raspimjpeg
which has various path and file details.
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

Tue Oct 25, 2016 10:38 am

Mettauk wrote:Hi,
Not 100% sure but you can try editing

Code: Select all

/etc/raspimjpeg
which has various path and file details.
This is correct advice. Motion is only used for providing triggers on motion start / stop. Storage names are set up in the /etc/raspimjpeg config file.

You can definitely set up subfolders by date etc using the variables in the path names there.

For example default video path is something like
video_path /var/www/media/vi_%v_%Y%M%D_%h%m%s.mp4

changing this to
video_path /var/www/media/%Y%M%D/vi_%v_%h%m%s.mp4

would create a new subfolder each day

If you want to store on external media (network, USB drive) then it is best to leave these logical folders as is and use fstab to mount the external path to the same location.

Return to “Camera board”