Я пытаюсь записать видеопоток с моей IP-камеры Tenvis с движением 3.2.12 на Debian 7.5.
Я использовал стандартный пакет Debian с
sudo apt-get install motion
Предположим, мой DNS IP-камера является веб-камерой , пользователь: admin , пароль: пароль
/etc/motion/motion.conf
Ниже приведены мои настройки файла конфигурации:
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 поднять ту же ошибку.
Любая идея ?