mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-24 07:24:42 +03:00
Add ffmpeg config to increase HEVC compatibility with Apple devices (#15795)
* Add config option for handling HEVC playback on Apple devices * Update docs * Remove unused
This commit is contained in:
committed by
Blake Blackshear
parent
281407247b
commit
6a83f40135
@@ -458,13 +458,12 @@ class FrigateConfig(FrigateBaseModel):
|
||||
camera_config.ffmpeg.hwaccel_args = self.ffmpeg.hwaccel_args
|
||||
|
||||
for input in camera_config.ffmpeg.inputs:
|
||||
need_record_fourcc = False and "record" in input.roles
|
||||
need_detect_dimensions = "detect" in input.roles and (
|
||||
camera_config.detect.height is None
|
||||
or camera_config.detect.width is None
|
||||
)
|
||||
|
||||
if need_detect_dimensions or need_record_fourcc:
|
||||
if need_detect_dimensions:
|
||||
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
||||
try:
|
||||
stream_info = stream_info_retriever.get_stream_info(
|
||||
@@ -488,14 +487,6 @@ class FrigateConfig(FrigateBaseModel):
|
||||
else DEFAULT_DETECT_DIMENSIONS["height"]
|
||||
)
|
||||
|
||||
if need_record_fourcc:
|
||||
# Apple only supports HEVC if it is hvc1 (vs. hev1)
|
||||
camera_config.ffmpeg.output_args._force_record_hvc1 = (
|
||||
stream_info["fourcc"] == "hevc"
|
||||
if stream_info.get("hevc")
|
||||
else False
|
||||
)
|
||||
|
||||
# Warn if detect fps > 10
|
||||
if camera_config.detect.fps > 10:
|
||||
logger.warning(
|
||||
|
||||
Reference in New Issue
Block a user