You are not logged in.

#1 2013-03-21 20:07:03

mittfh
Member
From: Kenilworth, UK
Registered: 2012-11-09
Posts: 3

Motion won't record timelapse

The webcam software "motion" can record timelapse videos using ffmpeg and the mpeg1 codec.

Except on my system, it doesn't - the relevant lines from stdout are:

[1] Error opening file /home/ben/Videos/Webcam/time0-20130321.mpg: Invalid argument
[1] ffopen_open error creating (timelapse) file [/home/ben/Videos/Webcam/time0-20130321.mpg]: Invalid argument
[1] Thread exiting
[1] Calling vid_close() from motion_cleanup
[1] Closing video device /dev/video0

(After which it goes into a loop of starting up, not being able to create the timelapse file, then killing the thread and restarting)

After finding out that motion detection videos couldn't record to mpeg1 but could record to mpeg4, I wondered if the blame lay with ffmpeg, so asked it which MPEG encoders were enabled...

[ben@BlackBox .motion]$ ffmpeg -codecs | grep MPEG | grep encoders
ffmpeg version 1.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 26 2013 17:51:35 with gcc 4.7.2 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --enable-avresample --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-postproc --enable-runtime-cpudetect --enable-shared --enable-version3 --enable-x11grab
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau ) (encoders: libx264 libx264rgb )
 DEV.L. mpeg4                MPEG-4 part 2 (decoders: mpeg4 mpeg4_vdpau ) (encoders: mpeg4 libxvid )
 DEV.L. msmpeg4v3            MPEG-4 part 2 Microsoft variant version 3 (decoders: msmpeg4 ) (encoders: msmpeg4 )
 DEA.L. mp3                  MP3 (MPEG audio layer 3) (decoders: mp3 mp3float ) (encoders: libmp3lame )

For the record, I'm using the latest versions of Community / motion (3.2.12-8) and extra / ffmpeg (1:1.1.3-1) - would I be right in thinking that mpeg1 encoding support hasn't been built in?
If so, would one of the aur versions compile it in?
I'd rather not use a complicated workaround like outputting image files every 10 seconds, compile them on-the-fly into a video, then periodically automatically delete the images used to date (to avoid manually deleting the several hundred 640x480 jpegs I don't need) if I don't have to!

In case it's useful, here's uname -a

Linux BlackBox 3.8.3-2-ARCH #1 SMP PREEMPT Sun Mar 17 13:04:22 CET 2013 x86_64 GNU/Linux

Offline

Board footer

Powered by FluxBB