-
- Posts: 16
- Joined: Mon Jan 14, 2019 6:11 pm
Re: RPi Cam Web Interface
I have tried looking through this thread but may not be using the right words.
Is there a way to set 10 minutes or so of no recording between motion detected events? We are trying to use time lapse and video for a project, but we want to maximize storage space and only need the beginning of the event. The problem we are having is that once the camera hits the max capture mode, it automatically is activated as another event and begins recording right after.
Any ideas? Thanks in advance.
Is there a way to set 10 minutes or so of no recording between motion detected events? We are trying to use time lapse and video for a project, but we want to maximize storage space and only need the beginning of the event. The problem we are having is that once the camera hits the max capture mode, it automatically is activated as another event and begins recording right after.
Any ideas? Thanks in advance.
-
- Posts: 327
- Joined: Thu Oct 11, 2012 11:52 am
- Location: Cheshire, UK
Re: RPi Cam Web Interface
@Robert
I'm wanting to add a '+' in my annotation, but the plus symbol keeps getting removed. Am I not able to add special characters in the annotation?
I'm wanting to add a '+' in my annotation, but the plus symbol keeps getting removed. Am I not able to add special characters in the annotation?
3b+, 2b, b+, b, Zero & Zero-W
Re: RPi Cam Web Interface
Is there a way to make the default user level (when there is no login required) something other than the highest level?
My ultimate goal is to grant access level 2 to anybody with no login required, and then be able to log in and get access level 6. I think the latter is doable by setting up a separate Apache configuration on a different port (although I'm certainly open to suggestions if there's a better way). However I haven't been able to figure out how to grant only level 2 access when no login is required.
My ultimate goal is to grant access level 2 to anybody with no login required, and then be able to log in and get access level 6. I think the latter is doable by setting up a separate Apache configuration on a different port (although I'm certainly open to suggestions if there's a better way). However I haven't been able to figure out how to grant only level 2 access when no login is required.
Re: RPi Cam Web Interface
Hi, sorry if this is the wrong place, but I am very new to this. I have been experimenting with this cam web interface to try to send a live feed of the camera to another computer and receive commands from the other computer. I currently am using buttons to do this and I am trying to run macros from those buttons, but I am having no luck. I want to be able to control some motors I have hooked up to the GPIO and I can do it locally on the computer through a program I wrote in python, but I haven't found a way for it to receive commands from another computer. I would like to do this either through a new app I will write on the other computer, or through a website. I have been trying to use the camera interface that this website provides, but I want to use keyboard input on the other computer to control a program on the raspberry pi that controls the GPIO and therefore the motor, and I am unsure of how to do this. I have done extensive research into this topic, but have not found a way to do it, and I am too new to python to develop something myself. If someone could just point me in the right direction, it would be much appreciated. Thank you!!
TLDR: I am looking for a way to control a raspberry pi's GPIO from another computer, while viewing the live camera feed.
TLDR: I am looking for a way to control a raspberry pi's GPIO from another computer, while viewing the live camera feed.
Re: RPi Cam Web Interface
@emphillips18 - I'm doing something very similar; I'm using the macros to accomplish this. One example: edit (or create) the end_box.sh script in the /var/www/html/macros directory to add following:
Some caveats:
*At the moment I can't edit those settings through the UI on my system; could just be me. These can be manually edited in raspimjpeg directly, if necessary (or, more appropriately, added to uconfig manually).
Code: Select all
#!/bash/bin
echo 'md 0' > /var/www/html/FIFO
sleep 600
echo 'md 1' > /var/www/html/FIFO
- You may need to change the paths (/var/www/html/...) to match your installation
- The macro scripts should be executable (e.g., run sudo chmod 744 /var/www/html/macros/end_box.sh )
- The macro scripts should be owned by www-data (e.g., run sudo chown www-data:www-data /var/www/html/macros/end_box.sh )
- Depending on your system you might need to set enforce_lf 1 in the raspimjpeg file for this to be reliable. This setting is only available in version 6.4.44 or later, and could possibly break other scripts or programs that write to the FIFO queue. (If you have scripts that use echo -n 'whatever' > /var/www/html/FIFO to issue commands, removing the -n parameter should make them compatible with the enforce_lf 1 directive.)
*At the moment I can't edit those settings through the UI on my system; could just be me. These can be manually edited in raspimjpeg directly, if necessary (or, more appropriately, added to uconfig manually).
Re: RPi Cam Web Interface
I've just installed a Samsung Smartthings hub and I'm using Action tiles to control everything. There's a tile that you can set up for media which is aimed at a camera feed but I just get a broken image all the time. In the config of ActionTiles, the checkbox I have ticked is:
This Media is an MJPEG video stream
I've tried all the combinations I can think of where ActionTiles is asking for the URL but I just get a broken image.
Has anyone done this? Or can they throw any light on it?
Cheers
A
This Media is an MJPEG video stream
I've tried all the combinations I can think of where ActionTiles is asking for the URL but I just get a broken image.
Has anyone done this? Or can they throw any light on it?
Cheers
A
Re: RPi Cam Web Interface
Hi,
is it possible to have the webinterface running with motion detection and recording and all the features and parallel an output h.264 for piping constantly to vlc for archiving a rtsp h.264 Quality stream?
Is it difficult changing the code for this?
I mean there is an video buffer which loops the video. Can the stream copied to stout for piping to vlc?
There is also the possibility of constant recording which writes to sdcard. Can the output doubled for piping?
So..while motion detected recording enabled, using webinterface, an parallel h.264 output for piping.
I have no clue or an idea where to look.
Just asking, if this is a problem of just a couple of added code lines or a whole change of an architecture.
is it possible to have the webinterface running with motion detection and recording and all the features and parallel an output h.264 for piping constantly to vlc for archiving a rtsp h.264 Quality stream?
Is it difficult changing the code for this?
I mean there is an video buffer which loops the video. Can the stream copied to stout for piping to vlc?
There is also the possibility of constant recording which writes to sdcard. Can the output doubled for piping?
So..while motion detected recording enabled, using webinterface, an parallel h.264 output for piping.
I have no clue or an idea where to look.
Just asking, if this is a problem of just a couple of added code lines or a whole change of an architecture.

