diff --git a/motioneye/config.py b/motioneye/config.py index 395ecfad3..be81f8e25 100644 --- a/motioneye/config.py +++ b/motioneye/config.py @@ -109,8 +109,8 @@ 'threshold', 'threshold_maximum', 'threshold_tune', - 'video_device', - 'video_params', + 'videodevice', + 'vid_control_params', 'webcontrol_interface', 'webcontrol_localhost', 'webcontrol_parms', @@ -539,7 +539,7 @@ def add_camera(device_details): camera_config['height'] = h break - camera_config['video_device'] = device_details['path'] + camera_config['videodevice'] = device_details['path'] elif proto == 'motioneye': camera_config['@proto'] = 'motioneye' @@ -808,7 +808,7 @@ def motion_camera_ui_to_dict(ui, prev_config=None): proto = 'netcam' if proto in ('v4l2', 'mmal'): - # leave video_device unchanged + # leave videodevice unchanged # resolution if not ui['resolution']: @@ -823,8 +823,8 @@ def motion_camera_ui_to_dict(ui, prev_config=None): if proto == 'v4l2': # video controls - video_params = (('%s=%s' % (n, c['value'])) for n, c in list(ui['video_controls'].items())) - data['video_params'] = ','.join(video_params) + vid_control_params = (('%s=%s' % (n, c['value'])) for n, c in list(ui['video_controls'].items())) + data['vid_control_params'] = ','.join(vid_control_params) else: # assuming netcam if re.match(r'^rtsp|^rtmp', data.get('netcam_url', prev_config.get('netcam_url', ''))): @@ -1228,21 +1228,21 @@ def motion_camera_dict_to_ui(data): threshold = data['threshold'] * 100.0 / (data['width'] * data['height']) else: # assuming v4l2 - ui['device_url'] = data['video_device'] + ui['device_url'] = data['videodevice'] ui['proto'] = 'v4l2' # resolutions - resolutions = v4l2ctl.list_resolutions(data['video_device']) + resolutions = v4l2ctl.list_resolutions(data['videodevice']) ui['available_resolutions'] = [(str(w) + 'x' + str(h)) for (w, h) in resolutions] ui['resolution'] = str(data['width']) + 'x' + str(data['height']) - video_controls = v4l2ctl.list_ctrls(data['video_device']) + video_controls = v4l2ctl.list_ctrls(data['videodevice']) video_controls = [(n, c) for (n, c) in list(video_controls.items()) if 'min' in c and 'max' in c and 'value' in c] - video_params = data['video_params'].split(',') + vid_control_params = data['vid_control_params'].split(',') vid_control_values = {} - for param in video_params: + for param in vid_control_params: parts = param.split('=') if len(parts) == 1: name, value = param, 1 @@ -1912,8 +1912,8 @@ def _set_default_motion_camera(camera_id, data): data.setdefault('@id', camera_id) if utils.is_v4l2_camera(data): - data.setdefault('video_device', '/dev/video0') - data.setdefault('video_params', '') + data.setdefault('videodevice', '/dev/video0') + data.setdefault('vid_control_params', '') data.setdefault('width', 352) data.setdefault('height', 288) diff --git a/motioneye/extra/camera-1.conf.sample b/motioneye/extra/camera-1.conf.sample index f24057de9..f9c060afb 100644 --- a/motioneye/extra/camera-1.conf.sample +++ b/motioneye/extra/camera-1.conf.sample @@ -77,8 +77,8 @@ movie_output off movie_passthrough off movie_codec mp4 movie_quality 75 -on_event_start /home/dietpi/motioneye/motioneye/scripts/relayevent.sh "" start %t -on_event_end /home/dietpi/motioneye/motioneye/scripts/relayevent.sh "" stop %t -on_movie_end /home/dietpi/motioneye/motioneye/scripts/relayevent.sh "" movie_end %t %f -on_picture_save /home/dietpi/motioneye/motioneye/scripts/relayevent.sh "" picture_save %t %f +on_event_start /usr/local/share/motioneye/extra/scripts/relayevent.sh "" start %t +on_event_end /usr/local/share/motioneye/extra/scripts/relayevent.sh "" stop %t +on_movie_end /usr/local/share/motioneye/extra/scripts/relayevent.sh "" movie_end %t %f +on_picture_save /usr/local/share/motioneye/extra/scripts/relayevent.sh "" picture_save %t %f stream_authentication user:user