2019-03-12 02:57:10 +00:00
|
|
|
"""Constants for Stream component."""
|
2019-07-31 19:25:30 +00:00
|
|
|
DOMAIN = "stream"
|
2019-03-12 02:57:10 +00:00
|
|
|
|
2021-02-20 14:49:39 +00:00
|
|
|
ATTR_ENDPOINTS = "endpoints"
|
2019-07-31 19:25:30 +00:00
|
|
|
ATTR_STREAMS = "streams"
|
2019-03-28 04:47:07 +00:00
|
|
|
|
2021-02-20 14:49:39 +00:00
|
|
|
OUTPUT_FORMATS = ["hls"]
|
2019-03-12 02:57:10 +00:00
|
|
|
|
2021-02-23 02:37:19 +00:00
|
|
|
SEGMENT_CONTAINER_FORMAT = "mp4" # format for segments
|
|
|
|
RECORDER_CONTAINER_FORMAT = "mp4" # format for recorder output
|
|
|
|
AUDIO_CODECS = {"aac", "mp3"}
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
FORMAT_CONTENT_TYPE = {"hls": "application/vnd.apple.mpegurl"}
|
2019-03-12 02:57:10 +00:00
|
|
|
|
2021-02-08 15:19:41 +00:00
|
|
|
OUTPUT_IDLE_TIMEOUT = 300 # Idle timeout due to inactivity
|
|
|
|
|
2021-02-10 20:51:16 +00:00
|
|
|
NUM_PLAYLIST_SEGMENTS = 3 # Number of segments to use in HLS playlist
|
|
|
|
MAX_SEGMENTS = 4 # Max number of segments to keep around
|
2020-08-11 21:12:41 +00:00
|
|
|
MIN_SEGMENT_DURATION = 1.5 # Each segment is at least this many seconds
|
2020-08-20 03:18:54 +00:00
|
|
|
|
|
|
|
PACKETS_TO_WAIT_FOR_AUDIO = 20 # Some streams have an audio stream with no audio
|
2020-09-30 15:45:59 +00:00
|
|
|
MAX_TIMESTAMP_GAP = 10000 # seconds - anything from 10 to 50000 is probably reasonable
|
2020-10-25 02:55:12 +00:00
|
|
|
|
|
|
|
MAX_MISSING_DTS = 6 # Number of packets missing DTS to allow
|
|
|
|
STREAM_TIMEOUT = 30 # Timeout for reading stream
|
2020-11-11 17:32:56 +00:00
|
|
|
|
|
|
|
STREAM_RESTART_INCREMENT = 10 # Increase wait_timeout by this amount each retry
|
|
|
|
STREAM_RESTART_RESET_TIME = 300 # Reset wait_timeout after this many seconds
|