Introduction
The network camera Gadspot NC800 has a weird firmware that don't allow motion to work properly with its mjpg stream. To allow motion to work with this camera is needed a tool to fix the stream , relay-nc800 does.
Detailed Description
Gadspot NC8000 <---------
relay-nc800 <-----------
motion
Here is a diagram that explains how relay-nc800 works with motion.
(1) relay-nc800 connects to network camera to get the
broken mjpg stream.
(2) Fix the stream adding the correct headers.
(3) motion connect to a good mjpg stream.
Attached Files
The relay tarball
relay-nc800.tar.gz.
Installation
Download the
relay
Decompress and compile
tar xfvz relay-nc800.tar.gz make
then just run the relay
./relay-nc800 -url=http://192.168.1.2:8080/cgi-bin/Stream?Video -port=15000
Users Guide
relay-nc800 [0.6]
Usage: ./relay-nc800 -url=http://192.168.1.2:8080/cgi-bin/Stream?Video -port=15000 [-auth=user:pass] [-debug]
-url : Url of mjpg stream -port : port to bind relay-nc800 -auth : user and pass if needed -debug : verbose logs
Run relay-nc800 pointing to your camera and then run motion adding in
motion.conf
the right value for
netcam_url
parameter.
I.ex :
./relay-nc800 -url=http://192.168.1.2:8080/cgi-bin/Stream?Video -port=12000
so
netcam_url
is
netcam_url http://127.0.0.1:12000/
Tested with FW NC800-GS-L100-3.1f, stream wery fast and good quality the instalation are NC800 - Relay (Via Epia ML8000) - motion (Dual Xeon 2.8Ghz) Thanks Angel Carpintero for excelent relay
Javi Pardo "Dakota"
dakota@dakotabcn.net
--
JaviPardo - 09 Jan 2006
I use this relay with a aviosys 9060-I but I had to make these chances:
const char *get = "GET /cgi-bin/Stream?Video Authorization: Basic
YWRtaW46MTIzNDU2Nzg=?webcamPWD=\r\n\r\n";
// "POST /AVIOSYS\r\n" // "Content-Length: 32\r\n" // "Authorization: Basic
YWRtaW46MTIzNDU2Nzg=\r\n\r\n" // "IMG_S_M=03200240&server=+Submit+\r\n";
// changed >= to <= if (retread <= 0) { printf("[%d] read_stream ,%s [%d]\n",retry,strerror(errno),errno);
I guess the recv call is a bug, which should also be fixed in the original version ... right ?
--
JudasHui - 19 Dec 2008
Judas , thanks for that fix already included in 0.7
This application is just a hack to allow Gadspot so was not expected to be used with others ... but i think could be easy to allow set method GET or POST .
--
AngelCarpintero - 22 Dec 2008