errors while parsing motion.conf (Motion 3.2.12 in Raspbian Jessie)
Question
I installed motion (motion Version 3.2.12+git20140228) from the Raspian repository in a newly-installed Raspian Jessie image (2016-02-03-raspbian-jessie-lite.img) on a Raspberry Pi 2 Model B. Motion runs, but is unable to parse my motion.conf file so I can't stop it from constantly saving images.
Everything on this system comes from the Raspian image or their repository.
/home/pi/.motion/motion.conf contains exactly (only) these lines:
webcam_port 8081
webcam_localhost off
control_port 8080
control_localhost off
output_normal off
output_motion off
webcam_maxrate 5
Here is the output generated as motion starts:
[0] [NTC] [ALL] conf_load: Processing thread 0 - config file /home/pi/.motion/motion.conf
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_port"
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_localhost"
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "control_port"
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "control_localhost"
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_normal"
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_motion"
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_maxrate"[0] [NTC] [ALL] motion_startup: Using default log level (NTC) (6)
[0] [NTC] [ALL] motion_startup: Motion 3.2.12+git20140228 Started
[0] [NTC] [ALL] motion_startup: Logging to syslog
[0] [NTC] [ALL] motion_startup: Using default log type (ALL)
[0] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC)
[0] [NTC] [ENC] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3670016 LIBAVFORMAT_BUILD 3670272
[0] [NTC] [ALL] main: Thread 1 is from /home/pi/.motion/motion.conf
[0] [NTC] [ALL] main: Thread 1 is device: /dev/video0 input -1
[0] [NTC] [ALL] main: Stream port 0
[0] [NTC] [ALL] main: Waiting for threads to finish, pid: 2381
[1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled
[1] [NTC] [VID] vid_v4lx_start: Using videodevice /dev/video0 and input -1
[1] [NTC] [VID] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "HD Webcam C615"
cap.bus_info: "usb-3f980000.usb-1.4"
cap.capabilities=0x84200001
------------------------
[1] [NTC] [VID] v4l2_get_capability: - VIDEO_CAPTURE
[1] [NTC] [VID] v4l2_get_capability: - STREAMING
[1] [NTC] [VID] v4l2_select_input: name = "Camera 1", type 0x00000002, status 00000000
[1] [NTC] [VID] v4l2_select_input: - CAMERA
[1] [WRN] [VID] v4l2_select_input: Device doesn't support VIDIOC_G_STD
[1] [NTC] [VID] v4l2_set_pix_format: Config palette index 17 (YU12) doesn't work.
[1] [NTC] [VID] v4l2_set_pix_format: Supported palettes:
[1] [NTC] [VID] v4l2_set_pix_format: (0) YUYV (YUV 4:2:2 (YUYV))
[1] [NTC] [VID] v4l2_set_pix_format: 0 - YUV 4:2:2 (YUYV) (compressed : 0) (0x56595559)
[1] [NTC] [VID] v4l2_set_pix_format: (1) MJPG (MJPEG)
[1] [NTC] [VID] v4l2_set_pix_format: 1 - MJPEG (compressed : 1) (0x47504a4d)
[1] [NTC] [VID] v4l2_set_pix_format Selected palette YUYV
[1] [NTC] [VID] v4l2_do_set_pix_format: Testing palette YUYV (352x288)
[1] [NTC] [VID] v4l2_do_set_pix_format: Using palette YUYV (352x288) bytesperlines 704 sizeimage 202752 colorspace 00000008
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980900, "Brightness", range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Brightness", default -8193, current 128
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980901, "Contrast", range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Contrast", default 57343, current 32
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980902, "Saturation", range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Saturation", default 57343, current 32
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980913, "Gain", range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Gain", default 57343, current 64
[1] [NTC] [VID] vid_v4lx_start: Using V4L2
[1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
[1] [NTC] [EVT] event_new_video FPS 30
[1] [NTC] [ALL] motion_detected: Motion detected - starting event 1[1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./01-20160209190732-00.jpg
...
followed by a continuous stream of event_newfile lines announcing new jpg images saved until I stop it with Ctl-c.
#####REVISED motion.conf file showing old and new config option names (see explanation below):#####
#webcam_port 8081
stream_port 8081
#webcam_localhost off
stream_localhost off
#control_port 8080
webcontrol_port 8080
#control_localhost off
webcontrol_localhost off
#output_normal off
output_pictures off
#output_motion off
output_debug_pictures off
#webcam_maxrate 15
stream_maxrate 15
Environment
Motion version: |
3.2.12 |
ffmpeg version: |
|
Libraries: |
libmysqlclient18 5.5.44-0+deb8u1 ; no xmlrpc; no ffmpeg, no postgresql |
Server OS: |
Raspian Jessie, kernel 4.1.17-v7+ |
--
JoelK - 10 Feb 2016
Answer
Apparently the packager of this particular package Version: 3.2.12+git20140228-4+b2 modified the config option names so my motion.conf file which I've been using with another 3.2.12 package (in Ubuntu 14.04) is no longer valid. Motion now works as expected. I pasted the revised config file above, showing the old option names commented out, followed by the corresponding new names needed for this version.