Re: RPi Cam Web Interface
It looks like
Code: Select all
http://<IP>/cam_pic_new.php
Note that this can consume A LOT of bandwidth (assuming VLC isn't on the Pi) - potentially several times the bandwidth used by the standard preview in the web interface.
Take a look at https://elinux.org/RPi-Cam-Web-Interface#Data_Flow for more info.
Re: RPi Cam Web Interface
Hi,
no this is not what i meant
I want the h.264 output of the camera as an live stream parallel to the webinterface with mjpeg.
I think there were decisions made for using mjpeg. My IP-Camera can do webinterface with mjpeg preview and 3 different solutions rtsp streams.
Is this possible with RPi Cam Web Interface?
It is not that easy to launch raspivid and the Web interface. Only one process can use the camera or gpu.
So there has to be a chance to do this in the code. I dont know where to look. My question is, is this even possible?
Can the code part of recording be changed in a way that it outputs to stout for piping to vlc?
Or can the buffer part (a ring array?) splitted to not only fill the preevent buffer, but also to stout for piping?
So where to look?
Can a novice do this or try this? Thinking of copy and paste, some typing and a wonder.
no this is not what i meant

I want the h.264 output of the camera as an live stream parallel to the webinterface with mjpeg.
I think there were decisions made for using mjpeg. My IP-Camera can do webinterface with mjpeg preview and 3 different solutions rtsp streams.
Is this possible with RPi Cam Web Interface?
It is not that easy to launch raspivid and the Web interface. Only one process can use the camera or gpu.
So there has to be a chance to do this in the code. I dont know where to look. My question is, is this even possible?
Can the code part of recording be changed in a way that it outputs to stout for piping to vlc?
Or can the buffer part (a ring array?) splitted to not only fill the preevent buffer, but also to stout for piping?
So where to look?
Can a novice do this or try this? Thinking of copy and paste, some typing and a wonder.

Re: RPi Cam Web Interface
Hey all, i prepared a working Image with Raspi Cam 6.4.43 Rasbian Stretch updated, Firewall and some more, HTTPS and Htacess for Download and free, to get the needed Htaccess user and password contact me
Link to download: http://linuxnet.ddns.net/RaspiliveCam6. ... 019.img.xz
Regards
Link to download: http://linuxnet.ddns.net/RaspiliveCam6. ... 019.img.xz
Regards
Re: RPi Cam Web Interface
Hello!
Please, point me the files in repo, which contains source code of internal motion detection algorithm.
Please, point me the files in repo, which contains source code of internal motion detection algorithm.
Re: RPi Cam Web Interface
I have RPi Cam Web Interface working great! Thanks!
I have a Win10 machine client that can use a web browser to view the video that the RPi Cam Web interface is serving, exactly as designed.
On that Win10 machine, I'd like to get a video stream that I can INPUT into gstreamer on the Win10 machine, so that eventually I can feed it into another Win10 application.
What would people recommend as a strategy for that?
I have a Win10 machine client that can use a web browser to view the video that the RPi Cam Web interface is serving, exactly as designed.
On that Win10 machine, I'd like to get a video stream that I can INPUT into gstreamer on the Win10 machine, so that eventually I can feed it into another Win10 application.
What would people recommend as a strategy for that?
Re: RPi Cam Web Interface
I have RPi Cam Web Interface working great.
On a web browser on Win10 client, I can see everything as designed in the web browser window, including the video preview.
Is there a way to get access to the video stream to feed it into gstreamer on the Win10 client machine? I want to then pipe it into another WIn10 application (Mission Planner, which is a drone control program and takes gstreamer output to display video).
What strategy would be best for this?
On a web browser on Win10 client, I can see everything as designed in the web browser window, including the video preview.
Is there a way to get access to the video stream to feed it into gstreamer on the Win10 client machine? I want to then pipe it into another WIn10 application (Mission Planner, which is a drone control program and takes gstreamer output to display video).
What strategy would be best for this?
-
- Posts: 1
- Joined: Sun Feb 24, 2019 8:17 am
Re: RPi Cam Web Interface
Pretty new to this, and when the guide https://elinux.org/RPi-Cam-Web-Interface directs you to use the link http://ipAddress:port/subfolder ,i assumed it wanted you to sub in your ip/port .So i got no idea ho to tell what my port is, and i got no idea what the sub folder is. But i read the next line and it says that if you havent changed any it should be http://ipAdress ,yeah nah didnt work. both times comes up with "This site can’t be reached". couldmi get a hand?
Re: RPi Cam Web Interface
What IP are you using? Is it an internal one, or your public facing one? Which port and sub folder did you choose when you ran the setup script? If you chose Apache as the server, is Apache running?
No connection from outside world
Hi All
I need some help, please.
The rpi_cam_web_interface is running well, but only on my internal ip address currently set on http://192.168.1.170:3638 . As you can see I've defined a port as 3638.
I have configured my router to forward to this port 3638. However, when I try to access my external ip with this port, it can't find it.
Is there a setting somewhere in rpi_cam_web_interface that needs to be changed for this to work??
P.S. I have another rpi (no rpi_cam_web_Interface) that I have also given a (different) port and I forward to that and that works absolutely fine.
Thanks for any help.
I need some help, please.
The rpi_cam_web_interface is running well, but only on my internal ip address currently set on http://192.168.1.170:3638 . As you can see I've defined a port as 3638.
I have configured my router to forward to this port 3638. However, when I try to access my external ip with this port, it can't find it.
Is there a setting somewhere in rpi_cam_web_interface that needs to be changed for this to work??
P.S. I have another rpi (no rpi_cam_web_Interface) that I have also given a (different) port and I forward to that and that works absolutely fine.
Thanks for any help.
Re: No connection from outside world
There shouldn't be anything special you need to do with RPi-CWI to forward it externally. Some things to look at:feichter wrote: ↑Tue Feb 26, 2019 3:38 pmThe rpi_cam_web_interface is running well, but only on my internal ip address currently set on http://192.168.1.170:3638 . As you can see I've defined a port as 3638.
I have configured my router to forward to this port 3638. However, when I try to access my external ip with this port, it can't find it.
Is there a setting somewhere in rpi_cam_web_interface that needs to be changed for this to work??
P.S. I have another rpi (no rpi_cam_web_Interface) that I have also given a (different) port and I forward to that and that works absolutely fine.
- Double-check the Pi's IP. If you have it set up for DHCP, depending on your router, it might get a different IP after you reboot. Best to either configure it for a static IP or else configure your router to always issue it the same IP (if your router has that capability).
- If you have a firewall installed on the Pi, make sure port 3638 is open for inbound TCP traffic (or temporarily turn the firewall off for testing purposes).
- If you have customized your Apache configuration, be sure a virtualhost is defined that will respond to an external request (the default RPi-CWI config, which should be in /etc/apache2/sites-available/raspicam.conf, will have a section that starts with <VirtualHost *:3638> , which is fine for this).
- Double-check your router config to be sure you have IPs, ports, etc. set correctly.
-
- Posts: 5
- Joined: Mon Jan 30, 2017 8:37 pm
Re: RPi Cam Web Interface
Hi all,
For some reason I don't see the video's being created.
I see following logs:
but when I check /var/www/html/media or via the GUI, I don't see any movie.
Any idea?
J.
For some reason I don't see the video's being created.
I see following logs:
Code: Select all
{2019/03/03 13:41:39} External motion detection started
{2019/03/03 13:41:39} h264 search /var/www/html/media/vi_0273_20190303_134139.mp4
{2019/03/03 13:41:39} recommended video buffer size 65536
{2019/03/03 13:41:39} h264 size set to 131072
{2019/03/03 13:41:39} recommended video buffers 1
{2019/03/03 13:41:39} h264 buffers set to recommended 1
Any idea?
J.
Re: RPi Cam Web Interface
Hey all,
How do I change the path where the images are saved. I understood the line from the Wiki:
Can anyone explain if I have to do more than just edit /etc/raspimjpeg?
Thanks!
How do I change the path where the images are saved. I understood the line from the Wiki:
but notThere are separate path settings for video, images and time lapse in the /etc/raspimjpeg config file.
and what's below it.If you change the 'root' from the media folder in the web install then you also have to change that setting in the web side config.php.
Can anyone explain if I have to do more than just edit /etc/raspimjpeg?
Thanks!
Re: RPi Cam Web Interface
The wiki isn't the clearest on this. Look for the File Locations section in /etc/raspimjpeg; these are the settings you need to change. base_path is the install directory (default is /var/www/html but could be different depending on how you installed it); it's recommended that you don't mess with this as there are several other things you'd also have to change. media_path is the main media directory, and image_path, lapse_path and video_path are the paths for still images, time-lapses, and videos, respectively. (These should all be either in the media_path directory or else subdirectories of it; otherwise, certain functions misbehave.)How do I change the path where the images are saved.
It doesn't seem to work right unless the media directory is a subdirectory of the base_path.
A typical thing to do would be to use a USB drive or network share to store media files (images, video, etc.). For example you could mount a USB drive to /var/www/html/media/usb, and then edit /etc/raspimjpeg as follows (replace the base directory /var/www/html/ as appropriate):
Code: Select all
image_path /var/www/html/media/usb/im_%i_%Y%M%D_%h%m%s.jpg
lapse_path /var/www/html/media/usb/tl_%i_%t_%Y%M%D_%h%m%s.jpg
video_path /var/www/html/media/usb/vi_%v_%Y%M%D_%h%m%s.mp4
All things considered it's probably best to not try to change the configuration at all, but just mount your desired device directly to /var/www/html/media.
Re: RPi Cam Web Interface
Good day.
I have problem after isntall:
I have problem after isntall:
Code: Select all
199.199.199.150/:7 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://199.199.199.150:8080/css/style_minified.css".
199.199.199.150/:8 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://199.199.199.150:8080/css/es_Default.css".
style_minified.js:1 Uncaught SyntaxError: Unexpected token <
script.js:1 Uncaught SyntaxError: Unexpected token <
pipan.js:1 Uncaught SyntaxError: Unexpected token <
VM225:1 Uncaught SyntaxError: Unexpected token ,
Re: RPi Cam Web Interface
For the last few weeks (in my spare time), I've been trying to figure out how to get a video file from the time-lapse images. I finally figured it out (for me, the option to do it from within the otherwise excellent picam software wouldn't work).
Anyone wanting to convert the time-lapse images to an mp4, try this:
Remote to your Pi (either SSH or VNC and open a terminal), then enter this command:
Where:
-f = force format, 'image2'
-framerate = input frame rate (per second)
-i = input file(s)
%04d = 4 decimal characters (e.g. 0001) NOTE: input file must be in double quotes
-r = output frame rate (per second)
-pix_fmt = output format
-vcodec = output codec
This will create a file, timelapse.mp4, in your Documents folder.
Hope this helps and saves people the time/effort it took me to work this out.
-tk1
Anyone wanting to convert the time-lapse images to an mp4, try this:
Remote to your Pi (either SSH or VNC and open a terminal), then enter this command:
Code: Select all
/usr/bin/ffmpeg -f image2 -framerate 10 -i "/var/www/html/media/tl_0000_%04d*.jpg" -r 30 -pix_fmt yuv444p -vcodec mpeg4 Documents/timelapse.mp4
-f = force format, 'image2'
-framerate = input frame rate (per second)
-i = input file(s)
%04d = 4 decimal characters (e.g. 0001) NOTE: input file must be in double quotes
-r = output frame rate (per second)
-pix_fmt = output format
-vcodec = output codec
This will create a file, timelapse.mp4, in your Documents folder.
Hope this helps and saves people the time/effort it took me to work this out.
-tk1
- HermannSW
- Posts: 3482
- Joined: Fri Jul 22, 2016 9:09 pm
- Location: Eberbach, Germany
- Contact: Website Twitter YouTube
Re: RPi Cam Web Interface
Thanks, good to know how to do that with ffmpeg ‒ can be done with gstreamer's multifilesrc as well:
https://github.com/Hermann-SW/fork-rasp ... w2ogg2anim
https://github.com/Hermann-SW/fork-rasp ... w2ogg2anim
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/working_with_FPGAs
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/working_with_FPGAs
-
- Posts: 327
- Joined: Thu Oct 11, 2012 11:52 am
- Location: Cheshire, UK
Re: RPi Cam Web Interface
I’ve just done a fresh install on the new bigger MicroSD card and I’m using the internal motion setting, I’m getting recordings with long times 200s+
I forgot to take note of what my setting were before doing the install.
What are people’s internal motion setting please and I’ll try and reset them again, no idea why it’s not working with the default but I remembered I had to change the setting last time I installed a fresh build.
I forgot to take note of what my setting were before doing the install.
What are people’s internal motion setting please and I’ll try and reset them again, no idea why it’s not working with the default but I remembered I had to change the setting last time I installed a fresh build.
3b+, 2b, b+, b, Zero & Zero-W
Re: RPi Cam Web Interface
@Gary Littlemore
I'm trying to manage RPi Cam Web Interface process with pm2, to ensure continuous operation also after fails or restart.
I created a .sh script with start.sh content:
and then I lunch with pm2 the script:
But when the script finishes, pm2 detect the exit value and it restarts the process every second.
How can I implement it?
How can I lunch RPi Cam Web Interface with pm2?
Thanks in advance,
Ricolk
You could recover your setting from your old SD if you did't format it.I’ve just done a fresh install on the new bigger MicroSD card and I’m using the internal motion setting, I’m getting recordings with long times 200s
I'm trying to manage RPi Cam Web Interface process with pm2, to ensure continuous operation also after fails or restart.
I created a .sh script with start.sh content:
Code: Select all
#Debug enable next 3 lines
exec 5> start.txt
BASH_XTRACEFD="5"
set -x
cd $(dirname $(readlink -f $0))
source ./config.txt
fn_stop ()
{ # This is function stop
sudo killall raspimjpeg 2>/dev/null
sudo killall php 2>/dev/null
sudo killall motion 2>/dev/null
}
#start operation
fn_stop
sudo mkdir -p /dev/shm/mjpeg
sudo chown www-data:www-data /dev/shm/mjpeg
sudo chmod 777 /dev/shm/mjpeg
sleep 1;sudo su -c 'raspimjpeg > /dev/null &' www-data
if [ -e /etc/debian_version ]; then
sleep 1;sudo su -c "php /var/www/$rpicamdir/schedule.php > /dev/null &" www-data
else
sleep 1;sudo su -c '/bin/bash' -c "php /var/www/$rpicamdir/schedule.php > /dev/null &" www-data
fi
Code: Select all
pm2 start start.sh
How can I implement it?
How can I lunch RPi Cam Web Interface with pm2?
Thanks in advance,
Ricolk