From Android smartphones, tablets, to wearable Android Ware, eyewear, watches, to Android cars, smart homes, TVs, and even recent news, several of Japan's robots are Android, and then look back on the surveillance industry, the mobile devices in traditional surveillance, For example, man-made devices, handheld devices, car terminal equipment, including smart devices used in home monitoring, can be replaced with Android, not only easy to develop, but also easy to expand, the device is more intelligent. ...
After the Google I/O conference, it's easy to see that Android, with Google's push and its openness, has been rapidly growing into every aspect of life, from Android smartphones and tablets, to wearable Android Ware, eyewear, watches, to Android cars, smart homes, TVs , even recent news, some of the Japanese robots are Android systems, and then put their eyes back to the monitoring industry, traditional monitoring of mobile devices, such as: Man-made equipment, handheld devices, car terminal devices, including home monitoring used in the smart devices, can be replaced by the Android system, Not only is the development easy, but also easy to expand, the equipment is more intelligent.
Figure-Android application in handheld devices
Step by step, we first realize the real-time monitoring function of audio and video capture and uploading of Android phone. Google Code has an open source project: Spydroid-ipcamera,spydroid can build a streamlined HTTP server and RTSP server on Android phones, similar to the general Ipcamera, Both can access the camera through the Web page and modify the monitoring configuration, but also through the HTTP or RTSP protocol to obtain real-time monitoring audio and video, and from its code structure, it can be seen that spydroid has achieved rtspserver, Rtspclient, RTP, RTCP, H264, AAC ... And so on, in short, we need the utility have already had, as long as the combination of these functions to a piece will be able to achieve our demand for live broadcast.
Figure-Android implements the Ipcamera function
In the previous article, "Distributed streaming media server system based on Darwin", we used Windows camera and microphone to collect audio and video data separately, encode it into H264 and AAC, and then use RTP package to push to Darwin streaming media server for live broadcast. Similarly, we refer to the Easyipcamera design method, the app launches, connect and live to the central Management Server, receive control commands from the CMS. Capture Android camera video and Mic Sound, H264 and AAC encoding (here we only refer to spydroid for hard coding, soft coding will be updated in the future, but after trying, most of the current Android audio and video capture support hard coding), and then through RTSP and RTP, The real-time audio and video data is pushed to the streaming media server and forwarded and distributed by the streaming media server for live broadcast.
Figure-Android implements the Ipcamera function
Here is mainly the RTSP/RTP push process, this in the previous article, "based on the first listen after the DSS streaming media forwarding," described in detail this process, the specific push code can also refer to the live555 Darwininjector class implementation, We can directly modify the spydroid in the rtspclient to achieve the ANNOUNCE/SETUP/PLAY/RTP process, the specific process source code and protocol process can also refer to the "Live with Darwin and live555 framework" described in.
Android Capture Download: Http://pan.baidu.com/s/1kTwrasB
EASYDSS (Win) server download: http://pan.baidu.com/s/1ntoFSSh
EASYDSS (Linux) server download: Http://pan.baidu.com/s/1c0b6bUo
Using the method and the article "Distributed streaming media server system based on Darwin, the Easyipcamera method is consistent, only need to configure the EASYDSS server CMS address and port number, you can access to EASYDSS, All subsequent processes are similar to Easyipcamera, only when a client requests real-time video to push the audio-video stream, other cases only live with the CMS connection, and the streaming media is idle.
Figure-Android capture Terminal Configuration Interface
Real-time effect: After testing it, the delay and the network and mobile phone correlation is very large, different network conditions, different mobile phone hardware, may be compared with the delay effect is not the same, with Samsung Glaxy3 mobile phone, in the network situation is better, real-time audio and video delay about 1.3s (public network transmission) around:
Figure-Continuous Test 2 ' 52 ', delay 1.35s
Figure-Continuous Test 9 ' 17 ", Delay 1.58s
The future will continue to expand and optimize the Android real-time audio and video capture program, including video, capture, soft coding, intercom, jitter control, video upload and so on, welcome to share and progress!
Mobile phone Android audio and video capture and live push to realize the application of individual and mobile monitoring