Motion - não consigo fazer o streaming funcionar a partir de uma webcam

0

Eu estou tentando gravar um fluxo de vídeo da minha câmera Tenvis IP com o movimento 3.2.12 no Debian 7.5.

Eu usei o pacote debian padrão com

sudo apt-get install motion

Suponha que minha câmera IP DNS é webcam , usuário: admin , senha: senha

/etc/motion/motion.conf

Abaixo estão as configurações do meu arquivo de configuração:

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

Questão nº 1

ao usar o player de vídeo do totem no endereço

http://localhost:8081

o programa começa a gravar imagens no diretório de trabalho e eu posso exibir o "filme"

[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

O player de vídeo parece carregar apenas uma imagem por vez com um atraso de 3 segundos, com a barra de progresso em andamento.

o log é

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 - não foi possível abrir o codec: Operação em andamento.

Eu tentei outro codec para ffmpeg_video_codec. Flv, swf levantam o mesmo erro.

Alguma ideia?

    
por Emmanuel 03.06.2014 / 16:55

0 respostas