0
Description
I'm running the motion 3.2.12 standard package on debian 75 (wheezy). Motions are detected, events triggered and pictures save in the correct folder as awaited.
On the other side, motion can't record movies with ffmpeg due to this error
[0] Processing thread 0 - config file /etc/motion/motion-1.0.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
[0] Thread 1 is from /etc/motion/motion-1.0.conf
[1] Thread 1 started
[0] motion-httpd/3.2.12 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8092
[1] Resizing pre_capture buffer to 3 items
[1] avcodec_open - could not open codec: Operation now in progress
[1] ffopen_open error creating (new) file [/media/videos/log/events/movies/01-20140610184428.avi]: Operation now in progress
[1] File of type 1 saved to: /media/videos/log/events/2014-06-10/18/44-27_02.jpg
[1] File of type 1 saved to: /media/videos/log/events/2014-06-10/18/44-28_00.jpg
[1] Thread exiting
[1] Calling vid_close() from motion_cleanup
[1] vid_close: calling netcam_cleanup
[1] netcam camera handler: finish set, exiting
[0] Motion thread 1 restart
[1] Thread 1 started
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8092
[1] Resizing pre_capture buffer to 3 items
we can see that avcodec could not be opened. I've found a similar post here with no convincing answer from the debian team as the problem was solved by by the user with a raw scratch / install.
But the problem is still here
Note : I use ffmpeg 24/24 to archive video streams and convert them in multiple web output formats without any problem. It works fine.
I'm wondering if this feature is still available in motion due to the numerous posts I've found according this "bug ?"
Any idea to solve that ?
Environment
my /etc/motion/motion.conf file content is
# Locations
#-----------
process_id_file /var/run/pid
target_dir /media/videos/log/events
movie_filename movies/%v-%Y%m%d%H%M%S
jpeg_filename %Y-%m-%d/%H/%M-%S_%q
# IP camera settings
#-------------------
netcam_url http://webcam/snapshot.cgi
netcam_tolerant_check on
netcam_userpass account:password
output_all off
# Detection settings
#-------------------
area_detect 789 # image detection areas
threshold 11000 # 1 - 2147483647 (1500)
minimum_motion_frames 3 # 1-1000 (1)
gap 30
# Output settings
#----------------
text_right "FRONT CAMERA %Y/%m/%d - %T"
text_double on
quality 90 # 1-100 (75)
framerate 3 # 2-100 (100) maximum frame rate to be captured when motion is detected
locate on # surrounds the moving object on the output picture
# Movie
#------
ffmpeg_cap_new on
ffmpeg_cap_motion off
ffmpeg_video_codec mpeg4
output_motion off
# Webcam server
# -------------
webcam_localhost off
webcam_port 8092
webcam_limit 5
webcam_quality 100 # 1-100 (50) # publish with max quality
webcam_maxrate 100 # 1-100 (1)
# Remote command server : interacts with Http API's
#----------------------
control_port 8080
control_localhost off
control_authentication jeby6372:alpha1237
Are you using a recent FFmpeg? With a quick, lazy look it appears that motion has not caught up with recent FFmpeg API changes. For example, Arch Linux has "ffmpeg-compat" package as a dependency which is from FFmpeg 0.10 branch instead of using the recent version in their repo. – llogan – 2014-06-10T17:44:57.307
I run the last 2.2 ffmpeg version compiled from sources – Emmanuel – 2014-06-10T22:57:55.457