From 443ab40c3608b645c2b0ba8e7d93c7d42b13d09b Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Mon, 11 Mar 2019 22:44:57 +0200 Subject: [PATCH] Do not expect video_controls from MMAL cams --- motioneye/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/motioneye/config.py b/motioneye/config.py index f21c5d8c6..2efe1799c 100644 --- a/motioneye/config.py +++ b/motioneye/config.py @@ -811,9 +811,10 @@ def motion_camera_ui_to_dict(ui, prev_config=None): threshold = int(float(ui['frame_change_threshold']) * width * height / 100) - # video controls - vid_control_params = (('%s=%s' % (n, c['value'])) for n, c in ui['video_controls'].items()) - data['vid_control_params'] = ','.join(vid_control_params) + if proto == 'v4l2': + # video controls + vid_control_params = (('%s=%s' % (n, c['value'])) for n, c in ui['video_controls'].items()) + data['vid_control_params'] = ','.join(vid_control_params) else: # assuming netcam if data.get('netcam_url', prev_config.get('netcam_url', '')).startswith('rtsp'):