GStreamer
Camera
The GStreamer integration reads frames from your cameras for processing by Viseron.
Viseron uses the gst-launch-1.0 command to interface with GStreamer.
Hardware acceleration is available and automatically used for the NVIDIA Jetson Nano.
note
As of now the gstreamer integration uses FFmpeg to create recordings when an object is detected and FFprobe to read stream information.
Therefore, if you make changes to the recorder config you should keep in mind that it is in FFmpeg syntax.
Configuration
Configuration example
/config/config.yaml
gstreamer:
camera:
camera_one:
name: Camera 1
host: 192.168.XX.XX
port: 554
path: /Streaming/Channels/101/
username: !secret camera_one_user
password: !secret camera_one_pass
mjpeg_streams:
my_stream:
width: 100
height: 100
draw_objects: true
rotate: 45
mirror: true
recorder:
idle_timeout: 5
camera_two:
name: Camera 2
host: 192.168.YY.YY
port: 554
path: /Streaming/Channels/101/
username: !secret camera_two_user
password: !secret camera_two_pass
gstreamermap required
GStreamer Configuration.
cameramap required
Camera domain config.
<CAMERA_IDENTIFIER>map required
Camera identifier. Valid characters are lowercase a-z, numbers and underscores.
pathstring required
Path to the camera stream, eg
/Streaming/Channels/101/.Minimum items:
1portinteger required
Port for the camera stream,
Lowest value:
1hoststring required
IP or hostname of camera.
namestring (optional)
Camera friendly name.
Minimum items:
1mjpeg_streamsmap (optional)
MJPEG streams config.
<string>map required
Name of the MJPEG stream. Used to build the URL to access the stream.
Valid characters are lowercase a-z, numbers and underscores.
Valid characters are lowercase a-z, numbers and underscores.
widthinteger (optional, default:
0)Frame will be rezied to this width. Required if height is set.
heightinteger (optional, default:
0)Frame will be rezied to this height. Required if width is set.
draw_objectsboolean (optional, default:
false)If set, found objects will be drawn.
draw_motionboolean (optional, default:
false)If set, detected motion will be drawn.
draw_motion_maskboolean (optional, default:
false)If set, configured motion masks will be drawn.
draw_object_maskboolean (optional, default:
false)If set, configured object masks will be drawn.
draw_post_processor_maskboolean (optional, default:
false)If set, configured post processor masks will be drawn.
draw_zonesboolean (optional, default:
false)If set, configured zones will be drawn.
rotateinteger (optional, default:
0)Degrees to rotate the image. Positive/negative values rotate clockwise/counter clockwise respectively
mirrorboolean (optional, default:
false)If set, mirror the image horizontally.
still_imagemap (optional)
Options for still image.
urlstring (optional)
URL to the still image. If this is omitted, the camera stream will be used to get the image.
usernamestring (optional)
Username for authentication.
Only applicable if
Only applicable if
url is set.passwordstring (optional)
Password for authentication.
Only applicable if
Only applicable if
url is set.authenticationselect (optional)
Authentication method to use.
Only applicable if
Only applicable if
url is set.Valid values:
basicdigest
refresh_intervalinteger (optional, default:
10)Number of seconds between refreshes of the still image in the frontend.
Lowest value:
1widthinteger (optional)
Width of the still image, if different from the stream width.
Lowest value:
1heightinteger (optional)
Height of the still image, if different from the stream height.
Lowest value:
1use_last_snapshot_on_errorboolean (optional, default:
false)If
true, the last snapshot will be used if the current snapshot fails to load. Uses some extra memory which is why it is disabled by default.storagemap (optional)
Storage options for the camera.
Overrides the configuration in the storage component.
Overrides the configuration in the storage component.
recordermap (optional)
Recorder config.
tierslist (optional, default: hover to show)
Tiers are used to move files between different storage locations. When a file reaches the max age or max size of a tier, it will be moved to the next tier. If the file is already in the last tier, it will be deleted.
Minimum items:
1pathstring required
Path to store files in. Cannot be
/tmp or /tmp/viseron.pollboolean (optional, default:
false)Poll the file system for new files. Much slower than non-polling but required for some file systems like NTFS mounts.
move_on_shutdownboolean (optional, default:
false)Move/delete files to the next tier when Viseron shuts down. Useful to not lose files when shutting down Viseron if using a RAM disk.
drainboolean (optional, default:
false)When a tier limit is reached, move all files to the next tier. If disabled, only move the files that exceed the limit. By using drain together with a smaller RAM disk as the first tier, you reduce the stress on storage devices by moving files in larger batches. Note that when using drain together with event recordings, partial moves of files will still occur.
check_intervalmap (optional, default: hover to show)
How often to check for files to move to the next tier.
daysinteger (optional, default:
0)Days between checks for files to move/delete.
Lowest value:
0hoursinteger (optional, default:
0)Hours between checks for files to move/delete.
Lowest value:
0minutesinteger (optional, default:
0)Minutes between checks for files to move/delete.
Lowest value:
0secondsinteger (optional, default:
0)Seconds between checks for files to move/delete.
Lowest value:
0continuousmap (optional)
Retention rules for continuous recordings.
min_sizemap (optional)
Minimum size of files to keep in this tier.
gbfloat (optional)
Min size in GB. Added together with
min_mb.mbfloat (optional)
Min size in MB. Added together with
min_gb.max_sizemap (optional)
Maximum size of files to keep in this tier.
gbfloat (optional)
Max size in GB. Added together with
max_mb.mbfloat (optional)
Max size in MB. Added together with
max_gb.max_agemap (optional)
Maximum age of files to keep in this tier.
daysinteger (optional)
Max age in days.
hoursinteger (optional)
Max age in hours.
minutesinteger (optional)
Max age in minutes.
min_agemap (optional)
Minimum age of files to keep in this tier.
daysinteger (optional)
Min age in days.
hoursinteger (optional)
Min age in hours.
minutesinteger (optional)
Min age in minutes.
eventsmap (optional)
Retention rules for event recordings.
min_sizemap (optional)
Minimum size of files to keep in this tier.
gbfloat (optional)
Min size in GB. Added together with
min_mb.mbfloat (optional)
Min size in MB. Added together with
min_gb.max_sizemap (optional)
Maximum size of files to keep in this tier.
gbfloat (optional)
Max size in GB. Added together with
max_mb.mbfloat (optional)
Max size in MB. Added together with
max_gb.max_agemap (optional)
Maximum age of files to keep in this tier.
daysinteger (optional)
Max age in days.
hoursinteger (optional)
Max age in hours.
minutesinteger (optional)
Max age in minutes.
min_agemap (optional)
Minimum age of files to keep in this tier.
daysinteger (optional)
Min age in days.
hoursinteger (optional)
Min age in hours.
minutesinteger (optional)
Min age in minutes.
snapshotsmap (optional)
Snapshots are images taken when events are triggered or post processors finds anything. Snapshots will be taken for object detection, motion detection, and any post processor that scans the image, for example face and license plate recognition.
tierslist (optional)
Default tiers for all domains, unless overridden in the domain configuration.
Tiers are used to move files between different storage locations. When a file reaches the max age or max size of a tier, it will be moved to the next tier. If the file is already in the last tier, it will be deleted.
Tiers are used to move files between different storage locations. When a file reaches the max age or max size of a tier, it will be moved to the next tier. If the file is already in the last tier, it will be deleted.
Minimum items:
1min_sizemap (optional)
Minimum size of files to keep in this tier.
gbfloat (optional)
Min size in GB. Added together with
min_mb.mbfloat (optional)
Min size in MB. Added together with
min_gb.max_sizemap (optional)
Maximum size of files to keep in this tier.
gbfloat (optional)
Max size in GB. Added together with
max_mb.mbfloat (optional)
Max size in MB. Added together with
max_gb.max_agemap (optional)
Maximum age of files to keep in this tier.
daysinteger (optional)
Max age in days.
hoursinteger (optional)
Max age in hours.
minutesinteger (optional)
Max age in minutes.
min_agemap (optional)
Minimum age of files to keep in this tier.
daysinteger (optional)
Min age in days.
hoursinteger (optional)
Min age in hours.
minutes