Releases: roflcoopter/viseron
v3.0.0b2 - Fix playback and running as root
Various fixes for the v3.0.0b1 release
Fixes:
- Make sure thumbnails are lazyloaded properly on Events tab
- Set a new HLS Client ID everytime the source changes. Resolves some playback issues
- Make Camera Grid on Events page scrollable so the page remains the same size no matter how many cameras you have.
- Reduce some spacing in the frontend
- The Hover Line which shows the time is now properly positioned
- Connect to DB using the postgres user to allow running the container as root
- Set default value for EXTINF for fragmented mp4s if it cant be read properly from the manifest file.
This resolves an issue where playback and loading of the timeline would fail because there were segments that hadEXTINF: null
in the DB
If you get an error similar to this: psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: role "postgres" does not exist
you need to stop Viseron and delete the postgresql
folder in the config dir.
On next restart Viseron will recreate the DB with proper permissions
v3.0.0b1 - 24/7 recordings
This is a pretty massive release that brings a number of new features and improvements.
Documentation can be found here: https://dev--viseron.netlify.app/
Features
24/7 recordings
The main feature developed here is the option of having 24/7 recordings.
With this comes a new component, storage
which will allow you to retain data based on time (like it is today) and based one consumed space.
This allows you to use your storage to its maximum.
Storage Tiers
Another feature of the storage
component are tiers
.
They allow you to store recordings on multiple media.
Say you have one 256GB SSD and a 1TB HDD, you can keep the most recent recordings on the SSD for fast access while offloading the older recordings to the HDD for archiving.
Documentation for the storage component can be found here: https://dev--viseron.netlify.app/components-explorer/components/storage
Timeline
To easily view 24/7 recordings, a new Timeline view is available.
It currently shows continuous recordings, motion events, detected objects.
Face recognition and License plate recognition will be available soon as well.
Events
The Events view is a more concise view than the Timeline.
Here you can scroll through and view all the Events.
Currently it shows only recordings but more events like face recognition etc is in the works.
You cannot view 24/7 recordings here.
Breaking Changes
- Old recordings are not yet migrated over to the new format and will not be viewable in Viseron
- Recordings are now in HLS format. If you need to have the recordings saved as full MP4 files you can use the new config option
create_event_clip
- Recordings folder structure has changed
mp4
file extension is now forced andextension
is removedsegments_folder
is removed in favor of tier paths- Thumbnails are now stored in /thumbnails folder (depending on the tier config)
filename_pattern
inthumbnail
is removed, stored as ID of the recording
See the #716 v3.0.0 PR for tasks left to do before final release is ready.
v2.3.1 - Jetson Nano GStreamer fix
Fix Failed to load component gstreamer: No module named 'gi'
for the jetson-nano
container.
Closes #672
v2.3.0 - CodeProject AI and License Plate Recognition
This is a smaller release with a few new features and fixes.
I am working hard on 24/7 recordings that I hade planned to release together with these changes, but its taking a bit longer than i had anticipated.
If you are interested in that, sit tight for the next release! You can follow my progress here: #619
CodeProject AI component
A new component which leverages CodeProject AI's computer vision capabilities is included in this release.
As of now it supports object detection, face recognition as well as a new post processor, Automatic License Plate Recognition!
Automatic License Plate Recognition (ALPR)
A new post processor is now available for ALPR.
Currently only CodeProject AI supports it, but in the future more variants may be supported.
Developer Experience
I have started to work on a better Developer Experience together with some proper Developer documentation.
It is still in early stages and the inner workings of Viseron are not explained yet, but it will improve over time.
The biggest addition to the Developer Experience this release is the support for VSCode Devcontainers.
This makes it significantly easier to get going with development, as all you have to do is spin up the container!
I have been using this myself for some time now and it has accelerated my work significantly
The new Developer docs can be found here : https://viseron.netlify.app/docs/developers
Changes and fixes
There are also a small number of changes and improvements.
- New config option for the camera domain,
still_image
It allows you to configure a URL to fetch the snapshots that are displayed in the UI from.
Useful if you woudl lke to get full resolution still images in the UI while still using the substream for detection
Understill_image
you can specifyrefresh_interval
which makes the UI refresh more often. Default is 10 seconds. - A
mask
helper has been added to the docs: https://viseron.netlify.app/components-explorer/components/mog2#mask
This makes it a bit clearer how to configure them until its possible to do it from the frontend directly. ffmpeg
has a new config optionraw_command
that makes it possible to specify an FFmpeg command that will be used directly.
Great if you want to test out some specific command that is hard to accomplish using the other available options.
There are a number of things to keep in mind tho, so if you are going to use it, make sure to read the docs thoroughly.
What's Changed
- Developer Experience by @roflcoopter in #545
- add initial developer documentation by @roflcoopter in #565
- add frontend proxy docs by @roflcoopter in #572
- add CodeProject.AI component and ALPR by @roflcoopter in #577
- add a simple mask helper to the docs by @roflcoopter in #578
- show min/max list length in config docs page by @roflcoopter in #579
- fix ffmpeg crash when running without substream by @roflcoopter in #580
- add recommended vscode extensions by @roflcoopter in #581
- resize using INTER_AREA instead of INTER_CUBIC by @roflcoopter in #582
- small updates to the docs by @roflcoopter in #593
- include yolov7 model in rpi3/armv7 image by @roflcoopter in #594
- update intel drivers and opencl by @roflcoopter in #596
- run gstreamer using python-gst by @roflcoopter in #608
- improve logging for pcie startup scripts by @roflcoopter in #633
- allow audio codec to be null by @roflcoopter in #634
- extract only the necessarry information from ffprobe by @roflcoopter in #635
- install gst/gi in ci by @roflcoopter in #637
- switch back to @jy95/material-ui-image by @roflcoopter in #638
- fix recorder audio codec not being set by @roflcoopter in #639
- add ffmpeg raw_command option by @roflcoopter in #641
- set max number of threads in data_stream by @roflcoopter in #642
- add new config option for still image by @roflcoopter in #643
- Feature/devcontainer improvements by @roflcoopter in #644
Full Changelog: v2.2.0...v2.3.0
v2.2.0 - Authentication
This release contains a lot of tweaks and fixes as well as some cool new features!
Authentication
The biggest change in this release is the addition of authentication for the frontend/API.
It is disabled by default but can be enabled by adding auth
to your webserver
config.
webserver:
auth:
When you first enable authentication you will be greeted with an onboarding page which allows you to create your first user.
At the moment you can only create this first user. Complete user handling is planned for the next release.
Enabling authentication protects all resources, including streams and videos, so if you are consuming these directly through Viserons API from another tool you will have some issues. I will make sure to properly implement and document a good way of accessing the API and resources from third-party tools even with auth enabled in a future release.
Things that needs to be added before i consider this feature done:
- Long lived access tokens for third party consumers of the API
- Create more users
- Delete/update users
- IP bans for failed login attempts
Failed cameras
Cameras that are unavailable during startup will now properly retry setup with automatic back-off.
Any camera that cant be successfully setup will be displayed in the frontend, displaying the error:
The red border represents failed cameras, and the orange border represents cameras that are actively retrying setup.
A bonus feature here is that the recordings for the cameras are still available for viewing in the frontend, neat right?!
General fixes
- FFmpeg upgraded to 5.1.2 with improved hardware acceleration for RPi4
- H265 fix for
gstreamer
- Audio is transcoded to
aac
by default if the original codec (pcm_alaw
,pcm_mulaw
) is not supported in.mp4
files.
Previously recordings would be stored in.mkv
files instead but that proved to be confusing. - Changed how
dlib
andsklearn
is installed which should solve a lot of issues with this component on thejetson-nano
andaarch64
image
What's Changed
- set correct parsing element from predefined map by @roflcoopter in #501
- transcode audio to aac instead of changing to mkv by @roflcoopter in #503
- Frontend authentication by @roflcoopter in #469
- bcrypt wheel fix and sklearn from pip by @roflcoopter in #507
- Feature/wheel improvements by @roflcoopter in #509
- Feature/ffmpeg 5.1.2 by @roflcoopter in #511
- ffmpeg stimeout > timeout for rtsp by @roflcoopter in #512
- pin dlib==19.22 to fix segfault crash by @roflcoopter in #516
- Feature/authentication tests by @roflcoopter in #521
- redirect to homepage when onboarding completed by @roflcoopter in #522
- add raw_pipeline option to gstreamer component by @roflcoopter in #525
- ffmpeg_loglevel option for recorder by @roflcoopter in #526
- change generation of segment script by @roflcoopter in #528
- raise DomainNotReady on FFProbe error/timeout by @roflcoopter in #529
- Show failed cameras in the frontend by @roflcoopter in #532
- Reduce bundle size by @roflcoopter in #533
- properly navigate to login/onboarding by @roflcoopter in #534
- v2.2.0 by @roflcoopter in #550
Full Changelog: v2.1.1...v2.2.0
v2.2.0b1 - Authentication
This release contains a lot of tweaks and fixes as well as some cool new features!
Authentication
The biggest change in this release is the addition of authentication for the frontend/API.
It is disabled by default but can be enabled by adding auth
to your webserver
config.
webserver:
auth:
When you first enable authentication you will be greeted with an onboarding page which allows you to create your first user.
At the moment you can only create this first user. Complete user handling is planned for the next release.
Enabling authentication protects all resources, including streams and videos, so if you are consuming these directly through Viserons API from another tool you will have some issues. I will make sure to properly implement and document a good way of accessing the API and resources from third-party tools even with auth enabled in a future release.
Things that needs to be added before i consider this feature done:
- Long lived access tokens for third party consumers of the API
- Create more users
- Delete/update users
- IP bans for failed login attempts
Failed cameras
Cameras that are unavailable during startup will now properly retry setup with automatic back-off.
Any camera that cant be successfully setup will be displayed in the frontend, displaying the error:
The red border represents failed cameras, and the orange border represents cameras that are actively retrying setup.
A bonus feature here is that the recordings for the cameras are still available for viewing in the frontend, neat right?!
General fixes
- FFmpeg upgraded to 5.1.2 with improved hardware acceleration for RPi4
- H265 fix for
gstreamer
- Audio is transcoded to
aac
by default if the original codec (pcm_alaw
,pcm_mulaw
) is not supported in.mp4
files.
Previously recordings would be stored in.mkv
files instead but that proved to be confusing. - Changed how
dlib
andsklearn
is installed which should solve a lot of issues with this component on thejetson-nano
andaarch64
image
What's Changed
- set correct parsing element from predefined map by @roflcoopter in #501
- transcode audio to aac instead of changing to mkv by @roflcoopter in #503
- Frontend authentication by @roflcoopter in #469
- bcrypt wheel fix and sklearn from pip by @roflcoopter in #507
- Feature/wheel improvements by @roflcoopter in #509
- Feature/ffmpeg 5.1.2 by @roflcoopter in #511
- ffmpeg stimeout > timeout for rtsp by @roflcoopter in #512
- pin dlib==19.22 to fix segfault crash by @roflcoopter in #516
- Feature/authentication tests by @roflcoopter in #521
- redirect to homepage when onboarding completed by @roflcoopter in #522
- add raw_pipeline option to gstreamer component by @roflcoopter in #525
- ffmpeg_loglevel option for recorder by @roflcoopter in #526
- change generation of segment script by @roflcoopter in #528
- raise DomainNotReady on FFProbe error/timeout by @roflcoopter in #529
- Show failed cameras in the frontend by @roflcoopter in #532
- Reduce bundle size by @roflcoopter in #533
- properly navigate to login/onboarding by @roflcoopter in #534
Full Changelog: v2.1.1...v2.2.0b1
v2.1.1 - Recorder bugfixes
This is a minor release containing a few new features as well as some bug fixes.
I recommend everyone running 2.1.0 to update immediately since 2.1.0 introduced a bug which creates shorter recordings than intended, which might make you miss important events.
New features
- Recordings can now be deleted from the UI, either by camera, per day or individual recording.
- Add
output_args
configuration option to allow better customization of the ffmpeg recorder command aarch64
docker image now contains theyolov7
model family
Bugfixes
- Fix calculation of event start and end time
- Fixed handling of
max_recorder_keepalive
when running with only motion detection as trigger for the recorder. - Easier copying of the configuration key name from the docs page
- Fix stream naming colission
What's Changed
- make all camera cards the same height, regardless of aspect ratio by @roflcoopter in #454
- Allow deletion of recordings by @roflcoopter in #459
- fix max_recorder_keepalive when running without object detector by @roflcoopter in #460
- add a zero-width-space between name and type by @roflcoopter in #461
- change stream dict to tuples. by @l-maia in #464
- Feature/stream headers by @roflcoopter in #467
- add ffmpeg output args to recorder by @roflcoopter in #468
- add draw_object_mask to docs by @roflcoopter in #484
- add yolo darknet models to aarch64 by @roflcoopter in #489
- catch exception when drawing text on mask by @roflcoopter in #495
- fix calculation of start and end event by @roflcoopter in #499
- v2.1.1 by @roflcoopter in #500
New Contributors
Full Changelog: v2.1.0...v2.1.1
v2.1.0 - Frontend improvements
Frontend
Recordings grouped daily
Recordings are now grouped by day to reduce the amount of scrolling needed.
Each day will show the latest recording, along with a button to drill down to that days recordings.
Breadcrumbs
Breadcrumbs are added to the header for easier navigation
Layout fixes
Grid sizes are now more consistent across the different pages
Backend
OpenVINO backend for Darknet
Upgraded to OpenCV 4.6.0 with OpenVINO support for Darknet.
This means better hardware acceleration support on Intel CPUs.
YOLOv7 is now supported and is the default in all images.
Breaking changes
The attributes of the binary_sensor.{camera identifier}_recorder
has changed slightly:
last_recording_start
->start_time
last_recording_end
->end_time
What's Changed
- Fix broken link by @roflcoopter in #432
- Fix a couple typos by @twodarek in #433
- enable opencl backend automatically by @roflcoopter in #437
- compile OpenCV 4.6.0 with OpenVINO by @roflcoopter in #439
- fix darknet builds after openvino addition by @roflcoopter in #444
- copy openvino runtime in base images by @roflcoopter in #445
- Group recordings per day by @roflcoopter in #446
- Show new recordings without refreshing by @roflcoopter in #447
- fix extension when automatically switching to mkv by @roflcoopter in #448
- v2.1.0 by @roflcoopter in #451
- use yolov7 as default for all images by @roflcoopter in #452
- YOLOv7 default by @roflcoopter in #453
New Contributors
Full Changelog: v2.0.0...v2.1.0
v2.0.0 - Viseron rewrite
This release features a massive rewrite that I have been working on for the past year.
It focuses on decoupling all parts of Viseron, making it more modularized. This allows for easier integration of new functionality.
The config.yaml file will change completely so there is some work that has to be done by each user to port over to the new version.
The general config format is a component
which implements one or more domains
.
Each camera has a unique camera identifier
which flows through the entire configuration.
The nvr
component then ties all these different domains together and provides the full functionality.
The big benefit of this new format is that you can mix and match components more freely.
For instance, you could use different object detectors for different cameras, you are not tied into just one.
Config example
ffmpeg: # <-- component
camera: # <-- domain
camera_one: # <-- camera identifier
name: Camera 1
host: 192.168.10.10
username: test
password: test
camera_two: # <-- camera identifier
name: Camera 2
host: 192.168.10.11
username: test
password: test
....
darknet: # <-- component
object_detector: # <-- domain
model: /my_custom_model/model.weights
cameras:
camera_one: # <-- camera identifier
fps: 5
deepstack: # <-- component
host: deepstack # <-- component config option
port: 5000 # <-- component config option
object_detector: # <-- domain
cameras:
camera_two: # <-- camera identifier
fps: 1
labels:
- label: person
confidence: 0.75
trigger_recorder: false
face_recognition: # <-- domain
cameras:
camera_one:
camera_two:
labels:
- person
background_subtractor: # <-- component
motion_detector: # <-- domain
cameras:
camera_one: # <-- camera identifier
fps: 1
mask:
- coordinates:
- x: 400
y: 200
- x: 1000
y: 200
- x: 1000
y: 750
- x: 400
y: 750
nvr: # <-- component
camera_one: # <-- camera identifier
camera_two: # <-- camera identifier
Config example with publicly available cameras (used in the screenshots)
ffmpeg:
camera:
viseron_camera:
name: Camera 1
host: 195.196.36.242
path: /mjpg/video.mjpg
port: 80
stream_format: mjpeg
fps: 6
recorder:
idle_timeout: 1
codec: h264
viseron_camera2:
name: Camera 2
host: storatorg.halmstad.se
path: /mjpg/video.mjpg
stream_format: mjpeg
port: 443
fps: 2
protocol: https
recorder:
idle_timeout: 1
codec: h264
viseron_camera3:
name: Camera 3
host: 195.196.36.242
path: /mjpg/video.mjpg
port: 80
stream_format: mjpeg
fps: 6
recorder:
idle_timeout: 1
codec: h264
mog2:
motion_detector:
cameras:
viseron_camera:
fps: 1
viseron_camera2:
fps: 1
background_subtractor:
motion_detector:
cameras:
viseron_camera3:
fps: 1
mask:
- coordinates:
- x: 400
y: 200
- x: 1000
y: 200
- x: 1000
y: 750
- x: 400
y: 750
darknet:
object_detector:
cameras:
viseron_camera:
fps: 1
scan_on_motion_only: false
labels:
- label: person
confidence: 0.8
trigger_recorder: true
viseron_camera2:
fps: 1
labels:
- label: person
confidence: 0.8
trigger_recorder: true
viseron_camera3:
fps: 1
labels:
- label: person
confidence: 0.8
trigger_recorder: true
nvr:
viseron_camera:
viseron_camera2:
viseron_camera3:
webserver:
mqtt:
broker: mqtt_broker.lan
port: 1883
username: !secret mqtt_username
password: !secret mqtt_password
home_assistant:
logger:
default_level: debug
Frontend
There is now a UI included in Viseron, written in React TypeScript.
It is enabled by default and can be reached on port 8888 inside the container by default.
Currently it features functionality like viewing cameras, recordings and editing the configuration.
It will be expanded upon in the future.
Jetson Nano support
This release also features better Jetson Nano support through the gstreamer
component.
This means that you can utilize your Nano for hardware accelerated camera decoding and object detection.
CompreFace face recognition
Face recognition using CompreFace is now available
Image classification
A new post processor is available, image_classification
.
This allows you to get more granular results from a detected object.
As an example, you could detect a specific kind of dog breed, or a specific kind of bird.
Multiprocessing
darknet
and edgetpu
object detectos utilize multiprocessing which spreads the load between multiple processes.
This allows for better performance, but also makes it easier to analyze and fine tune the load on your system.
Documentation site
The documentation has moved over from being in a README format to a dedicated site.
Hopefully it will help you use Viseron better.
I need your help on how it can be improved, writing good docs is always hard.
I am especially proud of the components page, which is mostly generated from the config schema used.
This means that the documentation and schema will always match, yay!
The documentation is hosted here: https://viseron.netlify.app/
Breaking changes
-
ALL kinds of inheritance in the config has been removed.
This means that you have to explicitly configure your object detector and motion detector settings for eachcamera
. -
interval
has been removed fromobject_detection
andmotion_detection
A new config optionfps
will be used instead.
This change was made since it was quite confusing, both in the code and for the users becauseinterval
was specified in seconds. -
logging
has been removed in all shapes and forms and has been replaced with the new componentlogger
Please see the updated documentation -
cameras
config section has been removed. Camera config is now specified under a component. -
Each object detector has been split up into individual components.
See the documentation for each detector. -
Each motion detector has been split up into individual components.
See the documentation for each detector. -
recorder
can no longer be configured on a global level.
It now has to be present under each camera configuration. -
timeout
under recorder is now calledidle_timeout
-
static_mjpeg_streams
are now calledmjpeg_streams
-
enable
underobject_detection
is no more. To disable object detection you simply dont configure it for a camera
Same goes formotion_detector
-
timeout
formotion_detector
is now calledrecorder_keepalive
-
max_timeout
formotion_detector
is now calledmax_recorder_keepalive
-
Recordings are now stored in the folder structure
/recordings/<camera name>/<date>/<timestamp>.mp4
-
Images are no longer streamed to MQTT/Home Assistant, with the exception of thumbnails.
This is because MQTT is not really suited for this and it impacts performance a lot.
If you still want to have the cameras in Home Assistant you can point Home Assistant to an MJPEG stream in Viseron. -
filter_args
removed for camera and recorder.
Forcamera
, usevideo_filters
instead.
Forrecorder
, you can use bothvideo_filters
andaudio_filters
Short config example to rotate video 180 degrees:
ffmpeg: camera: camera_1: .... video_filters: # These filters rotate the images processed by Viseron - transpose=2 - transpose=2 recorder: video_filters: # These filters rotate the recorded video - transpose=2 - transpose=2
What's Changed
- remove interval and replace with fps by @roflcoopter in #287
- Update 50-check-if-rpi to support Rpi 4 8gb by @DevelopIdeas in #324
- Add newline after jpgboundary by @olekenneth in #355
- Add new line to jpg boundary refactoring by @olekenneth in #356
- Viseron v2 by @roflcoopter in #306
- Feature/remove dead code by @roflcoopter in #367
- fix automat...
v2.0.0b4 - Entities
This release features a new Entities Page where you can browse all the entities in Viseron.
At the moment you can only view the current states, not change them or view any history.
This will most likely be the last beta before official release unless something unexpected happens.
What's Changed
- add yolov7 models by @roflcoopter in #387
- Feature/frontend sidebar by @roflcoopter in #388
- use multistage builds for models by @roflcoopter in #395
- Feature/entities page by @roflcoopter in #397
- Feature/yolov7 fix by @roflcoopter in #398
- fix exception when no cameras are configured by @roflcoopter in #399
- perform preprocessing for quantized classifier models by @roflcoopter in #400
- add list of objects to object detector binary sensors by @roflcoopter in #404
- install libpng-dev in jetson nano dlib and base by @roflcoopter in #405
- return zero for negative coordinates by @roflcoopter in #407
- install more VAAPI drivers by @roflcoopter in #410
- use similarity threshold to find unknown faces by @roflcoopter in #412
- improve accuracy of image classifier by @roflcoopter in #413
- include qsv decoders/encoders by @roflcoopter in #414
- make chown silent by @roflcoopter in #415
Full Changelog: v2.0.0b3...v2.0.0b4