IP Cameras: Difference between revisions
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
The following will save camera output to a file. | 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 ! | 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 ! matroskamux ! filesink location=cam.mkv | ||
The result isn't seekable but the following makes it so: | The result isn't seekable but the following makes it so: | ||
mkvmerge -o cam-seekable.mkv cam.mkv | mkvmerge -o cam-seekable.mkv cam.mkv |
Revision as of 15:05, 29 October 2014
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.
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.
Moar data
Chipset is Hi3518 (datasheet). It has an ARM926EJ-S and ~40Mb RAM.
Contents of the included CD (160Mb).
Someone else playing with such a camera. Includes SDK, local mirror (600Mb).
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 ! matroskamux ! 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 access to sane userland.
- Get DHCP client installed.
- Get NTP client installed.
- (Optional) Make a real rootfs with OE or embdebian or similar, 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