Motion - 无法通过网络摄像头进行流式传输


0

我正试图在Debian 7.5上用我的Tenvis IP摄像机录制动态3.2.12的视频流。

我使用标准的debian包

sudo apt-get install motion

假设我的DNS IP cam是网络摄像头,用户:admin,密码:password

/etc/motion/motion.conf

Bellow是我的配置文件设置:

netcam_url http://webcam/videostream.cgi

netcam_userpass admin:password
target_dir /tmpµ/motion

# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081

ffmpeg_cap_new on
ffmpeg_video_codec mpeg4

output_motion on
snapshot_interval 0

# Quality of the jpeg (in percent) images produced (default: 50)
webcam_quality 50

# Output frames at 1 fps when no motion is detected and increase to the
# rate given by webcam_maxrate when motion is detected (default: off)
webcam_motion off

# Maximum framerate for webcam streams (default: 1)
webcam_maxrate 15

# Restrict webcam connections to localhost only (default: on)
webcam_localhost on

# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual webcam rate by desired number of seconds
# Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate
webcam_limit 0

control_port 8080
control_authentication admin:password

问题#1

在地址使用图腾视频播放器时

http://localhost:8081

程序开始在工作目录中写入图像,我可以显示“电影”

[1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-00.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-01.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-02.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-03.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-04.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-05.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-06.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171036-00.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171036-01.jpg
[1] File of type 1 saved to: ~/tmp/motion/01-20140603171036-02.jpg

视频播放器似乎一次只加载一个图像,延迟时间为3秒,进度条运行。

日志是

root@mercure:/etc/motion# motion -c motion-1.0.conf
[0] Processing thread 0 - config file motion-1.0.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
[0] Thread 1 is from motion-1.0.conf
[0] motion-httpd/3.2.12 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Thread 1 started
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
[1] avcodec_open - could not open codec: Operation now in progress
[1] ffopen_open error creating (new) file [/tmp/motion/01-20140603174307.avi]: Operation now in progress
[1] File of type 4 saved to: /tmp/motion/01-20140603174307-07m.jpg
[1] File of type 1 saved to: /tmp/motion/01-20140603174307-07.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 8081

avcodec_open - 无法打开编解码器:操作正在进行中。

我为ffmpeg_video_codec尝试了其他编解码器。Flv,swf引发同样的错误。

任何的想法 ?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.