Page 1 of 1

ECOR264-4D2 jpg blue screen

Posted: Fri Dec 02, 2016 4:54 pm
by cyberfitz
ok - so new to zoneminder will try to provide the details ...

1 - i installed v1.30 based on the fedora instructions listed here https://wiki.zoneminder.com/Fedora
2 - I have 4 Dlink ip cameras which are working fine - i can get picture and everythings seems to be ok
3 - I have an installed (old?) Everfocus ECOR264-4D2 video system which seems to work using a url like this :
http://192.168.254.200:10002/m/camera1.jpg

i have tested this on ispy and it is able to connect and works fine in that app by using the http://admin:password@192.168.254.200:1 ... amera1.jpg

syntax which i have also tested on zoneminder

4 - in zoneminder i get a blue screen - i have added the picture size of 352x240 which i have verified from both the server and the image on the url

5 - i have configured the comera as remote, protocol http,
Remote Protocol = HTTP
Remote Method = Simple
Remote Host Name admin:passwd@192.168.254.200
Remote Host Port 10002
Remote Host Path /m/camera1.jpg
Target colorspace 24 bit colour
Capture Width (pixels) 352
Capture Height (pixels) 240
Preserve Aspect Ratio unchecked
Orientation Normal
Deinterlacing Disabled

5 - log file looks like this :

12/02/16 10:52:50.328081 zmc_m1[24091].DB2-zm_remote_camera_http.cpp/138 [Sending request: GET /m/camera1.jpg HTTP/1.0
User-Agent: ZoneMinder/1.30.0
Host: 192.168.254.200
Connection: Keep-Alive
Authorization: Digest username="admin", realm="ECOR264-4D2", nonce="1480590431", uri="/m/camera1.jpg", qop=auth, nc=00000001, cnonce="0a4f113b", response="344cb4c44c09eaa1f6d8d8cec4efa327", algorithm="MD5"

]
12/02/16 10:52:50.328529 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/147 [Request sent]
12/02/16 10:52:50.333151 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/207 [Just getting 14627]
12/02/16 10:52:50.333677 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/210 [Expecting 14627 bytes]
12/02/16 10:52:50.333789 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/232 [Read 14627 bytes]
12/02/16 10:52:50.333892 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/773 [Got status '200' (OK), http version 1.0]
12/02/16 10:52:50.333988 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/780 [Got connection 'close']
12/02/16 10:52:50.334082 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/814 [Got content type 'image/jpeg']
12/02/16 10:52:50.334269 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/207 [Just getting 375]
12/02/16 10:52:50.334370 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/210 [Expecting 375 bytes]
12/02/16 10:52:50.334474 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/232 [Read 375 bytes]
12/02/16 10:52:50.364696 zmc_m1[24091].DB3-zm_remote_camera_http.cpp/197 [Socket closed remotely]
12/02/16 10:52:50.364934 zmc_m1[24091].ERR-zm_remote_camera_http.cpp/1040 [Unable to read content]
12/02/16 10:52:50.376881 zmc_m1[24091].ERR-zm_remote_camera_http.cpp/1141 [Unable to get response, disconnecting]


When i look at the size of a jpg its like 12KB or so. Any idea what i might be doing wrong?

Re: ECOR264-4D2 jpg blue screen

Posted: Mon Dec 05, 2016 6:01 pm
by cyberfitz
well i can get it to work if i change it to be a file instead of remote and run this script in the background :

while true
do wget -q http://admin:password@192.168.254.200:1 ... amera1.jpg
mv camera1.jpg.1 camera1.jpg
sleep .1
done


just seems like a hack (cuz it is)

Re: ECOR264-4D2 jpg blue screen

Posted: Fri Dec 09, 2016 6:03 pm
by cyberfitz
well - still not sure why zoneminder cant work here - tried curl, ffmpeg, .... all of them. Have settled on this solution which is working very well. Posting here in case someone else finds it useful:

#!/bin/bash
mkdir -p /tmp/zmpics
touch /tmp/zmpics/pid_${1}
PID=$(cat /tmp/zmpics/pid_${1})
if [ x$PID != x ]
then kill -9 $PID
fi
echo $$ > /tmp/zmpics/pid_${1}
if [ ! -p /tmp/zmpics/cam_${1}.jpg ]
then mkfifo /tmp/zmpics/cam_${1}.jpg
fi
while true
do curl -s --digest -m 1 -u admin:paswd http://ipaddress:port/m/camera${1}.jpg >/tmp/zmpics/cam_${1}.jpg
done

==================================================================================================================

just change the passwd, ipaddress and port

i have 2 camers on this device so i have these 2 crontab entries :

0 * * * * /root/ezcorcams 1
0 * * * * /root/ezcorcams 2


In the camera definition i set the source type to "file", the source path to the named pipe and the Maximum FPS to 10 . The name pipe helps control the rate of pull.

Works like a charm. Still feels like a hack - but its good enough.

Re: ECOR264-4D2 jpg blue screen

Posted: Sun Feb 12, 2017 9:04 pm
by marceloudi
Your script seems to be useful. But it does not work. Ubuntu 16.04.

Executing manually at shell it fails silently.

Re: ECOR264-4D2 jpg blue screen

Posted: Sun Feb 12, 2017 10:30 pm
by iconnor
Hey, I'm happy to work with you to get this working. Our http_remote_camera code is somewhat sketchy.

So it looks like the camera sent the image... and said I'm closing... but for some reason we wanted another 375 bytes....

Re: ECOR264-4D2 jpg blue screen

Posted: Mon Feb 13, 2017 12:31 pm
by bukowski
Same problem: viewtopic.php?t=25229