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
|
||||
ENV TOKENIZERS_PARALLELISM=true
|
||||
|
||||
ENV ENV LIBAVFORMAT_VERSION_MAJOR=60
|
||||
ENV LIBAVFORMAT_VERSION_MAJOR=60
|
||||
|
||||
# Install dependencies
|
||||
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 frigate.config import FrigateConfig
|
||||
from frigate.const import EXPORT_DIR
|
||||
from frigate.models import Export, Recordings
|
||||
from frigate.record.export import PlaybackFactorEnum, RecordingExporter
|
||||
@ -145,7 +144,6 @@ def export_delete(id: str):
|
||||
404,
|
||||
)
|
||||
|
||||
config: FrigateConfig = current_app.frigate_config
|
||||
files_in_use = []
|
||||
for process in psutil.process_iter():
|
||||
try:
|
||||
|
||||
@ -1223,7 +1223,7 @@ class CameraConfig(FrigateBaseModel):
|
||||
)
|
||||
|
||||
cmd = (
|
||||
["ffmpeg"]
|
||||
[self.ffmpeg.ffmpeg_path]
|
||||
+ global_args
|
||||
+ hwaccel_args
|
||||
+ input_args
|
||||
@ -1549,7 +1549,9 @@ class FrigateConfig(FrigateBaseModel):
|
||||
if need_detect_dimensions or need_record_fourcc:
|
||||
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
||||
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:
|
||||
logger.warn(
|
||||
f"Error detecting stream parameters automatically for {input.path} Applying default values."
|
||||
|
||||
@ -15,7 +15,6 @@ import psutil
|
||||
import py3nvml.py3nvml as nvml
|
||||
import requests
|
||||
|
||||
from frigate.config import FfmpegConfig
|
||||
from frigate.const import (
|
||||
DRIVER_AMD,
|
||||
DRIVER_ENV_VAR,
|
||||
@ -379,7 +378,7 @@ def get_jetson_stats() -> dict[int, dict]:
|
||||
return results
|
||||
|
||||
|
||||
def ffprobe_stream(ffmpeg: FfmpegConfig, path: str) -> sp.CompletedProcess:
|
||||
def ffprobe_stream(ffmpeg, path: str) -> sp.CompletedProcess:
|
||||
"""Run ffprobe on stream."""
|
||||
clean_path = escape_special_characters(path)
|
||||
ffprobe_cmd = [
|
||||
@ -439,7 +438,9 @@ def auto_detect_hwaccel() -> str:
|
||||
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:
|
||||
duration = None
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user