KKMoon P2P PTZ cam tips

cam

A new pan & tilt camera installed on the rooftop to monitor the antennas, it’s a chinese 720p “KKMoon P2P Cam”, hardware version = JH41E-V1.0, firmware version 10.8.79.8900 build 2015.06.09 02:51.
I bought it on Ebay and received a partial refund due the several bugs in the firmware which make the object to be used with caution and a number of declared functions does not work at all:

  • Sending email notification when a motion is detected does not work, at least with my SMTP servers.
  • FTP upload of the images does not work. I’ve tried with my local working server, no success.
  • There is not a plugin for Firefox or Chrome, the only browser capable to view the h264 streaming video is MS Internet Explorer with a proprietary plugin. The stream can be reproduced also by VLC but without the pan and tilt controls.
  • There is a security issue, the rtsp stream can be opened without inserting any password even if the password is correctly set.

On the other hand the Android app works quite well and the image have a good quality.
Googling around I’ve found few results about this cam, this one is the most interesting.

Summing up, to view the stream with VLC (without password) the address to open is

rtsp://IPAddress/camera-media/profile0

To catch a snapshot the http address is

http://IPAddress/snapshot/image0.jpg

Unfortunately the snapshot image has a very low resolution 320×240.
I like to save an image every some minutes to create a time-lapse video, this resolution is unacceptable, but there is a workaround to obtain snapshots with good quality. This command get some seconds of video then save an image with native resolution 1280×720

cvlc rtsp://user:pass@IPAddress/camera-media/profile0 –video-filter=scene –scene-prefix=$prefix –scene-format=jpg –scene-path=./ –scene-ratio 240 –sout-x264-lookahead=10 –sout-x264-tune=stillimage –vout=dummy –run-time 15 vlc://quit

To rotate the camera the sniffed commands are

Move to the preset x:
http://IPAddress/goform/ptz.cgi?action=15&AddrID=0&Speed=0&PresetName=x
where x = 1 to 16, preset number

Move UP:
http://IPAddress/goform/ptz.cgi?action=2&AddrID=0&Speed=0&PresetName=0
Move DOWN:
http://IPAddress/goform/ptz.cgi?action=1&AddrID=0&Speed=0&PresetName=0
Move LEFT:
http://IPAddress/goform/ptz.cgi?action=4&AddrID=0&Speed=0&PresetName=0
Move RIGHT:
http://IPAddress/goform/ptz.cgi?action=3&AddrID=0&Speed=0&PresetName=0
Stop Movement:
http://IPAddress/goform/ptz.cgi?action=0&AddrID=0&Speed=0&PresetName=0

I prepared a simple Python script to be executed in a terminal -> ptz.py
Example:

$ ptz 3 moves the cam to the preset number 3
$ ptz r 2 moves the cam to the right for 2 seconds

 

 

6 Responses to “KKMoon P2P PTZ cam tips”

  1. Great job!
    Is there any command for setting Ftp address, directory for upload..

  2. I don’t know, the FTP upload on my cam does not work at all

  3. Hi,

    thaks for tips, do you know how to enable microphone?, to hear tru VLC stream?

    thank you

    • Hi,
      no, I have not found how to enable the audio in the VLC stream. I tried to enable the audio using the smartphone then connect with VLC, it doesn’t work.

  4. Thank you! I’ve a problem in configuring the email notifications. The “test” email works but the email it’s not sent when the alarm is triggered :( Any suggestion?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: