mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
dynamically choose timeout param
This commit is contained in:
parent
0d6ab67d22
commit
123c24dc65
@ -29,11 +29,7 @@ apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
||||
|
||||
# btbn-ffmpeg -> amd64
|
||||
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
||||
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
||||
btbn_arch="64"
|
||||
else
|
||||
btbn_arch="arm64"
|
||||
fi
|
||||
btbn_arch="arm64"
|
||||
mkdir -p /usr/lib/btbn-ffmpeg
|
||||
wget -qO btbn-ffmpeg.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linux${btbn_arch}-gpl-5.1.tar.xz"
|
||||
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1
|
||||
|
||||
@ -7,6 +7,7 @@ YAML_EXT = (".yaml", ".yml")
|
||||
PLUS_ENV_VAR = "PLUS_API_KEY"
|
||||
PLUS_API_HOST = "https://api.frigate.video"
|
||||
MAX_SEGMENT_DURATION = 600
|
||||
BTBN_PATH = "/usr/lib/btbn-ffmpeg"
|
||||
|
||||
# Regex Consts
|
||||
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
"""Handles inserting and maintaining ffmpeg presets."""
|
||||
|
||||
import os
|
||||
|
||||
from typing import Any
|
||||
|
||||
from frigate.version import VERSION
|
||||
from frigate.const import BTBN_PATH
|
||||
|
||||
TIMEOUT_PARAM = "-timeout" if not os.path.exists(BTBN_PATH) else "-stimeout"
|
||||
|
||||
_user_agent_args = [
|
||||
"-user_agent",
|
||||
@ -258,7 +263,7 @@ PRESETS_INPUT = {
|
||||
"+genpts+discardcorrupt",
|
||||
"-rtsp_transport",
|
||||
"tcp",
|
||||
"-timeout",
|
||||
TIMEOUT_PARAM,
|
||||
"5000000",
|
||||
"-use_wallclock_as_timestamps",
|
||||
"1",
|
||||
@ -271,7 +276,7 @@ PRESETS_INPUT = {
|
||||
"+genpts+discardcorrupt",
|
||||
"-rtsp_transport",
|
||||
"udp",
|
||||
"-timeout",
|
||||
TIMEOUT_PARAM,
|
||||
"5000000",
|
||||
"-use_wallclock_as_timestamps",
|
||||
"1",
|
||||
@ -290,7 +295,7 @@ PRESETS_INPUT = {
|
||||
"+genpts+discardcorrupt",
|
||||
"-rtsp_transport",
|
||||
"tcp",
|
||||
"-timeout",
|
||||
TIMEOUT_PARAM,
|
||||
"5000000",
|
||||
"-use_wallclock_as_timestamps",
|
||||
"1",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user