Сбой движения после обнаружения движения - PullRequest
0 голосов
/ 17 октября 2019

Я хотел бы сохранить файлы, сгенерированные Motion, в каталоге

/home/pi/bin/pingLog/2019/Oct/17

Каталог создается cronjob с командой

sudo mkdir -m 777 -p "/home/pi/bin/pingLog/$( date +%Y )/$( date +%b )/$( date +%d )"

, поэтому Motion должна иметь возможностьдоступ, но если я проверю файл журнала, это то, что он написал:

[1:ml1] [ERR] [ALL] [Oct 17 02:45:56] create_path: Problem creating directory /home/pi/bin/pingLog/%Y/$( data +%b )/%d: Permission denied
[1:ml1] [ERR] [ENC] [Oct 17 02:45:56] ffmpeg_open: Could not set the stream
[1:ml1] [ERR] [EVT] [Oct 17 02:45:56] event_ffmpeg_newfile: ffopen_open error creating (new) file [/home/pi/bin/pingLog/%Y/$( data +%b )/%d///home/pi/bin/pingLog/2019/Oct/17/024555_movie.mp4]
[1:ml1] [NTC] [ALL] [Oct 17 02:45:56] motion_detected: Motion detected - starting event 1
[1:ml1] [ERR] [ALL] [Oct 17 02:45:56] jpgutl_error_exit: Unsupported marker type 0xaa
[1:ml1] [CRT] [VID] [Oct 17 02:45:56] vid_mjpegtoyuv420p: Corrupt image ... continue
[1:ml1] [NTC] [ALL] [Oct 17 02:46:19] preview_save: different filename or picture only!
[1:ml1] [ERR] [ALL] [Oct 17 02:46:19] create_path: Problem creating directory /home/pi/bin/pingLog/%Y/$( data +%b )/%d: Permission denied
[1:ml1] [ERR] [ALL] [Oct 17 02:46:19] put_picture: Can't write picture to file /home/pi/bin/pingLog/%Y/$( data +%b )/%d///home/pi/bin/pingLog/2019/Oct/17/024558_pic.jpg - check access rights to target directory
Thread is going to finish due to this fatal error: Permission denied
[1:ml1] [NTC] [ALL] [Oct 17 02:46:19] mlp_actions: End of event 1
[1:ml1] [NTC] [ALL] [Oct 17 02:46:19] motion_loop: Thread exiting
[1:ml1] [NTC] [STR] [Oct 17 02:46:19] stream_stop: Closing motion-stream listen socket & active motion-stream sockets
[1:ml1] [NTC] [STR] [Oct 17 02:46:19] stream_stop: Closed motion-stream listen socket & active motion-stream sockets
[1:ml1] [NTC] [VID] [Oct 17 02:46:19] vid_close: Cleaning up V4L2 device
[1:ml1] [NTC] [VID] [Oct 17 02:46:19] v4l2_cleanup: Closing video device /dev/video0
[0:motion] [NTC] [ALL] [Oct 17 02:46:19] main: Threads finished
[0:motion] [NTC] [ALL] [Oct 17 02:46:20] main: Motion terminating
[0:motion] [NTC] [ALL] [Oct 17 02:46:20] motion_remove_pid: Removed process id file (pid file).
[0:motion] [NTC] [ALL] [Oct 17 02:46:20] motion_remove_pid: Closing logfile (/var/log/motion/motion.log).
...