mirror of
https://github.com/alexhopeoconnor/frigate.git
synced 2026-10-22 03:02:09 +10:00
FEAT: Support for ffmpeg presets (#3840)
* Add hwaccel presets * Use hwaccel presets * Add input arg presets * Use input arg presets * Make util to clean up redundant code * Add support for output arg presets * Add tests * Update camera specific to use presets * Update hwaccel to use presets * Format files and fix tests * Rewrite tests to test record correctly * Move presets from string to list to avoid manually separating into a list * Add mjpeg cuvid decoder preset * Fix tests * Fix comment
This commit is contained in:
+6
-1
@@ -13,7 +13,7 @@ from abc import ABC, abstractmethod
|
||||
from collections import Counter
|
||||
from collections.abc import Mapping
|
||||
from multiprocessing import shared_memory
|
||||
from typing import AnyStr
|
||||
from typing import Any, AnyStr
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
@@ -886,6 +886,11 @@ def vainfo_hwaccel() -> sp.CompletedProcess:
|
||||
return sp.run(ffprobe_cmd, capture_output=True)
|
||||
|
||||
|
||||
def get_ffmpeg_arg_list(arg: Any) -> list:
|
||||
"""Use arg if list or convert to list format."""
|
||||
return arg if isinstance(arg, list) else arg.split(" ")
|
||||
|
||||
|
||||
class FrameManager(ABC):
|
||||
@abstractmethod
|
||||
def create(self, name, size) -> AnyStr:
|
||||
|
||||
Reference in New Issue
Block a user