silvanmelchior / rpi_cam_web_interface Goto Github PK
View Code? Open in Web Editor NEWA web interface for the RPi Cam
License: MIT License
A web interface for the RPi Cam
License: MIT License
Had this problem that Firexfox didn't stop downloading images after closing the webpage (tab). Had to restart Firefox to make it stop downloading the pictures.
Added:
window.onbeforeunload = function (){
halted=1;
};
to init() function in www/js/script.js
now it seems to stop when closing the tab.
I think there's a bit of a mess in the documentation. We have:
I think it would be good to merge all this documents into one, big documentation. If we use the wiki for example, anybody could help to complete it. What do you think?
If we took the wiki, I'd suggest the following structure:
1 Installation Instructions
1.1 Basic Installation
1.2 Startup Behaviour
1.3 Links
1.4 Special thanks
2 Usage
2.1 Basic usage (Preview, Settings, Catpures, Download)
2.2 Scheduler
2.3 Motion
3 Configuration
3.1 Configuration Scheme
3.2 Naming Scheme
4 Additions
4.1 Pipan
4.2 ...
5 Architecture
5.1 Data Flow
5.2 Control Flow
5.3 RaspiMJPEG
5.3.1 Components
5.3.2 Pipe
Hi,
so excited about the recent merge and the whole new host of features, thank you so much @roberttidey.
One thing I was thinking about is locking stuff like awb/exposure because I'm noticing substantial fluctuations in color and light with the pinoir on my security camera prototype if there's any movement in the scene.
Playing with the python picamera for faster prototyping I seem to be getting decent results by settings and releasing awb and exposure_mode at short intervals to let it adjust to the new light conditions before locking it again (computing new settings manually doesn't seem feasible/accurate).
Do you think this makes sense and could be included in RPI_CWI?
thanks,
Spike
Just followed your guide updated rasbian and cloned git
But cant start camera
raspimjpeg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
What is missing?
Hi.
I have a fresh install RASPBIAN Release date:2015-02-16
I have trying to install rpi cam web interface:
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
reboot
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install
If eth cable is connected everything works fine install no problem and system reboot and everything is perfect
But if i use instead usb (active powered usb hub) wlan dongle (module 8192cu) install fail of the end. And after reboot system first load, but after less than 1 minute whole system crash.
Can you help me??
-Janne
Somehow my raspimjpeg flipped into logging lots of IFrame errors
{2015/04/11 20:18:43} Error: Error in iframe list
About 1600 per second so raspberry slowed down and log got big very quickly
Stopped and started raspimjpeg and all OK again for the moment.
i guess the README
https://github.com/silvanmelchior/userland/blob/master/host_applications/linux/apps/raspicam/README_RaspiMJPEG.md
is outdated, EVERY OTHER command suggested there is broken (at least do not work for me even by creating fifo or cheating it with text files).
pi@rpicam ~ $ /opt/vc/bin/raspimjpeg -w 640 -h 360 -d 5 -q 70 -of ./image.jpg
start monitoring for pid: 3008
{2015/05/29 00:03:18} start monitoring for pid: 3008
RaspiMJPEG Version 5.2.1
{2015/05/29 00:03:18} RaspiMJPEG Version 5.2.1
MJPEG idle
{2015/05/29 00:03:18} MJPEG idle
Error: Could not open PIPE
{2015/05/29 00:03:18} Error: Could not open PIPE
My project requires a raspberry pi A(+) powered by solar panel and battery, gotta minimize power drain. It should just perform mjpeg stream, then a different device in touch with wifi will run motion and whatever is cpu intensive. I hope raspimjpeg could be my solution!
Idea: Protect settings or whole interface with a password
To do this, many other security holes needs to be fixed
HI silvanmelchior,
I have tried a few times trying to bring robert and ccrisan. The following is the newest attempt for me to get ccrisan involved.
https://github.com/ccrisan/motionPie/issues/184
I don't know much of essence of development; althrough, robert kinly explained me a few times the vision and focues of two projects might be too apart to fusion together.
I still feel that ccrisan's gui is more fluid and could be leveraged. Whether we leverage supporing for usb cam or not, doesn't matter. It can always come later. However, it may simply use on of motion thread-1.conf to control this pie cam via mmal api (not from /dev/video0, this is motionEye/motionPie's usage).
Hope you guys don't feel this in anyway offending or wasting you guys time. Just want to pass on some of thoughts and it may be a good time if you can spend a bit time setting up one pi with ccrisan's project and see whether we can get those piece in.
ccrisan mentioned that he's willing to help out if someone doing this; although, he himself has other priorities.
Again, many thanks.
Is there a reason to support both boxing inline and as a separate process? Otherwise I would suggest to remove the inline-boxing, your solution is way more comfortable.
I couldn't access this forum any more.
The link resulted this,
Information: The requested topic does not exist.
Forum: http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=63276
What's happening?
tks
Is there a special reason to support v2 and v3 annotations? Otherwise I would suggest to remove v2 or at least make v3 the standard
I've noticed that in the raspimjpeg config file it's possible to disable the thumbnails generation.
However if I do this, the scheduler stops purging old files.
Looking at the code I've noticed that it's because the purgeFiles() function checks the thumbnail to retrieve the file type and then proceeds to delete all the file associated with it, thus if there's no thumbnail nothing gets deleted.
I was wondering if this should be modified?
Timelapse-Interval input box on the web interface seems to be not working. Whatever I put in, it does not change. Is there a way to have 60s interval with timelaps.
allow pi-pan to work with the interface
Can this script work with my usb camera compatible with v4l2
?
I think there may be an issue with stop_all not releasing all the resources so that stop_all followed by start_all does not always fully clear out and restart the MMAL interface.
I noticed this because occasionally I can get the system to freeze using parameter commands that use a stop_all start_all to ensure the change takes place. When this happenes manually issuing a stop camera / start camera does not recover the system and raspimjpeg itself has to be stopped and started.
There seems to be some components and connections created that are not destroyed in the stop_all.
Hi,
I am developing a little project which uses the raspimjpeg stream.
I have some noobish doubts, here they go:
When I send a change on the settings (i.e. Contrast 50) it works fine, but I dont see the changes on the /etc/raspimjpeg file. Where are these changes going to?
I don't understand the PIPE thing. I can see that when you send a change it writes on the PIPE file, but how does it work? and where is the parser of those commands?
I try to run the raspistill command when the raspimjpeg is active and it doesn't work. Do you know how could I fix it? Or another command to be able to take a snapshot while the raspimjpeg is running?
Which command does the "Record Image" button execute? Does it go through the PIPe also?
Thanks in advance,
StNNNx!
On the control web page if I enter to the Image quality box anything except 0 - 100 it pop ups an error "Error in RaspiMJPEG: Could not set quality
Restart RASPIMJPEG(./RPi_Cam_web_interface_Installer.sh start) or the whole RPi."
Also if I enter something allowed (eg. 90), and then I clear the box and hit OK, same error.
Hi, it would be great if you could add the possibility to create HDR pictures. You can find a script to process the pictures at http://teach-me-photo.blogspot.de/2012/11/raspberry-pi-hdr-machine.html
Thanks & Regards
Torsten
Setting MP4Box to false in /etc/raspimjpeg will output a video with an .mp4 extension, instead of .h264 as expected and any player including MP4Box are seing it as "Corrupted Data in file/stream".
OS: Rasbian - latest version
RPi_Cam_Web_Interface - latest version
Currently if a recording is motion initiated most of the buttons are disabled until a motion stop is received. This could lead to a situation where a motion stop is not received or has got lost for some reason and the user has no easy means of recovery.
I did contemplate enabling stop camera and whilst these shuts the main camera operation down the recording is still in limbo in the background and does not start up clean probably due the internal status flags.
A simpler solution would just be to label and enable the stop recording button. This I think is fairly harmless as if a motion stop then gets received it will just be ignored.
I'll try this out.
Sorry, I merged the three issues into one :).
I have a few suggestions for an improved installer:
But there are a few more questions:
As mentioned on forum. Check and handle existing Apache set up
I'm testing your new implemented preview-features and I think they're great, thanks. Just some things:
Silvan,
thanks a ton for all your great work, this is fantastic.
One thing that is being a challenge however is the motion detection part. Basically when motion sends a ca 1 signal, if the object is moving fast enough through the frame, good chances are you'll miss it or miss at least half of the action. This is especially a problem with cars.
Discussing the issue on this thread:
http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=97734&p=680700#p680700
it seems that newer versions of raspvid support recording to a circular buffer, which would allow us to prepend a number of seconds to the final video capture. I've tried to look at this myself and see if I could port those changes to raspimjpeg, but it's unfortunately way over my head.
Any chance you had any planned work in this direction?
thanks,
Spike
I wanted to create some time-lapse series without annotations in them so i cleared the annotation text box like shown in the picture below :
Everything worked like it should until a system reboot.
When i reboot the system the annotation is back, but the annotation config field is still empty :
when i press "record image" after a reboot the annotation is embedded in the image and the thumbnail image :
Clearing the annotation text box even when it is already empty and pressing OK removes the annotations again.
My configuration :
Raspberry Pi Model B (512MB)
- latest official Rasbian image
- Kernel 3.18.11+ #781
- All other software up to date.
- RPi Cam Control v5.1.7
The Raspberry Pi camera module 1.3
@silvanmelchior great project.
Thanks for this great piece of software! I have some ideas to improve the time-lapse feature, maybe you like some of them?
Thanks & Regards
Torsten
Hi,
provided that I don't fully understand the details and therefore I might be misunderstanding the complexity of doing this - but wouldn't it make sense to bake motion detection inside raspimjpeg?
While I'm grateful to have motion detection and for all the effort put into the Motion software, it seems to me not to be very effective at its job: based on my tests it takes a lot of cpu to do motion detection at really low framerate (2fps) due to its implementation relying on the CPU. There's a -mmal branch that performs better, but is not mainstream and still doesn't seem to be able to push more than 10fps (which is plenty for most applications, mind you).
Looking at picamera and some python implementations, it seems that it's possible to make this work relatively easily by using the motion vectors provided by the h264 encoder. Here's a walkthrough of the process:
http://bits.citrusbyte.com/motion-detection-with-raspberry-pi/ (look at Method 2, mid page)
Here's an original article from the foundation talking about the motion vectors:
https://www.raspberrypi.org/vectors-from-coarse-motion-estimation/
I'm still pretty much a noob around C++ and MMAL and can't quite send a patch, but thought I'd bring this up anyway for consideration.
thanks,
Spike
PS: could you guys share any quick way to change code/compile/test on a pi? recompiling the userland each time on the pi is really time consuming. Any article you could point me to to make the testing cycle faster would be great for me to try things out.
As mentioned on forum. Checking installs that use subfolders of /var/www for co-existence with other web material.
Hi,
I was trying to get raspimjpeg to work to no avail. I compiled it using sources provided in here: https://github.com/silvanmelchior/userland
All other raspi* do work but raspimjpeg reports segfault. Is there a debug version I could try?
# ls
raspimjpeg raspistill raspivid raspiyuv tvservice vcgencmd vchiq_test
# /usr/bin/raspistill -o test.jpg -hf -vf -w 1024 -h 768
# ls -la
total 748
drwxrwxr-x 2 root root 1024 Jan 1 00:04 .
drwxrwxr-x 8 root root 1024 Nov 26 2014 ..
-rwxr-xr-x 1 root root 31872 Nov 26 2014 raspimjpeg
-rwxr-xr-x 1 root root 82648 Nov 26 2014 raspistill
-rwxr-xr-x 1 root root 52324 Nov 26 2014 raspivid
-rwxr-xr-x 1 root root 44708 Nov 26 2014 raspiyuv
-rw------- 1 root root 465259 Jan 1 00:04 test.jpg
-rwxr-xr-x 1 root root 18248 Nov 26 2014 tvservice
-rwxr-xr-x 1 root root 4796 Nov 26 2014 vcgencmd
-rwxr-xr-x 1 root root 50940 Nov 26 2014 vchiq_test
# ./raspimjpeg --help
Error: Invalid arguments
# ./raspimjpeg -w 320 -h 240 -d 5 -of test1.jpg
Error: Invalid arguments
# ./raspimjpeg
MJPEG streaming
Segmentation fault
#
Hi
In firefox I am unable to change settings as the delete buttons don't delete previous settings. In Chrome they do work and I can successfully change the settings.
I have a feature to request, which will make RPCWI great for things like car dashcams:
I'd love to be able to annotate videos with wildcards for latitude, longitude, speed, heading, and altitude based on GPS readings taken by gpsd.
I'll experiment with adding these myself, but since I only just started tinkering with this suite, someone with greater familiarity with the codebase will likely be able to whip up a bridge for GPS location data before I could.
Allow full screen mode from the corner
I've been having trouble getting the (new ?) time-lapse feature working properly. It works fine with the default STD FOV x30, but the behavior is strange with other resolutions and fps rates. Sometimes it records at 1x when it should be making a timelapse, and other times the image turns to black when recording starts. I have also noticed that when imputing portrait ratio resolutions, the image no longer corresponds to the input resolution. I have managed to get around these bugs by using the config file, so I suspect the issue involves the command pipe php files, but I wouldn't know.
I have just installed the latest version and I have a couple of questions:
It would be great to add a "side by side" view for video stream; that means to duplicate the RPI cam video stream in one video stream.
So it could be viewed with the app "ip view cam" in a "Durovis Dive". This would be useful for wifi car control. (But im not sure, if the perfromance of RPI + cam + wifi + smartphone will be enough for such a "near" real time virtual reality video...) But it would be a test worth.
Thanks :-)
martinp
Is there a way to open the video stream using a program like OpenCV? For example, with MJPG-streamer, I could create a VideoCapture object in OpenCV, then open it using this code:
//video capture object to acquire webcam feed
const string videoStreamAddress = "http://192.168.1.126:8080/?action=stream?dummy=param.mjpg";
VideoCapture capture;
capture.open(videoStreamAddress);
Is there a way to access the feed in this way using RPi Cam Web Interface?
The installer does a lot of stuff that is not undone by the remove) option. Takes the liberty of abusing sudo, taking ownership of /var/www, creating users, leaving default apache vhosts around, overwriting configurations (rc.local/motion)... this all is likely either not to work for some people or to just break existing configurations.
Not a pipan user myself (although just been given one!) but just put the original stuff in to avoid update issues.
Saw the further update and I'm not sure I understand where init_pt is used now. That was apparently needed to avoid re-centring on page refreshes. Should it be an option?
I just studied the scheduler, thanks for this impressive work! There are so many settings there, I love it! Just some questions:
With the default settings, motion detection gets startet as soon as my pi boots up, because of the period-start-command "md 0;em auto;md 1;" in the Day-Period. But I think if somebody installs the interface new on his pi, motion detection should not be activated until he wants so. I think a good default-setup would be:
Maybe 30 seconds for the Max_Capture-value are a bit to short, or what do you think? If somebody doesn't check this settings and just uses motion-detection "the simple way", then he might not record the whole motion because it stops after 30 seconds. Somethink like 0 (deactivate) here would be better I suppose. Or what is your suggestion?
Hello Silvan,
thanks a lot for all the great work again. I'm finding myself a bit confused by what I'm seeing when recording at night with a PiNoir and latest raspimjpeg/web interface and all default values.
Per default I'm using a divider of 1, which as far as I'm understanding means that preview and video recording use the same framerate. However as soon as I hit the record button the preview goes really dark and the result video is dark. As soon as I stop it the preview becomes bright again.
I brought this up on the forum and people pointed me to exposure time and fps, but as far I can understand the fps are the same, so I don't see why the preview would be much brighter.
any thoughts on this?
Thanks for all your help in advance,
Spike
Hey guys,
what is about using nginx instead of Apache. Because Apache is using significantly more ressources compared to nginx. It is a lightweight webserver with all features of Apache.
the ability to link another camera and pi
I don't think region of interest is working. No big deal as I am not sure what real use this is.
I had noticed a problem in the command handling of the ri command where it wasn't picking the right parameters but even with that corrected the display just breaks up into noise.
Hi,
Sometimes (unable to explain why) after running for a while, apache runs out of connections (maxclients) with only one firefox browser connected. No recording, no motion enabled.
When listing all of the processes (ps aux) and ports (netstat -a), there are many stale processes and many closed http connections. Any idea why?
BTW, great job with this!
As mentioned on forum. /etc/rc.local handling will wipe out existing material
I added a new pull request. It's my first time contributing to a project and even though I went through the tutorials, I am unsure if I had done this correctly. Please feel free correct me.
Hi
Best version of picamera security, well done.
I have a few - noob - questions I hope you might be able to help me with:
Thanks
Hi,
changing $rpicamdir in the installer script to a non empty value results in a broken call for the scheduler in rc.local. Setting it to "rpicam", for example, produces the following line due to the modification with sed:
sleep 4;su www/rpicam-data -c 'php /var/www/schedule.php > /dev/null &'
A potential fix could be changing the sed expression in line 132 in the following way:
sed -e "s/\/var\/www/\/var\/www\/$rpicamdir/" etc/rc_local_run/rc.local.1 > etc/rc_local_run/rc.local
This would produce the following line concerning the scheduler call:
sleep 4;su www-data -c 'php /var/www/rpicam/schedule.php > /dev/null &'
Greetings,
rebos
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.