mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
Cleanup
This commit is contained in:
parent
c0816c6bcc
commit
d3755fd5ed
@ -201,7 +201,7 @@ ENV ALLOW_RESET=True
|
|||||||
# Disable tokenizer parallelism warning
|
# Disable tokenizer parallelism warning
|
||||||
ENV TOKENIZERS_PARALLELISM=true
|
ENV TOKENIZERS_PARALLELISM=true
|
||||||
|
|
||||||
ENV ENV LIBAVFORMAT_VERSION_MAJOR=60
|
ENV LIBAVFORMAT_VERSION_MAJOR=60
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN --mount=type=bind,source=docker/main/install_deps.sh,target=/deps/install_deps.sh \
|
RUN --mount=type=bind,source=docker/main/install_deps.sh,target=/deps/install_deps.sh \
|
||||||
|
|||||||
@ -14,7 +14,6 @@ from flask import (
|
|||||||
)
|
)
|
||||||
from peewee import DoesNotExist
|
from peewee import DoesNotExist
|
||||||
|
|
||||||
from frigate.config import FrigateConfig
|
|
||||||
from frigate.const import EXPORT_DIR
|
from frigate.const import EXPORT_DIR
|
||||||
from frigate.models import Export, Recordings
|
from frigate.models import Export, Recordings
|
||||||
from frigate.record.export import PlaybackFactorEnum, RecordingExporter
|
from frigate.record.export import PlaybackFactorEnum, RecordingExporter
|
||||||
@ -145,7 +144,6 @@ def export_delete(id: str):
|
|||||||
404,
|
404,
|
||||||
)
|
)
|
||||||
|
|
||||||
config: FrigateConfig = current_app.frigate_config
|
|
||||||
files_in_use = []
|
files_in_use = []
|
||||||
for process in psutil.process_iter():
|
for process in psutil.process_iter():
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -1223,7 +1223,7 @@ class CameraConfig(FrigateBaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
cmd = (
|
cmd = (
|
||||||
["ffmpeg"]
|
[self.ffmpeg.ffmpeg_path]
|
||||||
+ global_args
|
+ global_args
|
||||||
+ hwaccel_args
|
+ hwaccel_args
|
||||||
+ input_args
|
+ input_args
|
||||||
@ -1549,7 +1549,9 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
if need_detect_dimensions or need_record_fourcc:
|
if need_detect_dimensions or need_record_fourcc:
|
||||||
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
||||||
try:
|
try:
|
||||||
stream_info = stream_info_retriever.get_stream_info(config.ffmpeg, input.path)
|
stream_info = stream_info_retriever.get_stream_info(
|
||||||
|
config.ffmpeg, input.path
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warn(
|
logger.warn(
|
||||||
f"Error detecting stream parameters automatically for {input.path} Applying default values."
|
f"Error detecting stream parameters automatically for {input.path} Applying default values."
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import psutil
|
|||||||
import py3nvml.py3nvml as nvml
|
import py3nvml.py3nvml as nvml
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from frigate.config import FfmpegConfig
|
|
||||||
from frigate.const import (
|
from frigate.const import (
|
||||||
DRIVER_AMD,
|
DRIVER_AMD,
|
||||||
DRIVER_ENV_VAR,
|
DRIVER_ENV_VAR,
|
||||||
@ -379,7 +378,7 @@ def get_jetson_stats() -> dict[int, dict]:
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
def ffprobe_stream(ffmpeg: FfmpegConfig, path: str) -> sp.CompletedProcess:
|
def ffprobe_stream(ffmpeg, path: str) -> sp.CompletedProcess:
|
||||||
"""Run ffprobe on stream."""
|
"""Run ffprobe on stream."""
|
||||||
clean_path = escape_special_characters(path)
|
clean_path = escape_special_characters(path)
|
||||||
ffprobe_cmd = [
|
ffprobe_cmd = [
|
||||||
@ -439,7 +438,9 @@ def auto_detect_hwaccel() -> str:
|
|||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
async def get_video_properties(ffmpeg: FfmpegConfig, url: str, get_duration: bool = False) -> dict[str, any]:
|
async def get_video_properties(
|
||||||
|
ffmpeg, url: str, get_duration: bool = False
|
||||||
|
) -> dict[str, any]:
|
||||||
async def calculate_duration(video: Optional[any]) -> float:
|
async def calculate_duration(video: Optional[any]) -> float:
|
||||||
duration = None
|
duration = None
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user