Send Motion-user mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."
Today's Topics:
1. works as demon only when started from command line (harry sweet)
2. Re: works as demon only when started from command line
(Mike Wilson)
3. Raspberry Pi, arecord, and Motion (Jo Pitts)
----------------------------------------------------------------------
Message: 1
Date: Wed, 15 Mar 2017 23:03:46 +0000
From: harry sweet <[email protected]>
Subject: [Motion-user] works as demon only when started from command
line
To: [email protected]
Message-ID:
<cakajnzgqd0xg38ekaxbykkqrke+gb1_ea9og6szj2_bmugh...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I am setting up motion on a Raspberry Pi. It seems to work fine when I
start from command line, sudo motion but does not save files when started
with boot up from /etc/default/motion. Same exact configuration file, in
/etc/motion.
I've attached segments of the log file from when it could or could not save
files.
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
[0] [NTC] [STR] [Mar 15 18:40:49] httpd_run: motion-httpd: waiting for data on
0.0.0.0 port TCP 8080
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "UVC Camera (046d:0825)"
cap.bus_info: "usb-3f980000.usb-1.2"
cap.capabilities=0x84200001
------------------------
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_get_capability: - VIDEO_CAPTURE
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_get_capability: - STREAMING
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_select_input: name = "Camera 1", type
0x00000002, status 00000000
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_select_input: - CAMERA
[1] [WRN] [VID] [Mar 15 18:40:49] v4l2_select_input: Device doesn't support
VIDIOC_G_STD
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_set_pix_format: Config palette index 17
(YU12) doesn't work.
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_set_pix_format: Supported palettes:
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_set_pix_format: (0) YUYV (YUYV 4:2:2)
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_set_pix_format: 0 - YUYV 4:2:2
(compressed : 0) (0x56595559)
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_set_pix_format: (1) MJPG (Motion-JPEG)
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_set_pix_format: 1 - Motion-JPEG
(compressed : 1) (0x47504a4d)
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_set_pix_format Selected palette YUYV
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_do_set_pix_format: Testing palette YUYV
(640x480)
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_do_set_pix_format: Using palette YUYV
(640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000008
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: found control 0x00980900,
"Brightness", range 0,255
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: "Brightness", default
-8193, current 128
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: found control 0x00980901,
"Contrast", range 0,255
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: "Contrast", default
57343, current 32
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: found control 0x00980902,
"Saturation", range 0,255
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: "Saturation", default
57343, current 32
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: found control 0x00980913,
"Gain", range 0,255
[1] [NTC] [VID] [Mar 15 18:40:49] v4l2_scan_controls: "Gain", default 57343,
current 0
[1] [NTC] [VID] [Mar 15 18:40:49] vid_v4lx_start: Using V4L2
[1] [NTC] [ALL] [Mar 15 18:40:49] image_ring_resize: Resizing pre_capture
buffer to 1 items
[1] [NTC] [STR] [Mar 15 18:40:52] http_bindsock: motion-stream testing : IPV4
addr: 0.0.0.0 port: 8081
[1] [NTC] [STR] [Mar 15 18:40:52] http_bindsock: motion-stream Bound : IPV4
addr: 0.0.0.0 port: 8081
[1] [NTC] [ALL] [Mar 15 18:40:52] motion_init: Started motion-stream server in
port 8081 auth Disabled
[1] [NTC] [EVT] [Mar 15 18:41:02] event_new_video FPS 6
[1] [NTC] [EVT] [Mar 15 18:41:02] event_newfile: File of type 8 saved to:
/var/lib/motion/01-20170315184102.avi
[1] [NTC] [ALL] [Mar 15 18:41:02] motion_detected: Motion detected - starting
event 1
[1] [NTC] [ALL] [Mar 15 18:46:18] preview_save: different filename or picture
only!
[1] [NTC] [EVT] [Mar 15 18:46:18] event_newfile: File of type 1 saved to:
/var/lib/motion/01-20170315184342-05.jpg
[1] [NTC] [ALL] [Mar 15 18:46:18] motion_loop: End of event 1
[1] [NTC] [EVT] [Mar 15 18:47:07] event_new_video FPS 6
[1] [NTC] [EVT] [Mar 15 18:47:07] event_newfile: File of type 8 saved to:
/var/lib/motion/02-20170315184707.avi
[1] [NTC] [ALL] [Mar 15 18:47:07] motion_detected: Motion detected - starting
event 2
[1] [NTC] [ALL] [Mar 15 18:58:21] preview_save: different filename or picture
only!
[1] [NTC] [EVT] [Mar 15 18:58:21] event_newfile: File of type 1 saved to:
/var/lib/motion/02-20170315185536-02.jpg
[1] [NTC] [ALL] [Mar 15 18:58:21] motion_loop: End of event 2
[1] [NTC] [EVT] [Mar 15 18:58:54] event_new_video FPS 6
[1] [NTC] [EVT] [Mar 15 18:58:54] event_newfile: File of type 8 saved to:
/var/lib/motion/03-20170315185854.avi
[1] [NTC] [ALL] [Mar 15 18:58:54] motion_detected: Motion detected - starting
event 3
-------------- next part --------------
[0] [NTC] [ALL] [Mar 15 14:57:57] motion_startup: Using log type (ALL) log
level (NTC)
[0] [NTC] [ALL] [Mar 15 14:57:57] become_daemon: Motion going to daemon mode
[0] [NTC] [ALL] [Mar 15 14:57:57] become_daemon: Created process id file
/var/run/motion/motion.pid. Process ID is 558
[0] [NTC] [ALL] [Mar 15 14:57:57] motion_startup: Motion running as daemon
process
[0] [NTC] [ENC] [Mar 15 14:57:57] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3670016
LIBAVFORMAT_BUILD 3670272
[0] [NTC] [ALL] [Mar 15 14:57:58] main: Thread 1 is from /etc/motion/motion.conf
[0] [NTC] [ALL] [Mar 15 14:57:58] main: Thread 1 is device: /dev/video0 input -1
[0] [NTC] [ALL] [Mar 15 14:57:58] main: Stream port 8081
[0] [NTC] [ALL] [Mar 15 14:57:58] main: Waiting for threads to finish, pid: 558
[1] [NTC] [ALL] [Mar 15 14:57:58] motion_init: Thread 1 started , motion
detection Enabled
[1] [NTC] [VID] [Mar 15 14:57:58] vid_v4lx_start: Using videodevice /dev/video0
and input -1
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "UVC Camera (046d:0825)"
cap.bus_info: "usb-3f980000.usb-1.2"
cap.capabilities=0x84200001
------------------------
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_get_capability: - VIDEO_CAPTURE
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_get_capability: - STREAMING
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_select_input: name = "Camera 1", type
0x00000002, status 00000000
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_select_input: - CAMERA
[1] [WRN] [VID] [Mar 15 14:57:58] v4l2_select_input: Device doesn't support
VIDIOC_G_STD
[0] [NTC] [STR] [Mar 15 14:57:58] httpd_run: motion-httpd testing : IPV4 addr:
0.0.0.0 port: 8080
[0] [NTC] [STR] [Mar 15 14:57:58] httpd_run: motion-httpd Bound : IPV4 addr:
0.0.0.0 port: 8080
[0] [NTC] [STR] [Mar 15 14:57:58] httpd_run: motion-httpd/3.2.12+git20140228
running, accepting connections
[0] [NTC] [STR] [Mar 15 14:57:58] httpd_run: motion-httpd: waiting for data on
0.0.0.0 port TCP 8080
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_set_pix_format: Config palette index 17
(YU12) doesn't work.
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_set_pix_format: Supported palettes:
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_set_pix_format: (0) YUYV (YUYV 4:2:2)
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_set_pix_format: 0 - YUYV 4:2:2
(compressed : 0) (0x56595559)
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_set_pix_format: (1) MJPG (Motion-JPEG)
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_set_pix_format: 1 - Motion-JPEG
(compressed : 1) (0x47504a4d)
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_set_pix_format Selected palette YUYV
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_do_set_pix_format: Testing palette YUYV
(640x480)
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_do_set_pix_format: Using palette YUYV
(640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000008
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: found control 0x00980900,
"Brightness", range 0,255
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: "Brightness", default
-8193, current 128
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: found control 0x00980901,
"Contrast", range 0,255
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: "Contrast", default
57343, current 32
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: found control 0x00980902,
"Saturation", range 0,255
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: "Saturation", default
57343, current 32
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: found control 0x00980913,
"Gain", range 0,255
[1] [NTC] [VID] [Mar 15 14:57:58] v4l2_scan_controls: "Gain", default 57343,
current 0
[1] [NTC] [VID] [Mar 15 14:57:58] vid_v4lx_start: Using V4L2
[1] [NTC] [ALL] [Mar 15 14:57:58] image_ring_resize: Resizing pre_capture
buffer to 1 items
[1] [NTC] [STR] [Mar 15 14:57:59] http_bindsock: motion-stream testing : IPV4
addr: 0.0.0.0 port: 8081
[1] [NTC] [STR] [Mar 15 14:57:59] http_bindsock: motion-stream Bound : IPV4
addr: 0.0.0.0 port: 8081
[1] [NTC] [ALL] [Mar 15 14:57:59] motion_init: Started motion-stream server in
port 8081 auth Disabled
[1] [NTC] [EVT] [Mar 15 15:01:33] event_new_video FPS 6
------------------------------
Message: 2
Date: Thu, 16 Mar 2017 01:12:23 +0000
From: Mike Wilson <[email protected]>
Subject: Re: [Motion-user] works as demon only when started from
command line
To: Motion discussion list <[email protected]>
Message-ID:
<caaveucogdyu4sjooj7l9mzfswpqrbd3mu1jb0xcug0ymtth...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
What user are you running motion under when it is run from boot? Does that
user have permissions to write to the location to which you want your
videos written?
On Wed, Mar 15, 2017 at 7:05 PM harry sweet <[email protected]> wrote:
> I am setting up motion on a Raspberry Pi. It seems to work fine when I
> start from command line, sudo motion but does not save files when started
> with boot up from /etc/default/motion. Same exact configuration file, in
> /etc/motion.
>
> I've attached segments of the log file from when it could or could not
> save files.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 3
Date: Fri, 24 Mar 2017 14:01:30 +1300
From: Jo Pitts <[email protected]>
Subject: [Motion-user] Raspberry Pi, arecord, and Motion
To: [email protected]
Message-ID:
<cahizdd_t_ouv-cctwyabrtqc-9l225mwmyxuohqde9eljgs...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi there.
All,
firstly - I'm not sure if this is the right place for this.
secondly - I'm no linux expert (by a million miles!)
I have motion working on my raspberry pi, and have got it recording video
(yay!). I also want it to record audio.
I have the following line in my /etc/motion/motion.conf file
on_event_start sh /media/motion/onevent
the onevent script has the following in it
#!/bin/sh
now=$(date)
echo "$now - starting recording"
arecord -D plughw:1,0 -f cd /media/motion/bob.wav
now=$(date)
echo "$now - ending recording"
I know that the onevent script is getting run (I tried it with a simple
file copy command in the script that copied one text file to another in the
same /media/motion directory - which worked).
However, nothing happens with the arecord command when called from
on_event_start. However, if I run the onevent script from the shell (i.e.
sudo sh onevent), the recording does work.
I have chowned the /media/motion folder to the motion user.
I know that I need to change the arecord parameters to have a date/time
stamped file name. I'm just making this as simple as possible for now to
get things working.
Any thoughts on what I'm missing? Is there a better way to do this?
Regards
Jo
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
------------------------------
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
End of Motion-user Digest, Vol 130, Issue 11
********************************************