Home > Mobile >  Develop a one-to-one live source APP system software should have what function, how to develop?
Develop a one-to-one live source APP system software should have what function, how to develop?

Time:11-26

1. The technical implementation aspects:

Technology is relatively mature, equipment support hard-coded, IOS also provide ready-made Video ToolBox framework, the camera and streaming media data structure can be processing, but Video ToolBox framework compatible with version 8.0 above, only need to use x264 library 8.0 under soft plait,

Ready-made open source implementation making, push flow, skin care, watermark, barrage, thumb up animation, filters, play all have, technology is not very hard, and it is very cloudy vendors offer SDK, functions are almost the same, no window, the difference is the live platform services differences and access the simplicity of the backend now RTMP/HTTP - FLV uniform, standing App to hang a source direct access to the cloud vendor or CDN is OK,

2. Live optimization level

Actually the hardest difficulty is to improve the premiere time, Quality of Service or Qos (Quality of Service, Quality of Service), how the packet loss rate of 20% of the cases, can guarantee stability, smooth live experience, you need to consider the following scenario:

1. In order to speed up the first time, streaming server active push GOP (Group of Pictures: strategy affects the quality of coding) so-called GOP mean picture Group, a GOP is a Group of consecutive images to the edge of the node, edge nodes cache GOP play side can quickly load, reduce the delay back to the source,

2. GOP lost frame, in order to solve Time delay, why there are delay, network jitter, network congestion caused by data sending do not go out, after losing all timestamp to change, remember, otherwise the client will card a GOP together of the Time, is because the PTS (the Presentation Time Stamp of PTS is mainly used to measure the decoding video frames when displayed) and the reason of the DTS, or player correction DTS and PTS to also go, push the flow end lost GOD more complex, throw the p frame before I take screen frame)

3. Pure audio frame, to solve the problems of the audio and video are not synchronized, let video delta delta to after you lose audio delta, will again send audio, or audio and video are not synchronized

4. The source station and main/backup break line reconnection

5. Do intelligent scheduling based on TCP congestion window, when the congestion window is too big that node, the poor service need to switch node and troubleshooting

6. Increase the uplink, downlink bandwidth detecting interface, when the bandwidth does not meet the lower the quality of video, which reduce the bit rate

7. Time to get the optimal flow, flow link IP, as far as possible to ensure to provide the best service

8. Monitoring must, monitoring each node state of Qos, to do the resource configuration optimization and scheduling of the entire platform,

9. If the product from the push flow, CDN, players is their own, to ensure the Qos advantage is very large,

10. When is a large amount of live, to join the cluster management and scheduling, ensure the Qos

11. By increasing the network delay to reduce jitter play end, fast information to reduce the delay of

3. Operating costs and customer experience

Operation and promotion, this is more money, some do live mobile game live, live show of A round of at least tens of millions,

User experience: smooth, BuKa, not to spend screen, break line reconnection, packet loss strategy, first draw load speed, rich gifts system, in order to improve the user experience, you can load other pages in the background data, but to strike a balance in terms of user experience and memory optimization,

Second, streaming media transmission

1. TCP: TCP is a point-to-point protocol, although can guarantee the reliability of data transmission, but the server resource consumption is larger, the data flow is difficult to guarantee the real time transmission of data stream big occasions,

2. The UDP: UDP as unreliable transport protocol, do not need to maintain connection state, don't think every packet must reach the receiver, so the network load is smaller than the TCP, transmission speed is faster than TCP; But in the network more crowded, more have more packet loss,

RTMP: RTMP a specifically for efficient transmission video, audio and data designed protocol, it through the establishment of a binary TCP connection or connect HTTP tunnel real-time video and audio transmission,

4. FFmpeg: FFmpeg is one set can be used to record, convert digital audio, video, and can be transformed into the flow of the open source computer programs, use LGPL or the GPL license, it provides a recording, transformation, and streaming audio video complete solution,

Three, the building of the project: acquisition side

1. There is more well-known VideoCore

The current domestic many well-known push flow framework are secondary development of VideoCore main written using c + +, the framework supports RTMP push flow, but a little dense for iOS developers (proficient in c + + exception), want to open source and free can choose now and several well-known project VideoCore + GPUImage + based on GPU's beauty filter, play with IJKPlayer oneself revise,

2. Domestic more fire LiveVideoCoreSDK

Framework provides the IOS iphone RTMP service address RTMP push flow, can be directly push flow, the SDK download after simple engineering configuration can be run directly after, live and realize the beauty filter function, based on OpenGL, front and rear cameras switch at any time, provide the RTMP connection status callback,

This framework is the domestic earlier a push flow there are a lot in the use of the SDK framework, function is complete, the author also compares cattle, used to study flow collecting relevant content is very good, but some are integrated into the engineering difficult (for me), overall it is a very powerful push flow SDK, almost all written using c + +, compile the efficiency is very good, if there is one strength is recommended to use this framework to do their own project push flow side,

3. The readability better push flow LFLiveKit

Framework supports RTMP (Real Time Messaging Protocol) : real-time message transmission Protocol, Adobe,

HlS (HTTP Live Streaming) : Apple's own dynamic code rate adaptive technology, mainly used in PC and Apple terminal audio and video service, including an m3u (8) the index file, TS media fragmentation files and key encryption string,

Recommend this framework first because it mainly use OC, written in C language, the rest of the framework is very clear, this is not proficient in C + + beginners provides a great convenience, and expand sex is very strong, support for dynamic code rate switch function, support function,

4. Skin care function

Skin care is usually use GPUImage based on OpenGl, pure OC language, this framework is very strong, can make various filters, can be high expansibility, if there is no specific ideas can be directly used for skin care BeautifyFace, can join the project, is very convenient to realize beauty effect,

Four, project specific structures,

1. How to realize the beauty?

Facial features are using BeautifyFace, it can be very rapid implementation of skin care function, the effect is good, it is based on the bottom of the GPUImage, GPUImage very favorite Developer, can consult BeautifyFace, write your own skin care function, and add a variety of filters,

2. The realization of the suspended TabBar

The TabBar looks like made of custom TabBar, but in fact it is still in the TabBar system, to the system of the TabBar. BackgroundImage set a good background picture design,

Add after will find that there's a shadow at the top of the line, and the height of the TabBar is insufficient, between the shadow line and above the green line into a transparent color, implement the following method to hide the shadow line, and raised the height of the TabBar,
  • Related