Closed gaenserich closed 7 years ago
Can you also paste a snip of log to see few events with ext pipe?
And would it be possible also to get two test movies: good and bad?
Sure thing. Here's a "good" video using the integrated ffmpeg features:
2016-12-29_09.48.50-03.mp4.zip
And here is the "bad" video using extpipe and ffmpeg: 2016-12-29_11.37.16-40.mp4.zip
Can you also try moving the pipe options out of the main motion.conf and put them instead into the camera1.conf and remove the on_event_end
Here are the logs. For around the "good" video:
Dec 29 09:48:51 raspberrypi sudo[31689]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 29 09:48:51 raspberrypi sudo[31703]: motion : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/msmtpq -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications]
Dec 29 09:48:51 raspberrypi sudo[31703]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 29 09:48:53 raspberrypi motion[23958]: mail for [ -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications] ] : send was successful
Dec 29 09:48:53 raspberrypi sudo[31703]: pam_unix(sudo:session): session closed for user root
Dec 29 09:48:56 raspberrypi sudo[31689]: pam_unix(sudo:session): session closed for user root
Dec 29 09:49:02 raspberrypi motion[23958]: 2016-12-29_09.48.55-01-03.jpg 800x480 24bit N Exif JFIF [OK] 292141 --> 277443 bytes (5.03%), optimized.
Dec 29 09:49:02 raspberrypi sudo[31745]: motion : TTY=unknown ; PWD=/tmp/motion/camera1/03 ; USER=root ; COMMAND=/usr/bin/msmtpq -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications]
Dec 29 09:49:02 raspberrypi sudo[31745]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 29 09:49:05 raspberrypi motion[23958]: mail for [ -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications] ] : send was successful
Dec 29 09:49:05 raspberrypi sudo[31745]: pam_unix(sudo:session): session closed for user root
Dec 29 10:19:19 raspberrypi motion[23958]: [1:nc1:camera1] [ALR] [NET] netcam_handler_loop: netcam camera handler: finish set, exiting
And the "bad" video:
Dec 29 11:36:01 raspberrypi motion[32693]: mail for [ -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications] ] : send was successful
Dec 29 11:37:16 raspberrypi motion[32693]: [1:ml1:camera1] [ERR] [EVT] event_extpipe_put: Error writing in pipe , state error 1: Interrupted system call
Dec 29 11:37:16 raspberrypi sudo[6472]:
Dec 29 11:37:16 raspberrypi sudo[6472]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 29 11:37:17 raspberrypi sudo[6476]: motion : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/msmtpq -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications]
Dec 29 11:37:17 raspberrypi sudo[6476]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 29 11:37:19 raspberrypi motion[32693]: mail for [ -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications] ] : send was successful
Dec 29 11:37:19 raspberrypi sudo[6476]: pam_unix(sudo:session): session closed for user root
Dec 29 11:37:32 raspberrypi motion[32693]: 2016-12-29_11.37.17-00-40.jpg 800x480 24bit N Exif JFIF [OK] 325737 --> 307412 bytes (5.63%), optimized.
Dec 29 11:37:32 raspberrypi sudo[6550]: motion : TTY=unknown ; PWD=/tmp/motion/camera1/40 ; USER=root ; COMMAND=/usr/bin/msmtpq -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications]
Dec 29 11:37:32 raspberrypi sudo[6550]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 29 11:37:35 raspberrypi motion[32693]: mail for [ -C /etc/msmtprc -- [email-address-where-i-get-motion-notifications] ] : send was successful
Dec 29 11:37:35 raspberrypi sudo[6550]: pam_unix(sudo:session): session closed for user root
Interesting. Since pushing the extpipe command out to camera1.conf, no odd videos have been produced yet. I'll check back in if a bad one ever does.
The odd output is back even with the extpipe parameters in camera1.conf. As above, the bad video coincides with this log message:
[ERR] [EVT] event_extpipe_put: Error writing in pipe , state error 1: Interrupted system call
Is the activity that occurs with the on_event_end doing something with the file? Moving it/deleting it / claiming ownership to it etc?
Yes, moving it from tmpfs to disk. Do events perhaps behave obstensively differently with extpipe options vs ffmpeg or jpeg built-ins, e.g. they issue the end script without having necessarily finished writing?
Am 29.12.2016 22:06 schrieb "Mr-Dave" notifications@github.com:
Is the activity that occurs with the on_event_end doing something with the file? Moving it/deleting it / claiming ownership to it etc?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Motion-Project/motion/issues/277#issuecomment-269726482, or mute the thread https://github.com/notifications/unsubscribe-auth/ACHnoygnmOGcTWb2ObaytRYUFt2kXDEUks5rNHUqgaJpZM4LUjca .
The process is the same for extpipe as the internal encoder. Since something seems to be triggering the system interrupt, it may be worth looking into the script. You can also try using the on_movie_end with the %f parameter to make sure you are only working with the newly created file rather than a subsequent one that is in the process of being created.
@gaenserich can you check if the issue is related to scripts?
@gaenserich do you have an update for this issue?
I get some rather odd results when producing video from a webcam via extpipe. Compare the "best" jpg snapshot:
with the screenshot of the video (video.jpg):
(The video has a yellow overlay over the top half, and the corners of the image don't match that of the original frame.)
This happens most of the time, except occassionally in very high light times of day. I have tried fiddling a little bit with the pixel format setting in ffmpeg (changing "-pix_fmt yuv420p" to "-pix_fmt yuvj420p"), but the problem remains.
This issue does not appear when using the integrated ffmpeg encoding options.
I'm running Arch Linux Arm on a Raspberry Pi2 uname -a:
Linux myhostname 4.4.38-1-ARCH #1 SMP Thu Dec 15 18:42:01 MST 2016 armv7l GNU/Linux
ffmpeg -version:
motion: Version 4.0.1
/etc/motion/motion.conf:
with one single camera in /etc/motion/conf.d/camera1.conf
Also $ ffprobe http://[lan.ip.of.camera]/video