mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 10:15:22 +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
|
# btbn-ffmpeg -> amd64
|
||||||
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
||||||
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
|
||||||
btbn_arch="64"
|
|
||||||
else
|
|
||||||
btbn_arch="arm64"
|
btbn_arch="arm64"
|
||||||
fi
|
|
||||||
mkdir -p /usr/lib/btbn-ffmpeg
|
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"
|
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
|
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_ENV_VAR = "PLUS_API_KEY"
|
||||||
PLUS_API_HOST = "https://api.frigate.video"
|
PLUS_API_HOST = "https://api.frigate.video"
|
||||||
MAX_SEGMENT_DURATION = 600
|
MAX_SEGMENT_DURATION = 600
|
||||||
|
BTBN_PATH = "/usr/lib/btbn-ffmpeg"
|
||||||
|
|
||||||
# Regex Consts
|
# Regex Consts
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
"""Handles inserting and maintaining ffmpeg presets."""
|
"""Handles inserting and maintaining ffmpeg presets."""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from frigate.version import VERSION
|
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_args = [
|
||||||
"-user_agent",
|
"-user_agent",
|
||||||
@ -258,7 +263,7 @@ PRESETS_INPUT = {
|
|||||||
"+genpts+discardcorrupt",
|
"+genpts+discardcorrupt",
|
||||||
"-rtsp_transport",
|
"-rtsp_transport",
|
||||||
"tcp",
|
"tcp",
|
||||||
"-timeout",
|
TIMEOUT_PARAM,
|
||||||
"5000000",
|
"5000000",
|
||||||
"-use_wallclock_as_timestamps",
|
"-use_wallclock_as_timestamps",
|
||||||
"1",
|
"1",
|
||||||
@ -271,7 +276,7 @@ PRESETS_INPUT = {
|
|||||||
"+genpts+discardcorrupt",
|
"+genpts+discardcorrupt",
|
||||||
"-rtsp_transport",
|
"-rtsp_transport",
|
||||||
"udp",
|
"udp",
|
||||||
"-timeout",
|
TIMEOUT_PARAM,
|
||||||
"5000000",
|
"5000000",
|
||||||
"-use_wallclock_as_timestamps",
|
"-use_wallclock_as_timestamps",
|
||||||
"1",
|
"1",
|
||||||
@ -290,7 +295,7 @@ PRESETS_INPUT = {
|
|||||||
"+genpts+discardcorrupt",
|
"+genpts+discardcorrupt",
|
||||||
"-rtsp_transport",
|
"-rtsp_transport",
|
||||||
"tcp",
|
"tcp",
|
||||||
"-timeout",
|
TIMEOUT_PARAM,
|
||||||
"5000000",
|
"5000000",
|
||||||
"-use_wallclock_as_timestamps",
|
"-use_wallclock_as_timestamps",
|
||||||
"1",
|
"1",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user