Coder Social home page Coder Social logo

lillifee / raspicam Goto Github PK

View Code? Open in Web Editor NEW
82.0 4.0 8.0 8.79 MB

RaspiCam, a simple web application to stream, take pictures or record videos from your raspberry pi camera.

TypeScript 70.67% HTML 0.23% JavaScript 29.10%
raspberry-pi raspivid streaming live timelapse h264 jmuxer libcamera babycam libcamera-still

raspicam's People

Contributors

dependabot[bot] avatar lillifee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

raspicam's Issues

Feature request : Capture with a button

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 :
Button capture

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

no issue!!

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.

Detect blank frames and pause capture? Is there a 50-image limit to timelapse?

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... :)

Gain limited to 4

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.

Frequency out-of-sync grey bands on captured images

Is there any way to add an option to add an anti-flicker adjustment for capturing still images? The photos I'm getting under these 60 Hz grow lights have rolling horizontal grey bands on them.

See attached samples...
2023-03-14T18-41-22-893Z-0044
2023-03-14T18-41-22-893Z-0045
2023-03-14T18-41-22-893Z-0046
2023-03-14T18-41-22-893Z-0047

No stream/image is displayed

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

Add date/time to file metadata

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

Enhancement request: ROI / "zoom mode"

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.

Error running raspiCam

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
`

Startup Photo Settings missing

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

Disable auto-preview files?

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?

Feature request : "Select all" photos

Hi Lilifee,

A button for selecting all photos would be nice (or a direct "delete all" button).

Screenshot 2023-05-17 at 18 57 26

Side note : you can see that thumbnails does not work with png file format. Or maybe the resolution is too big ? Not that it matters to me but I'm reporting the issue if it matters for others.

Screenshot 2023-05-17 at 19 13 38

Make settings-reset harder to use!

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.

Run RaspiCam as a service - files unavailable if not using GitHub clone

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

Oops! Browser does not support media source extension.

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..

Upgrade : Soft version

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.

Stream during recording

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.

Start number and filename options?

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?

ERROR: *** unrecognised option '--libav-format' ***

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.

Running on raspberry pi3?

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

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.