andrewshulgin / videoserver

Software RTSP NVR with web interface and HLS live view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Main configuration file [conf/videoserver.ini]:

    [general]
    ffmpeg_bin = /usr/bin/ffmpeg
    ; seconds before FFmpeg process is treated as running
    ffmpeg_start_timeout = 20
    ; seconds before killing FFmpeg process
    ffmpeg_stop_timeout = 10
    ; whether to forward ffmpeg output directly to stderr
    ffmpeg_debug_output = false
    live_dir = /home/shulgin/PycharmProjects/videoserver/live
    rec_dir = /home/shulgin/PycharmProjects/videoserver/rec
    keep_free_mb = 100

    [recording]
    ; set to 0 in order to disable
    rec_keep_hours = 12
    segment_duration = 3600

    [api]
    http_addr = 127.0.0.1
    http_port = 44270

    [slack]
    enabled = false
    webhook_url = change_me
    channel = #general

    [smtp]
    enabled = false
    server = example.com
    port = 587
    login = videoserver@example.com
    password = change_me
    from = videoserver@example.com
    subject = VideoServer Notification
    recipient = user@exmaple.com
    ; none, starttls or ssl
    security = starttls

    [telegram]
    enabled = false
    api_key = change_me
    ; public chat
    chat_id = @example
    ; change the previous value to a numeric chat_id on
    convert_chat_id = true

Stream configuration file [conf/streams.ini]:

    ; [stream:<stream_name>]
    [stream:cam1]
    source = rtsp://192.0.0.10:554/h264/ch01/main/av_stream
    ; enable live streaming
    live = true
    ; enable recording
    rec = true
    ; enable keyframe snapshots
    snap = true
    ; optional record segment duration, overrides global value
    segment_duration = 3600

    [stream:cam2]
    source = rtsp://user:password@192.0.0.20:554/h264/ch01/main/av_stream
    live = true
    rec = true
    snap = true

NGINX Configuration example:

    server {
        # ...
        location /live {
                autoindex on;
                autoindex_format json;
        }
        location /rec {
                autoindex on;
                autoindex_format json;
        }
        location /admin {
            auth_basic videoserver;
            auth_basic_user_file htpasswd;
            location /admin/api {
                # refer to the [api] section of the videoserver.ini
                proxy_pass http://127.0.0.1:44270/;
                proxy_buffering off;
            }
        }
    }

About

Software RTSP NVR with web interface and HLS live view


Languages

Language:Python 62.5%Language:HTML 37.5%