IP Cameras

From Leeds Hackspace Wiki
Revision as of 12:26, 29 October 2014 by HEx (talk | contribs) (Created page with "Fligg(?) acquired a cheap Chinese IP camera for testing. If we can get it to behave, the plan is to acquire more and deploy them around the space. Chipset is Hi3518 ([http://...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Fligg(?) acquired a cheap Chinese IP camera for testing. If we can get it to behave, the plan is to acquire more and deploy them around the space.

Chipset is Hi3518 (datasheet). It has an ARM926EJ-S and 40Mb RAM. IP address is hard-coded at 192.168.1.10. telnetd is running on port 23, root password is "xmhdipc".

Language is hard-coded as Chinese. Only a single byte to change, but awkward as it's on a cramfs filesystem on a native MTD device with presumably very limited write cycles. Big 5Mb binary /usr/bin/Sofia does everything: streams rtsp, runs web server. Tries to connect to secu100.net for evil.

Output

The following will save camera output to a file.

  gst-launch-1.0 rtspsrc location='rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp?real_stream--rtp-caching=100' ! queue ! rtph264depay ! h264parse ! mkvmux ! filesink location=cam.mkv

The result isn't seekable but the following makes it so:

  mkvmerge -o cam-seekable.mkv cam.mkv

I've heard reports that UDP streaming is less reliable than TCP. More testing needed.

Streams:

  • 0.sdp is 1280x720, 11fps, H.264, ~1Mbit/sec
  • 1.sdp is 352x288, 12.5fps, H.264

(However the sensor claims 25fps.)

Things to do

On the camera:

  • Get nfs mounting to work.
  • Get DHCP client installed.
  • Get NTP client installed.
  • (Optional) Make a sane rootfs, boot it over NFS.

Elsewhere:

  • Logging infrastructure. Storing the output of one camera stream should take about 15GB/day.
  • JPEG output for web page display
  • (Optional) Transcoding of the stream for viewing in web browsers that lack H.264 support