描述
我在 debian 75 (wheezy) 上运行 motion 3.2.12 标准包。检测到动作、触发事件,并将图片保存在正确的文件夹中,正如预期的那样。
另一方面,由于此错误,motion 无法使用 ffmpeg 录制电影
[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
我们可以看到无法打开 avcodec。我找到了类似的帖子这里Debian 团队没有给出令人信服的答案,因为用户已经通过原始的 Scratch/安装解决了这个问题。
但问题仍然存在
注意:我使用 ffmpeg 24/24 存档视频流并将它们转换为多种 Web 输出格式,没有任何问题。它工作正常。
我想知道由于我根据这个“错误”发现了大量帖子,此功能是否仍然可用?
有什么办法可以解决这个问题吗?
环境
我的 /etc/motion/motion.conf 文件内容是
# 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