Greetings
Thought I'd share my experience and tips for getting the VstarCam C42S working with Zoneminder - PTZ inclusive.
http://www.vstarcam.com/VStarcam-C24S-2 ... a-199.html - basic IP camera with PTZ and IR, supporting ONVIF and P2P.
Discovery
The windows ONVIF Device Manager tool was an excellent debugging aid along with Firefox network capture. The camera does have an HTTP web application interface but the HTTP port seems to float until you statically set it.
PTZ controls seem to be based around a variant of the IPCAM protocol (decoder_control.cgi). Attached is my Vstarcam_C24S.pm control file for installation in perl5/ZoneMinder/Control. I cloned this from the Foscam FI8918W module which has most of the same control commands and operation principles.
Zoneminder setup
Zoneminder's ONVIF discovery works nicely and sets up the device using FFmpeg source type. The camera also works fine using manually set remote source type and RTSP settings, you just have to get the authentication and port sytnax correct.
Sourcetype: FFMpeg
SourcePath (example): rtsp://admin:XXXXXX@192.168.XX.YY:10554/tcp/av0_1
Capture Width: 640
Capture height: 480
Higher resolutions worked ok. Using the windows tool I could set the video stream type and resolution: h264, mjpeg4 etc. h264 works fine.
Control setup
Added a new camera control (Vstarcam_C24S).
Control Type = Vstarcam_C24S
Control Device = loginuse=admin&loginpas=XXXXXX
Control Address = 192.168.XX:YY:47785 - need to discover your own port and use with the window app or the browser app to statically set the IP
Auto stop timeout = 0.10 - camera PTZ is based around start continuous movement and explicit stop. Over the internet this is too slow. The autostop give a click incremental movement.
PTZ Control Details
Name = Vstarcam_C24S
Type = Remote
Protocol = Vstarcam_C24S, i.e. the perl module file name less extension
Can Wake
Can Sleep
Can Reset
Can Move
Can Move Diagonally
Can Move Continuous
Can Pan
Can Tilt
Can White Balance (Contrast)
Can White Bal Absolute
Min White Bal Range = 1
Max White Bal Range = 238
Min White Bal Step = 1
Max White Bal Step = 10
Can Iris (Brightness)
Can Iris Absolute
Min Iris Range = 1
Max Iris Range = 238
Min Iris Step = 1
Max Iris Step = 10
Has Presets
Num Presets = 16
Has Home Presets
Can Set Presets
Vstarcam C24S
Vstarcam C24S
- Attachments
-
- Vstarcam_C24S.pm.txt
- (13.71 KiB) Downloaded 644 times
Re: Vstarcam C24S
Very nice writeup; thanks.
Re: Vstarcam C24S
Small update: After some more extensive testing and runs during the day it would seem this camera doesn't hold a very stable RTSP server. After about a day of continuous use zoneminder ends up reporting
Which requires a reboot of the camera to address. Independent connection attempts with VLC or curl show the RTSP port (both TCP and UDP URLs) not accepting connections.
Unsure yet if this is a camera stability issue or artefact of how zoneminder is connecting using RTSP, e.g. maybe overloading the RTSP server some how.
Interetingly the vstarcam eye4 app and web applications can still stream images. Guessing they're not using RTSP.
Code: Select all
09/11/17 13:21:11.219929 zmc_m4[26929].ERR-zm_rtsp.cpp/73 [Recv failed; Connection reset by peer]
09/11/17 13:21:11.222169 zmc_m4[26929].ERR-zm_rtsp.cpp/86 [Response parse failure, 0 bytes follow]
09/11/17 13:21:21.212958 zmc_m4[26928].FAT-zm_remote_camera_rtsp.cpp/162 [No RTSP sources]
Unsure yet if this is a camera stability issue or artefact of how zoneminder is connecting using RTSP, e.g. maybe overloading the RTSP server some how.
Interetingly the vstarcam eye4 app and web applications can still stream images. Guessing they're not using RTSP.
-
- Posts: 65
- Joined: Wed Nov 22, 2006 6:19 am
Re: Vstarcam C24S
Thank you very much - great write-up..
Re: Vstarcam C24S
Because of the above mentioned "Connection reset by peer" when using RTSP I've moved the configuration to the HTTP stream. This seems more stable although the resolution options are limited.
Remote Protcol: HTTP
Remote Method: Simple
Remote Host Path: videostream.cgi?user=<username>&pwd=<password>¶m=0&value=1 - unsure if the param options help or do anything,
Target colourspace:24 bit
Capture Width: 640
Capture Height: 360
Remote Protcol: HTTP
Remote Method: Simple
Remote Host Path: videostream.cgi?user=<username>&pwd=<password>¶m=0&value=1 - unsure if the param options help or do anything,
Target colourspace:24 bit
Capture Width: 640
Capture Height: 360
-
- Posts: 65
- Joined: Wed Nov 22, 2006 6:19 am
Re: Vstarcam C24S
Unfortunately I tried the above setup on a Vstarcam C29, but it does not control it..
Something must have changed in their API..
Something must have changed in their API..
Re: Vstarcam C24S
If the camera has a browser app (like firefox) I used the browser network debugging to see what URI calls and parameters it makes and copied from. That should help you find the C29 pattern.tkalfaoglu wrote: ↑Tue Nov 14, 2017 8:46 am Unfortunately I tried the above setup on a Vstarcam C29, but it does not control it..
Something must have changed in their API..
-
- Posts: 65
- Joined: Wed Nov 22, 2006 6:19 am
Re: Vstarcam C24S
Many thanks. It has that Eye4 android application. From what I can tell, it sends the command just like the /usr/share/perl5/vendor_perl/ZoneMinder/Control/Vstarcam_C24S.pm seems to do..
This is captured using wireshark using Eye4:
06590198.226603574192.168.1.60192.168.1.14HTTP270GET /decoder_control.cgi?command=93&&loginuse=admin&loginpas=xxxxxxxx HTTP/1.1
I'm not sure, but it seems Vstarcam_C24S.pm does not send commands.. I can "see" the image just fine; I just can't control the camera.
Port is correct, username and password are correct.. Baffling..
This is captured using wireshark using Eye4:
06590198.226603574192.168.1.60192.168.1.14HTTP270GET /decoder_control.cgi?command=93&&loginuse=admin&loginpas=xxxxxxxx HTTP/1.1
I'm not sure, but it seems Vstarcam_C24S.pm does not send commands.. I can "see" the image just fine; I just can't control the camera.
Port is correct, username and password are correct.. Baffling..
Re: Vstarcam C24S
Strange - guessing you've found the IPCAM spec http://www.openipcam.com/files/Manuals/ ... %202.1.pdf. I would expect the commands to be close or a flavour of.tkalfaoglu wrote: ↑Tue Nov 14, 2017 2:09 pm This is captured using wireshark using Eye4:
06590198.226603574192.168.1.60192.168.1.14HTTP270GET /decoder_control.cgi?command=93&&loginuse=admin&loginpas=xxxxxxxx HTTP/1.1
Last edited by ris2t on Wed Nov 15, 2017 8:29 am, edited 1 time in total.
-
- Posts: 65
- Joined: Wed Nov 22, 2006 6:19 am
Re: Vstarcam C24S
Thanks -- I found some info here, the CGI interface.. It's in chinese but you can copy paste to google translate
http://www.vstarcam.com/SDK-Download.html
http://www.vstarcam.com/SDK-Download.html