mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
fleshed out the docs and comments a bit
This commit is contained in:
parent
d788752f2f
commit
44e238ffbc
@ -139,7 +139,9 @@ record:
|
||||
|
||||
:::tip
|
||||
|
||||
When using `hwaccel_args`, hardware encoding is used for time lapse generation, using the relevant camera's hwaccel configuration. The encoder determines its own behavior so the resulting file size may be undesirably large.
|
||||
When using `hwaccel_args`, hardware encoding is used for timelapse generation. By default, each camera inherits its export hwaccel settings from its own `ffmpeg.hwaccel_args`, which in turn inherits from the global setting. To override for a specific camera (e.g., when camera resolution exceeds hardware encoder limits), set `record.export.hwaccel_args` at the camera level. Using an unrecognized value or empty string will fall back to software encoding (libx264).
|
||||
|
||||
The encoder determines its own behavior so the resulting file size may be undesirably large.
|
||||
To reduce the output file size the ffmpeg parameter `-qp n` can be utilized (where `n` stands for the value of the quantisation parameter). The value can be adjusted to get an acceptable tradeoff between quality and file size for the given scenario.
|
||||
|
||||
:::
|
||||
|
||||
@ -534,7 +534,11 @@ record:
|
||||
# The -r (framerate) dictates how smooth the output video is.
|
||||
# So the args would be -vf setpts=0.02*PTS -r 30 in that case.
|
||||
timelapse_args: "-vf setpts=0.04*PTS -r 30"
|
||||
# Optional: Global override for hwaccel_args in an export context (default: camera-specific args)
|
||||
# Optional: Hardware acceleration for timelapse exports.
|
||||
# When set to "auto" (default), inherits from camera ffmpeg hwaccel_args, which
|
||||
# in turn inherits from global ffmpeg hwaccel_args. Set to a specific preset
|
||||
# to override, or use an unrecognized value (e.g., empty string) to fall back
|
||||
# to software encoding (libx264).
|
||||
hwaccel_args: auto
|
||||
# Optional: Recording Preview Settings
|
||||
preview:
|
||||
|
||||
@ -523,6 +523,9 @@ class FrigateConfig(FrigateBaseModel):
|
||||
if camera_config.ffmpeg.hwaccel_args == "auto":
|
||||
camera_config.ffmpeg.hwaccel_args = self.ffmpeg.hwaccel_args
|
||||
|
||||
# Resolve export hwaccel_args: camera export -> camera ffmpeg -> global ffmpeg
|
||||
# This allows per-camera override for exports (e.g., when camera resolution
|
||||
# exceeds hardware encoder limits)
|
||||
if camera_config.record.export.hwaccel_args == "auto":
|
||||
camera_config.record.export.hwaccel_args = camera_config.ffmpeg.hwaccel_args
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user