Motion fails to record time lapse video

Bug #1314053 reported by SirPecanGum
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
motion (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu 14.04
Motion 3.2.12

Invoking timelapse in home/motion.conf causes the following cyclic error. Motion detection continues to work as expected - it is just the time-lapse function causing the error. Worked as expected until 2 days ago. Lots of similar errors can be found via searching but no solution:

[1] Error opening file /home/magnus/Motion/Camera0//20140428-timelapse.mpg: Invalid argument

[1] ffopen_open error creating (timelapse) file [/home/magnus/Motion/Camera0//20140428-timelapse.mpg]: Invalid argument

In full:

[0] Processing thread 0 - config file /home/magnus/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3547904 LIBAVFORMAT_BUILD 3544067
[0] Thread 1 is from /home/magnus/motion.conf
[1] Thread 1 started
[1] cap.driver: "uvcvideo"
[1] cap.card: "HP Webcam"
[1] cap.bus_info: "usb-0000:00:1d.7-5"
[1] cap.capabilities=0x84000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Test palette YUYV (320x240)
[1] Using palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000008
[1] found control 0x00980900, "Brightness", range -128,127
[1] "Brightness", default 0, current 0
[1] found control 0x00980901, "Contrast", range 0,100
[1] "Contrast", default 0, current 0
[1] found control 0x00980902, "Saturation", range 0,100
[1] "Saturation", default 0, current 0
[1] found control 0x00980903, "Hue", range -30,30
[1] "Hue", default 0, current 0
[1] found control 0x00980910, "Gamma", range 1,500
[1] "Gamma", default 1, current 1
[1] mmap information:
[1] frames=4
[1] 0 length=153600
[1] 1 length=153600
[1] 2 length=153600
[1] 3 length=153600
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[1] Error opening file /home/magnus/Motion/Camera0//20140429-timelapse.mpg: Invalid argument
[1] ffopen_open error creating (timelapse) file [/home/magnus/Motion/Camera0//20140429-timelapse.mpg]: Invalid argument
[1] Thread exiting
[1] Calling vid_close() from motion_cleanup
[1] Closing video device /dev/video0
[0] Motion thread 1 restart
etc...

Revision history for this message
SirPecanGum (sirpecangum) wrote :

Possibly some similarities with this bug #281436.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in motion (Ubuntu):
status: New → Confirmed
Revision history for this message
Akom (akomakom) wrote :

Same here (also Ubuntu 14.04, motion 3.2.12-4) with the addition of "Cannot allocate memory" and then a segfault (motion does not work unless timelapse is disabled). Tried libavcodec54-extra with no change.

Apr 7 10:15:30 srv motion: [2] Error opening file /data/MOTION/2015-04-07/timelapse-C2.mpg: Cannot allocate memory
Apr 7 10:15:30 srv motion: [2] ffopen_open error creating (timelapse) file [/data/MOTION/2015-04-07/timelapse-C2.mpg]: Cannot allocate memory
Apr 7 10:15:30 srv motion: [4] Error opening file /data/MOTION/2015-04-07/timelapse-C4.mpg: Cannot allocate memory
Apr 7 10:15:30 srv motion: [4] ffopen_open error creating (timelapse) file [/data/MOTION/2015-04-07/timelapse-C4.mpg]: Cannot allocate memory
Apr 7 10:15:30 srv motion: [1] Error opening file /data/MOTION/2015-04-07/timelapse-C1.mpg: Cannot allocate memory
Apr 7 10:15:30 srv motion: [1] ffopen_open error creating (timelapse) file [/data/MOTION/2015-04-07/timelapse-C1.mpg]: Cannot allocate memory
Apr 7 10:15:30 srv motion: [3] Error opening file /data/MOTION/2015-04-07/timelapse-C3.mpg: Invalid argument
Apr 7 10:15:30 srv motion: [3] ffopen_open error creating (timelapse) file [/data/MOTION/2015-04-07/timelapse-C3.mpg]: Invalid argument

Revision history for this message
Akom (akomakom) wrote :

Also, I believe that motion crashes if timelapse is on globally:

Apr 7 10:15:31 srv kernel: [2256000.953935] motion[20444]: segfault at b1abc038 ip 0804bc88 sp b47fe120 error 4 in motion[8048000+34000]

If it is enabled for one thread, then that thread keeps respawning every few seconds.

Revision history for this message
Peter Grandi (pg-8) wrote :

This page:

https://forums.gentoo.org/viewtopic-t-963876.html?sid=49af6a7ab765b3c4c4a9652504a8794d

seems to have a complete discussion of this issue with the solution.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.