lillifee / raspicam Goto Github PK
View Code? Open in Web Editor NEWRaspiCam, a simple web application to stream, take pictures or record videos from your raspberry pi camera.
RaspiCam, a simple web application to stream, take pictures or record videos from your raspberry pi camera.
Hi,
I started a discussion but I don't know if you've seen it.
Anyway. Your soft is really cool and almost perfectly suits my need !
The only missing part for me would be a way to capture photos with the press of a button.
So may I suggest something like this :
I first thought that any GPIO for me would work but then I realised that I might not be the only one in need of this feature and depending on their project might need another GPIO.
So I figured that a dropdown list of GPIO would maybe be better ? There is maybe some GPIO that can not be used anyway and it would prevent user mistakes.
I also thought about a debounce time that could be adjusted too. Depending on the switch the user wants to implement it might differ.
Anyway. That would be really great ! :)
Have a good day.
Antoine / GLOUPY
Hi,
Just wanted to let you know your software is awesome =)
Unfortunately it does not work on 64bit OS, but that's because of raspivid not being 64bit compatible.
If I come up with any ideas for improvements I'll let you know.
My timelapse capture currently seems to stop at exactly 50 images - how do I get this to capture indefinitely?
And it seems that the lights in the room where I'm capturing are on a schedule and the room goes pitch-black for a number of hours. Rather than capturing hundreds of black frames, is it possible to pause capturing when an entirely black frame is detected, then resume when the image changes from black?
I know this is a tall order, but just wondering... :)
Hi, I am using a rpi high quality camera on RPI 3+ (Yes I know, need to upgrade to 4 someday)
The camera is used in a dark room. When I start the camera manually, I set the gain to 20 or it's too dark
libcamera-still --gain 20
The gain in the application is limited between 0 and 4. It's too dark even at 4. Could it be possible to get to a higher value?
Thank you for your great application, makes a really user-friendly baby monitor.
Thanks.
Hi,
I've installed RaspiCam on my Pi 5, with the camera v3 module but when I start the server no image is displayed and an error appear :
[server] version 2.0.10
[server] starting services...
[control] starting Stream ...
[process] libcamera-vid --camera 0 --hdr --exposure sport --lens-position 10.2 --nopreview --width 1280 --height 720 --framerate 25 --bitrate 6000000 --codec H264 --timeout 0 --profile baseline --inline --output -
[server] server listening on 8000
[1:33:43.925141017] [4070] INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e
[1:33:43.939259011] [4078] INFO RPI pisp.cpp:653 libpisp version v1.0.2 fa44a258644a 22-11-2023 (21:59:22)
[1:33:43.956707129] [4078] INFO RPI pisp.cpp:1112 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/imx708@1a to CFE device /dev/media0 and ISP device /dev/media2 using PiSP variant BCM2712_C0
[1:33:43.958024911] [4070] INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e
[1:33:43.971881627] [4081] INFO RPI pisp.cpp:653 libpisp version v1.0.2 fa44a258644a 22-11-2023 (21:59:22)
[1:33:43.989824172] [4081] INFO RPI pisp.cpp:1112 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/imx708@1a to CFE device /dev/media0 and ISP device /dev/media2 using PiSP variant BCM2712_C0
[1:33:43.990596989] [4070] WARN V4L2 v4l2_pixelformat.cpp:338 Unsupported V4L2 pixel format Y16
[1:33:43.990625804] [4070] WARN V4L2 v4l2_pixelformat.cpp:338 Unsupported V4L2 pixel format RGB6
[1:33:43.990633397] [4070] WARN V4L2 v4l2_pixelformat.cpp:338 Unsupported V4L2 pixel format BGR6
[1:33:43.990642249] [4070] WARN V4L2 v4l2_pixelformat.cpp:338 Unsupported V4L2 pixel format PC1M
Mode selection for 1280:720:12:P(25)
SRGGB10_CSI2P,2304x1296/30.0021 - Score: 1400
Stream configuration adjusted
[1:33:43.990953083] [4070] INFO Camera camera.cpp:1183 configuring streams: (0) 1280x720-YUV420 (1) 2304x1296-BGGR16_PISP_COMP1
[1:33:43.991039731] [4081] INFO RPI pisp.cpp:1396 Sensor: /base/axi/pcie@120000/rp1/i2c@88000/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected CFE format: 2304x1296-PC1B
ERROR: *** libav: no such profile baseline ***
If you take a look on 4th line ([PROCESS]) you will see something seems to be missing after "--output -"
Kind Regards
Apparently, "adding the -x flag gets EXIF data written to the image, the EXIF data includes the date and time"...could you please add this as an option when capturing, so I can plug the timestamp into the frame using FFMPEG?
I've constructed the following command, which grabs the filename (which I originally thought was the timestamp before realizing that every file was named the same) and burns it in yellow on each frame, but I'd ideally like the actual timestamp rather than the index number (the [0-9][0-9][0-9][0-9] glob was to omit the -preview1 files that currently get auto-created):
ffmpeg -y -r 24 -export_path_metadata 1 -pattern_type glob -i './*[0-9][0-9][0-9][0-9].jpg' -vf "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:x=20:y=20:fontsize=40:fontcolor=yellow:text='%{metadata:lavf.image2dec.source_basename:NA}'" -c:v libx264 video-file.mp4
Hi.
Would it be possible to add a way to control a Motor -> Backwards / Forward? Connected to GPIO?
Hi! this software is excellent. One enhancement I could use would be to implement something similar the roi
function from the libcamera demo apps, AKA "digital zoom" (yuck)
from libcamera-still:
--roi x, y, w, h
Typically I'd use "10x" specified as --roi 0.45,0.45,0.1,0.1
to blow up the central region of the image while previewing to adjust fine focus manually (my camera board is hooked up to a microscope). Then I'd take an unzoomed image.
When I run raspiCam I get this errors, can you help me please?
`
~/raspiCam $ node server.js
/home/pi/raspiCam/server.js:2
(()=>{var e={8967:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=8967,e.exports=t},4410:(e,t,n)=>{"use strict";var a=n(6690),i=n(436);function o(e){if(!(this instanceof o))return new o(e);this.headers=e.headers,this.negotiator=new a(e)}function r(e){return-1===e.indexOf("/")?i.lookup(e):e}function s(e){return"string"==typeof e}e.exports=o,o.prototype.type=o.prototype.types=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}if(!t||0===t.length)return this.negotiator.mediaTypes();if(!this.headers.accept)return t[0];var a=t.map(r),i=this.negotiator.mediaTypes(a.filter(s)),o=i[0];return!!o&&t[a.indexOf(o)]},o.prototype.encoding=o.prototype.encodings=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.encodings(t)[0]||!1:this.neg
SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:760:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
at internal/main/run_main_module.js:21:11
`
Hi,
After installing the new release, I started the web page and by default it is in Photo mode but the settings are missing (Timeout, Resolution, Quality, Timelapse).
I had to select video mode and switch back to photo mode in order to make them appear.
Dunno if it is normal so I'm pointing it out ^^
Cheers
I get a low-res xyz-0000-preview1.jpg file for every xyz-0000.jpg file that's captured - could you please add an option to disable this extra file?
It's super-easy to hit the reset button on any and all settings in the web client...could this be made more difficult to access and/or add a "reset? are you sure?" for the master reset button?
The "reset-settings" function icon looks like a "refresh" icon in other apps, which is less destructive.
Please make it possible to rotate the camera
I installed raspiCam using the following command:
"mkdir raspiCam && cd raspiCam
wget https://github.com/Lillifee/raspiCam/releases/latest/download/raspiCam.tar.gz
tar -xvzf raspiCam.tar.gz"
instead of using a GitHub clone and found the systemd files to be copied were unavailable
"pi@RaspiCam1:~ $ sudo cp raspicam.service /etc/systemd/system
cp: cannot stat 'raspicam.service': No such file or directory"
I finally worked out how to get these files installed and working properly, but certainly not seamless like the rest of the install.
ALSO, I feel "Check the raspicam.service in the systemd folder in the repository and adapt it to your needs." needs further explanation in the documentation. I'm not terribly experienced so "adapt it to your needs" had me puzzled. I finally assumed it should work with the default installation as written so copied as it was. I'm also assuming it's working as I was able to get a snapshot after rebooting without restarting node server.js manually.
I'll share more about needs/configuration when I get a chance
Hi!
Whenever I try to reach raspiCam from my iPhone I get a plain white page.
In browser console I get the message "Oops! Browser does not support media source extension."
Also tried my sisters iphone, mom's iphone.. Seems like apple doesn't support media source extension.
Is there a way around this that you know of?
I already tried 8 different browsers without any luck..
Hi Lilifee,
I updated to the latest version of your soft. Well I think I did.
A version written somewhere, maybe at the bottom of the setting tab, would be a good idea in order to check that it's been updated.
Just a thought.
Keep the stream active during recording.
Feature request from disucussion #40
Currently, libcamera-vid only supports a single stream at a time. This stream is recorded to a file during recordings and streamed live with different settings on the website. However, if we attempt to preview a 1080p video with a high bitrate, it will cause delays and lags in the live stream. Consequently, it becomes quite challenging to simultaneously record a high-quality video and stream it. In my opinion, the most viable solution would be to save the high-quality video to a file, compress it using ffmpeg, and then stream the compressed version on the website. However, implementing this solution may require significant refactoring since raspicam does not currently utilize ffmpeg.
It would be awesome to be able to define a starting index number for images, rather than always resetting to zero.
Also, could you please add a default name for capture files, rather than just the start date?
MJPEG stream for external applications is working on octoprint tested by me!
Thanks.
Using raspiCam with my RPI v2 Camera the maximum streaming format seems to be 1440x1080
But using a different streamer program I'm able to stream @ 1640x1232 (see Hardware Specification)
I'm trying to run raspiCam on a rpi 4b with HQ cam. When starting node.js I get the following:
~/raspiCam`` $ sudo node server.js
[server] version 2.1.0
[server] starting services...
[control] starting Stream ...
[process] libcamera-vid --nopreview --width 1280 --height 720 --framerate 25 --bitrate 6000000 --codec H264 --libav-format h264 --timeout 0 --inline --output -
[button] onoff library not found...
To enable GPIO support please install the onoff library and restart raspiCam. 'npm install onoff'
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'onoff' imported from /home/pi/raspiCam/server.js
ERROR: *** unrecognised option '--libav-format' ***
[server] server listening on 8000
I've read that the --libav format is from the full/desktop version of Raspberry Pi OS. What can be done about this? The server runs fine, but only gives me a small black box for output. MPJEG stream only returns a white window with no content.
Hi, in the doc there is info installing it on rpi4. Tried to install it on rpi3b. Everything went ok, I am able to capture still or video with libcamera-jpeg
and libcamera-vid
.
When I run raspicam, I'm getting only black rectangle even tho camera is properly initialized. Is it known to not working on previous rpis?
output:
[server] starting services...
[control] starting Stream ...
[process] libcamera-vid --nopreview --width 1280 --height 720 --framerate 25 --bitrate 10000000 --codec H264 --timeout 0 --profile baseline --inline --output -
[0:34:02.577385629] [1812] INFO Camera camera_manager.cpp:299 libcamera v0.0.3+40-9b860a66
[server] server listening on 8000
[0:34:02.738569305] [1813] INFO RPI raspberrypi.cpp:1425 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media3 and ISP device /dev/media0
Mode selection:
SRGGB10_CSI2P 1536x864 - Score: 3100
SRGGB10_CSI2P 2304x1296 - Score: 3400
SRGGB10_CSI2P 4608x2592 - Score: 25592.8
[0:34:02.747652903] [1812] INFO Camera camera.cpp:1028 configuring streams: (0) 1280x720-YUV420 (1) 1536x864-SBGGR10_CSI2P
[0:34:02.748063008] [1813] INFO RPI raspberrypi.cpp:805 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 1536x864-SBGGR10_1X10 - Selected unicam format: 1536x864-pBAA
My CM4 also comes with a touch screen. Can I see a preview and operate these settings on Raspberry Pi? Because I can easily focus and adjust aperture, it looks like a great camera.
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.