-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.toml
74 lines (61 loc) · 3.12 KB
/
config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Program log verbosity level:
# fatal
# error
# warn
# info
# debug
# Default - warn
LogLevel = "info"
# The program performs some simple OS configuration checks on the start, giving you hints about the performance.
DisableHints = false
# Address + port to listen HTTP statistics interface on.
httpListenAddress = "127.0.0.1:8080"
# Available monitoring URLs:
# /cameras.json - returns json with camera names. Is needed to Zabbix low-level discovery
# The following URLs are updated approximately every 30 seconds. {name} - camera name
# /camera/{name}/frame - returns the last frame number, is convenient to check if the videostream is live.
# Non-increasing number indicates the stream to be stuck.
# /camera/{name}/fps - average frame-rate for the last 30 seconds
# /camera/{name}/bitrate - average bitrate for the last 30 seconds. Seems that it's not reported when ffmpeg writes
# into a file (-1)
# /camera/{name}/outtime - amount of video time has written by ffmpeg (in seconds)
# /camera/{name}/dupframes - amount of duplicate frames received
# /camera/{name}/dropframes - amunt of frames dropped
# Default camera settings.
# If a camera misses some setting, its value is being taken from the "defaults" section.
# For instance: there is no point of setting storage path in each camera section if all cameras have the same storage path.
# Or, in contrary, you can override default segment time for some specific camera by putting the setting in the camera section.
[defaults]
# path to ffmpeg binary
# I do not recommend using FFMPEG shipped with your OS. It is often outdated and buggy.
# I recommend using statically built latest version of FFMPEG. You can take it here: https://johnvansickle.com/ffmpeg/
# or just google "ffmpeg static build"
ffmpegPath = "/usr/bin/ffmpeg"
# Storage directory
#
storagePath = "/home/stas/cameraleech"
# Length (in seconds) of single video segment
segmentTime = 600
# ffmpeg log level. Default is repeat+level+error (recommended)
FfmpegLogLevel = "repeat+level+error"
# Additional input options for ffmpeg (are put before ffmpeg -i argument)
# For example you can tune RTSP parameters here:
# - RTSP transport TCP mode. Many cameras don't work with RTSP UDP transport
# properly giving image artifacts (but support it though). I suggest forcing
# TCP transport
# - Socket i/o timeout (stimeout parameter). I/O timeout (please note its in microseconds,
# i.e 1/1000000 of second) after which ffmpeg will exit with an error (and be restarted).
InputOptions = "-stimeout 60000000 -rtsp_transport tcp"
[cameras]
[cameras.cam1]
# URL is specified in ffmpeg format:
# For example, to retrieve video via RTSP protocol which is supported
# on every camera I've encountered with ( https://ffmpeg.org/ffmpeg-protocols.html#rtsp )
# URL will be something like this:
url = "rtsp://admin:[email protected]"
# You can override any parameter from defaults section here
# ffmpegPath = "/opt/some_special_ffmpeg"
# storagePath = "/storage/some_specific_camera_storage"
# segmentTime = 3600
[cameras.cam2]
url = "rtsp://admin:[email protected]"