Skip to content
jbvsmo edited this page Oct 3, 2014 · 8 revisions

How to configure Dynamic Stream Server (DSS)

You'll find the default settings for DSS at dss/global.conf. Do not change this file directly for it may be updated. Instead, create another file local.conf in the same directory and add the sections and variables you want to replace.

Here is a description of the section and variables on those files.

All data types are explained at: Data Types for Configuration Files. Some of tem may also contain subtypes.

Unless explicitly stated, all options are available and unchanged since version 0.5.


Table of Contents:


Sections

[general]

Name Default Type Description
base_dir /tmp/dss <string> Absolute path for all content generated (parent dir).
daemon no <boolean> Starts the process as daemon.
auto_start <list:string> List of all streams that should be turned on automatically.
auto_start_provider <list:string> List of all providers that should be turned on automatically (all their streams).

New in version 0.6: "auto_start_provider"

New in version 0.8: "daemon"

Moved in version 0.8: "auto_start", "auto_start_provider" are now on "video_start" (They still work for compatibility)

[video_start]

Name Default Type Description
enabled true <boolean> Enable auto start of video streams (defined on general)
auto_start <list:string> List of all streams that should be turned on automatically.
auto_start_provider <list:string> List of all providers that should be turned on automatically (all their streams).

New in version 0.8: "auto_start", "auto_start_provider"

[local]

Name Default Type Description
addr localhost <string> Address to bind TCP and HTTP servers.
port 8000 <int> HTTP port for Tornado server.
tcp_port 9995 <int> TCP port to listen to mobile streams.
http_client_timeout 30 <int> HTTP clients must renew the connection in X seconds (default).
http_client_timeout_max 100 <int> HTTP clients must renew the connection in X seconds (maximum).
http_client_timeout_min 5 <int> HTTP clients must renew the connection in X seconds (minimum).

[http-server]

Name Default Type Description
addr http://127.0.0.1:80/ <string> Address to Nginx HTTP server.
stat_url stat <string> Location url for RTMP stats.
control_url rtmp_control <string> Location url for RTMP control.

[rtmp-server]

Name Default Type Description
addr rtmp://127.0.0.1:1935/ <string> Nginx RTMP full URI
app dss <string> RTMP App name for all streams and providers.

[ffmpeg]

Name Default Type Description
bin /usr/local/bin/ffmpeg <string> FFmpeg binary path
probe 10K <string> FFmpeg -probesize option to remote connections. If too small, try 200K.
timeout 30 <int>
reload 10 <int> Wait time to reload dead FFmpeg processes.

Changed in version 0.7: "reload" was 1

[thumbnail]

Name Default Type Description
enabled true <boolean> Enable thumbnail download round for all registered providers.
dir ${general:base_dir}/thumb <string> Thumbnail storage path.
input_opt -y <string> FFmpeg input for thumbnail download.
output_opt -an -frames:v 1 <string> FFmpeg output for thumbnail download.
resize_opt -s {0} <string> FFmpeg resize command for thumbnail download.
sizes medium:320x240 small:176x132 <split> Names and resolutions for resized thumbnails.
format jpg <string> Format for downloaded thumbnails. This is also the file extension.
interval 300 <int> Interval between two thumbnail download rounds in seconds.
timeout 45 <int> FFmpeg process is killed if no output is generated within this time in seconds.
start_after 30 <int> Start the 1st thumbnail round after this time in seconds.
workers 10 <int> Number of workers to download thumbnails.
delete_after 3600 <int> Erase thumbnails older than this time in seconds.
mobile_interval 10 <float> Interval to generate thumbnails from mobile streams.
live_interval 10 <float> Interval to generate thumbnails from active streams from providers.

New in version 0.8: "live_interval"

Changed in version 0.8: "mobile_interval" was type <int>

[providers]

Name Default Type Description
enabled true <boolean> Enable stream providers
conf_file_ext conf <string> File extension for provider configuration at dss/providers_data
conf_file_enc utf-8 <string> File encoding for provider configuration

[mobile]

Name Default Type Description
enabled true <boolean> Enable mobile streaming with TCP server.
dir ${general:base_dir}/mobile <string> Path to store data related to mobile streams.
time_limit 0 <int> Time in seconds to limit mobile streaming. 0 means no limit.

New in version 0.6: "time_limit"

[cache]

Name Default Type Description
dir ${general:base_dir}/cache <string> Storage of cached data from providers download.
valid_for 86400 <int> Cache validity in seconds

[log]

Name Default Type Description
dir ${general:base_dir}/log <string> Log files path.
program_log dss.log <string> Log file for all program log.
save true <boolean> Save log to "program_log" file.
enable_process_log true <boolean> Enable dumping FFmpeg output to file.

New in version 0.7: "program_log", "save"

New in version 0.8: "enable_process_log"

[database]

Name Default Type Description
name dss <string> Database collection name.
type mongodb <string> Database used. Only mongodb is supported.
version 1 <int> Internal database version (Unused).

[recorder]

New in version 0.6

Name Default Type Description
recorders rec1 <list:string> Recorders name on RTMP app (up to 2 supported).
interval 3600 <int> Interval to split video records.
format %Y-%m-%d_%H:%M <string> File name after spliting. Use strftime format.
workers 0 <int> Number of workers to deploy recording (Unused).
dir ${general:base_dir}/rec <string> Recordings path.

New in version 0.6: "recorders", "interval", "format", "workers", "dir"

[web]

New in version 0.7

Name Default Type Description
map.position 0, 0 <list:float> Inital position to display map.
map.zoom 3 <int> Initial zoom level for map.
map.traffic_layer on <boolean> Enable traffic layer on map.
map.api_key <string> Google Maps v3 API (not required).

New in version 0.7: "map".{"position", "zoom", "traffic_layer", "api_key"}