Improve default timelapse args and make timelapse customizable (#7840)

* Add args to ignore audio and only process keyframes

* Add timelapse args to config

* Update docs

* Formatting

* Fix spacing

* Fix formatting

* add example of math for pts
This commit is contained in:
Nicolas Mowen
2023-09-21 06:20:05 -06:00
committed by GitHub
parent c743dfd657
commit 7d0216b8fb
3 changed files with 25 additions and 2 deletions

View File

@@ -18,6 +18,9 @@ from frigate.models import Recordings
logger = logging.getLogger(__name__)
TIMELAPSE_DATA_INPUT_ARGS = "-an -skip_frame nokey"
def lower_priority():
os.nice(10)
@@ -99,8 +102,8 @@ class RecordingExporter(threading.Thread):
ffmpeg_cmd = (
parse_preset_hardware_acceleration_encode(
self.config.ffmpeg.hwaccel_args,
ffmpeg_input,
f"-vf setpts=0.04*PTS -r 30 -an {file_name}",
f"{TIMELAPSE_DATA_INPUT_ARGS} {ffmpeg_input}",
f"{self.config.cameras[self.camera].record.export.timelapse_args} {file_name}",
EncodeTypeEnum.timelapse,
)
).split(" ")