Android real-time video network transmission solution Summary (a total of five sets)

Source: Internet
Author: User

Recently, I have studied the real-time video network transmission problem of Android. I have spent a lot of effort on video processing. I have summarized the following five solutions and compared them.

 

Take video transmission of 320x240 as an Example

Solution Compression rate Compression/Transmission Mode Real-time Average Traffic consumption Transmission Distance
Use the callback function of camera to send the original yuv420 data. 0 No compression, frame-Based Transmission High (20 ~ 30 FPS) Very high (6.5 Mbps), too horrible o_o Wired or wireless at close distance
Use mediarecorder to hard encode yuv420 with h264 before sending High (95%) Inter-frame compression and Video Stream Transmission High (20 FPS) Low (30 ~ 70 Kbps) Long distance
Call the local h264 encoding library (JNI) to encode a frame of yuv420 and then send High (97%) Inter-frame compression, transmitted by Frame Low (2 FPS) Low (20 Kbps) Long distance
Use a gzip library to compress a frame of data and then send it (a wonderful Practice) Relatively high (70% ~ 80%) Intra-frame compression and transmission by Frame Low (5 FPS) Relatively high (300 Kbps) Long distance
Compressing and transmitting one frame of data in JPEG Mode Average (about 60%) Intra-frame compression and transmission by Frame High (25 FPS) (170 Kbps) Long distance (bandwidth allowed)

Note: mediarecorder has strong hardware dependence. Therefore, different mobile phones have different performance. Some mobile phone data transmission may be congested, reducing the real-time performance.

 

To sum up, solution 2 (mediarecorder) and solution 5 (JPEG) can still be considered. Because my project only needs to transmit data in close-range wireless mode, and the hardware level is not high, therefore, solution 5 is selected.

 

 

The above scheme is summarized after I have studied the real-time video encoding and transmission scheme in a more specific and in-depth manner recently. I hope that friends who need to study video transmission can refer to it!

Related Article

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.