Monitor stream of a webcam

Forum for questions and support relating to the 1.28.x releases only.
Locked
appost
Posts: 4
Joined: Tue Nov 18, 2014 3:44 pm

Monitor stream of a webcam

Post by appost »

Hi all, I installed Zoneminder 1.28 on Ubuntu server, it works good with IP cameras and it is a very good software.
Instead I have problems to add a stream of a laptop's webcam. I don't find what is wrong:
I send the stream with vlc:

Code: Select all

Port 8080
Path /
Activate trasconding disabled
encapsulation: mjpeg
only video enabled
result: :sout=#http{mux=mpjpeg,dst=:8080/} :sout-keep
on ZoneMinder console:

Code: Select all

Source Type: Remote
Function: Monitor
Remote Protocol: HTTP
Remote Host Name: 192.168.122.1 (the Ubuntu server is a virtual machine of the host which is Debian, the host is the laptop with the webcam)
Remote Host Port 8080
Remote Host Path /
I obtain only a blue screen with timestamp

Any idea?
appost
Posts: 4
Joined: Tue Nov 18, 2014 3:44 pm

Re: Monitor stream of a webcam

Post by appost »

sorry about the problem isn't zoneminder but vlc.
Anyway I will post the solution if I solve it
bbunge
Posts: 2967
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Monitor stream of a webcam

Post by bbunge »

There are some "extra" packages you need to install to use libvlc. See the easy how to in the WIKI for Ubuntu. Some of us have also had issues with libvlc locking up or delaying images.

bb
appost
Posts: 4
Joined: Tue Nov 18, 2014 3:44 pm

Re: Monitor stream of a webcam

Post by appost »

Thank you bbunge,
the problem is on the host (Debian testing), to be sure I installed anyway the packages libvlc-dev libvlccore-dev as in the wiki, but the problem remains the same.
EDIT:
The correct command is:

Code: Select all

 cvlc -vvv v4l2:///dev/video0 --sout '#http{mux=avi,dst=:8080/}'
but I still get the blue screen with timestamp
appost
Posts: 4
Joined: Tue Nov 18, 2014 3:44 pm

Re: Monitor stream of a webcam

Post by appost »

ok, I generated the stream with vlc with these options:

Code: Select all

:sout=#transcode{vcodec=MJPG,vb=800,fps=1,scale=Auto,acodec=none}:http{mux=mpjpeg,dst=:8080/} :sout-keep
and I get the blue screen with this informantion in the log:

Code: Select all

11/21/14 09:52:30.811044 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/119 [Connected to host, socket = 5]
11/21/14 09:52:30.811176 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/141 [Request sent]
11/21/14 09:52:30.832061 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/187 [Expecting 173 bytes]
11/21/14 09:52:30.832104 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/212 [Read 173 bytes]
11/21/14 09:52:30.832115 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/656 [HTTP/1.0 200 OK
Content-type: application/octet-stream
Cache-Control: no-cache


--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

]
11/21/14 09:52:30.832124 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/665 [Got http header 'HTTP/1.0 200 OK
Content-type: application/octet-stream
Cache-Control: no-cache


--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

']
11/21/14 09:52:30.832133 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/656 [Content-type: application/octet-stream
Cache-Control: no-cache


--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

]
11/21/14 09:52:30.832142 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/680 [Got content type header 'Content-type: application/octet-stream
Cache-Control: no-cache


--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

']
11/21/14 09:52:30.832150 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/656 [Cache-Control: no-cache


--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

]
11/21/14 09:52:30.832157 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/684 [Got ignored header 'Cache-Control: no-cache


--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

']
11/21/14 09:52:30.832165 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/656 [--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

]
11/21/14 09:52:30.832172 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/684 [Got ignored header '--7b3cc56e5f51db803f790dad720ed50a
Content-Type: image/jpeg
Content-Length: 31349

']
11/21/14 09:52:30.832180 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/656 [Content-Type: image/jpeg
Content-Length: 31349

]
11/21/14 09:52:30.832187 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/684 [Got ignored header 'Content-Type: image/jpeg
Content-Length: 31349

']
11/21/14 09:52:30.832194 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/656 [Content-Length: 31349

]
11/21/14 09:52:30.832235 zmc_m1[3659].DB6-zm_remote_camera_http.cpp/675 [Got content length header 'Content-Length: 31349

']
11/21/14 09:52:30.832247 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/729 [Got status '200' (OK), http version 1.0]
11/21/14 09:52:30.832255 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/742 [Got content length '31349']
11/21/14 09:52:30.832263 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/770 [Got content type 'application/octet-stream']
11/21/14 09:52:30.832272 zmc_m1[3659].ERR-zm_remote_camera_http.cpp/812 [Unrecognised content type 'application/octet-stream']
11/21/14 09:52:30.874602 zmc_m1[3659].ERR-zm_remote_camera_http.cpp/1110 [Unable to get response]
11/21/14 09:52:30.908271 zmc_m1[3659].DB3-zm_remote_camera_http.cpp/127 [Disconnected from host]

Locked