1. Домой
  2. Документы
  3. Spectr
  4. Конфигурация

Конфигурация

Конфигурация по умолчанию находится в файле /etc/spectr/spectr.conf.

Пример конфигурации:

{
  "server": {
    "node_name": "node",
    "http_port": 8080,
    "http_threads": 16,
    "global_session_limit": 0,
    "session_timeout": 600,
    "client_timeout": 1800,
    "auth": {
      "enabled": false,
      "type": "token",
      "restrict_ip": false,
      "params": {
        "secret": "testkey"
      }
    }
  },
  "log": {
    "path": "/var/log/spectr/spectr.log",
    "level": 5,
    "facility": 0,
    "use_syslog": false,
    "foreground": true
  },
  "json_rpc_api": {
    "enabled": true,
    "listen_host": "0.0.0.0",
    "tcp_port": 8189,
    "debug_log": true
  },
  "license" : {
    "owner": "test",
    "code": "d61d0-e448a-a85f7-4321c-21cd5",
    "objects_limit": 0,
    "expiration_date": "31.12.2021"
  },
  "vod": {
    "file_seek_mode": "none",
    "pvr_seek_mode": "none",
    "locations": [
      {
        "id": "default",
        "location": "/opt/video/"
      }
    ]
  },
  "pvr": {
    "enabled": true,
    "host": "127.0.0.1",
    "port": 4089
  },
  "groups": [
      {
        "name": "default",
        "enabled": true,
        "dst": [
          {
            "type": "httpts",
            "params": {}
          },
          {
            "type": "hls",
            "params": {
              "segment_number": "5",
              "segment_length": "10",
              "segment_clear_directory": "true",
              "segment_path": "/tmp/segments/"
            }
          }
        ]
      }
  ],
  "streams": [
    {
      "id": "stream1",
      "alias": "stream1",
      "name": "Stream 1",
      "group": "test_streams",
      "enabled": true,
      "src": [
        {
          "name": "Main",
          "address": "httpts://127.0.0.1:8081/ch2/",
          "buffer_size": 1316,
          "enabled": true
        },
        {
          "name": "Main2",
          "address": "httpts://127.0.0.1:8081/ch3/",
          "buffer_size": 1316,
          "enabled": true
        }
      ],
      "dst": [
        {
          "type": "httpts",
          "params": {}
        },
        {
          "type": "hls",
          "params": {
            "segment_number": "5",
            "segment_length": "10",
            "segment_clear_directory": "true",
            "segment_path": "/tmp/segments/",
            "obsolete_segment_num": "1"
          }
        }
      ]
    }
  ]
}