Mobile phone Android audio and video capture and live push to realize the application of individual and mobile monitoring

Source: Internet
Author: User

At 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 home, TV, and even recent news, some Japanese robots are Android systems, and then put their eyes back to the monitoring industry, traditional monitoring of mobile terminal equipment, such as: Man-made equipment, handheld devices, vehicle terminal devices, including home monitoring used in the smart devices, Can be replaced with the Android system, not only easy to develop, but also easy to expand, the device 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, function similar to the general Ipcamera, 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 blog, " 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 the Darwin streaming media server. Achieve 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 Access Easydss


Here is mainly the RTSP/RTP push process, this in the previous blog " based on the first listen after the DSS streaming media forwarding " described in detail in this process, the specific push code can also refer to the live555 Darwininjector class implementation, We directly modify the spydroid in the rtspclient can be implemented ANNOUNCE/SETUP/PLAY/RTP process, the specific process source code and protocol process can also refer to " with Darwin and live555 to achieve the framework of the live " Description in the.


android acquisition side download: Http://pan.baidu.com/s/1kTwrasB EASYDSS (Win) server download: Http://pan.baidu.com/s/1ntoFSSh easy DSS (Linux) server download: Http://pan.baidu.com/s/1c0b6bUo

How to use and blog " distributed streaming media Live Server system based on Darwin's realization "Easyipcamera in the same way, 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 there is a client request real-time video to push the audio and video stream , other conditions only with CMS connection keepalive, streaming media in idle state.


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!




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.