handle and warn if roles dont match enabled features

This commit is contained in:
Blake Blackshear
2020-12-07 08:07:35 -06:00
parent 953c442f13
commit 3c07767138
3 changed files with 54 additions and 1 deletions

View File

@@ -587,9 +587,13 @@ class CameraConfig():
self._ffmpeg_cmds = []
for ffmpeg_input in self._ffmpeg.inputs:
ffmpeg_cmd = self._get_ffmpeg_cmd(ffmpeg_input)
if ffmpeg_cmd is None:
continue
self._ffmpeg_cmds.append({
'roles': ffmpeg_input.roles,
'cmd': self._get_ffmpeg_cmd(ffmpeg_input)
'cmd': ffmpeg_cmd
})
@@ -636,6 +640,11 @@ class CameraConfig():
ffmpeg_output_args = self.ffmpeg.output_args['record'] + [
f"{os.path.join(RECORD_DIR, self.name)}-%Y%m%d%H%M%S.mp4"
] + ffmpeg_output_args
# if there arent any outputs enabled for this input
if len(ffmpeg_output_args) == 0:
return None
return (['ffmpeg'] +
ffmpeg_input.global_args +
ffmpeg_input.hwaccel_args +