evercam / ex_nvr Goto Github PK
View Code? Open in Web Editor NEWVideo recording and computer vision for edge devices
Home Page: https://evercam.github.io/ex_nvr/
License: GNU Affero General Public License v3.0
Video recording and computer vision for edge devices
Home Page: https://evercam.github.io/ex_nvr/
License: GNU Affero General Public License v3.0
What I dont want to work on
ONVIF Discovery > Only interesting for the Open Community, not for Evercam #89
WebRTC > If you mean Peer to Peer, it's not interesting for evercam as we always have a VPN tunnel.
Nerves > Buildroot story : Not interesting for us to go to this level now. Docker is much preferable. For now. This might be interesting to support Raspberry Pi.
h265 > Maybe, but in terms of difficulty versus reward it's not interesting. We might also skip and go straight to AV1.
What I do want to work on
Ability to download clips (Halim is working on this)
Raspberry Pi Deployment Method. (Docker, Direct, Nerves ... my vote is for docker (try not to rely on Dhia, he's occupied).
Some computer vision pipelines & local data storage
e.g. Readaction Camera implementation
Motion Detection/Object Detection (this produces data ! that's good). Then Halim can visualise this data in the timeline along with the recording runs.
** other **
IFRAME: This is not going to be our primary path. We build basic functionality in ExNVR and the rest in the Dash.
Create timelapse video from recorded footages
Add live streaming with HLS.
Add some fields to the user, like:
Implement OnVIF PTZ functionality.
I'm flagging this as a good first issue because I suspect a lot of the principles already exist in Evercam Backend (and that was done by an Elixir Newbie ... see video posted online).
NB: only display the buttons when camera supports PTZ
We've found in the past that we sometimes want to talk directly to the camera. e.g. to get a snapshot (and maybe this is how onvif PTZ works?)
Today we do this by sending commands directly to the camera, but life could be (maybe?) a bit simpler if we only ever need to talk to the NVR and it would proxy the commands and responses.. as it knows where the camera is and how to auth.
I am not sure about this, but want the idea recorded somewhere so it can be discussed.
( ... related: I could imagine embedding an interactive swagger UI with the complete Hikvision ISAPI API there )
This is the beginning of a long journey. We want to plan for regular updates, CI style ... we want to make that easy & low friction.
I'm suggesting a very visible version number, probably in the top right corner.
Add a configuration to allow the user to choose storing camera sub-streams.
Video Management Software is probably more appropriate.
When there's connection problems, the segmenter
may generate a lot of small segments, since it flushes the current segment if RTSP connection is lost.
We should check for small segments (say less than 10 seconds
) and discard them.
We agreed it would be ok to make a v1 where it is just a list of chunks from the filestorage.
v2 might allow user to specify a date range and get a produced file (Via API)
We want to know things like:
I'd be ready to have a debate about only limiting scope to logical storage areas, but I'm currently leaning in favour of ExNVR also dealing with Physical Storage.
Seeing the Erlang docs, maybe the easiest implementaiton is just whatever we can get from this;
https://www.erlang.org/doc/man/disksup#get_disk_info-0
This could be an easy addition to give better visibility into the workings of the application.
It is likely that we will sometimes want to be replacing an existing installation (with recordings) with ex-nvr.
In this case, it would sometimes be nice to replace the nvr, but not the hdd and that means importing old footage into ExNVR.
I wonder about a process that would import recordings from other sources. The 2 likely ones being Nx and Hik
[ ] Ansible script to install ExNVR and uninstall (NxWitness). @dhairyas17 ?
[ ] Script to import existing recordings (and cameras?) to ExNVR
1- Remove the extra Phoenix default stuff (clean the top bar)
2- The main page should have a login for or redirect the main connected page
3- Top bar:
-- Add "Live"
-- Add "Recordings"
-- Add "Phoenix dashboard"
-- Add "API docs"
Offer some visibility to metrics using https://github.com/phoenixframework/phoenix_live_dashboard .
A user would like to see whether recordings exist or not. (to use for download for incident requests)
For example, Hikvision shows blue dots with timeline
NXW shows green days with timeline
@magixus I've rephrased this issue to focus on the functionality that we do want (ability to see available recordings calendar) rather than what is not needed. I think your main point is good.
To support H265 we need the following elements:
H265 depayloader
- Extract video NAL units from RTP packets.H265 parser
- parse the NAL units and create access units
from them, each access unit represent a encoded frame.H265 encoder/decoder
- Encode & decode the H265 stream (use ffmpeg
for that)MP4 payloader
- An MP4 payloader of the H265.ex_nvr
pipelinesAllow storing video footages from multiple devices.
Suggest this licence which allows us to control commercial use and support and provision as a service
https://www.tldrlegal.com/license/gnu-affero-general-public-license-v3-agpl-3-0
It would be very helpful to see a reference architecture for how we would like to gather and store timeseries data.
Motion Levels (full-image) or Brightness Levels (same) might be a decent start.
The big idea here is:
a) An MVP for a feature that customers are asking for
b) An MVP for a Computer Vision Pipeline running on ExNVR Recordings
Not sure how useful these links are, but they seem relevant (if a bit old):
https://github.com/NVIDIA-AI-IOT/redaction_with_deepstream
https://github.com/NVIDIA-AI-IOT/retinanet_for_redaction_with_deepstream
Settings:
Choose Recordings Location.
Choose Days
The specific use case here is that we keep full recordings for 30 days and then anonymise.
We'll probably also need a scenario where the live stream is redacted before it is saved. My hunch is that that's a fundamentally different pipeline.
Add authentication via web page (/login
) or API (/api/login
)
@halimb I would like you to try to create a login feature using Elixir/Heex templates. (you can work on it whenever you're free)
Search network for available cameras, one-touch adding them as devices.
As a developer focussed NVR, I would like easy access to all device and stream activity.
Add two fields to the device:
Timezone
- when requesting a playback we should use the device timezone and not UTC
State
- defines the current state of the device: RECORDING
, STOPPED
, FAILED
, ...etc.He wants to run his code without having to worry about the nuances of different cameras. If he makes changes to streams etc. he'd like clarity on the consequences (there are always consequences). E.g. Dhia can consume different streams or request different transcoding configurations. Which ever selections he makes, the inputs, outputs and resources consumed should be visible. In future version we can add developer hints ( Hey, why don't you try using the 3rd stream here instead? ).
Famously these people are not ready for the pain of video. We must protect them, they are gentle souls. Wherever possible, we let them continue in their Ctrl+C , Ctr+V utopia.
This person cannot be expected to know all the nuances of different camera & NVR configurations. We will identify what really matters and help them to see that at a glance.
This does not have to be friendly to anyone who doesn't know what Docker, an API or an IFRAME is.
Since the recorded footage is in small chunks, this endpoint will get the continuous start date and end date of the recorded footage.
Currently, when the packets arrive to the RTSP source
and this latter is not in playing
state, the packets are discarded. This packets may contain SPS
and PPS
which are needed for subsequent packets. So we'll buffer the packets until the source is linked and switched to playing
state.
The second part of this issue is that parameter sets SPS
and PPS
may be signaled out of band (in SDP). We need to extract this params and pass them to the parser
since this parameters may not be repeated in the bytestream.
Playback saved recordings via HLS. To achieve this we need to the following steps:
mp4
filesAnnex B
formatWe need to fetch the optimal position on the files to start streaming by looking at the nearest keyframe from the specified date.
Note
Membrane Team currently created a depayloader for H264 from MP4 files, but it's still under review and not yet merged. An alternative solution is to use ffmpeg
to read the files.
Topic 1: PTZ Functionality
We dont need to implement any PTZ functionality, we could do it all direct to the camera via evercam dash. But, it seems to make sense that we would in order for this to be a "proper" NVR.
Topic 2: IFRAME / Microservices
A model that is working elsewhere in Evercam is layers of iframes e.g. drone/bim/camera view ... and, we could aim for a world where all the camera UI functionality is on ExNVR and simply iframed into Dash.
I've not thought this through, but wanted to write it somewhere.
This will allow us to roll out on more existing machines. Quite exciting.
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.