How to build a high-concurrency, stable, low-latency live broadcast system in the intricate network situation in China? On December 21st, Li Hao, head of the network technology technology live broadcast technology, was invited to the CSDN network open class to answer a series of questions about the construction of the live broadcast system for hundreds of technicians.
Li Hao concluded that to build a live broadcast system that can provide users with an excellent viewing experience, it is important to pay attention to the three key indicators, namely, the speed, delay and opening speed of the first screen. In view of the current live broadcast market, Li Hao believes that no matter how the content and operation methods are refurbished, if there is no core technology as a guarantee, the three major indicators cannot be guaranteed, and the live broadcast platform is still difficult to win the market competition.
The following is the content of Li Hao's course:
one. Different live broadcast formats correspond to different technical requirements
The live platform is subdivided into a variety of formats. At present, there are several kinds of formats in the mainstream, namely, show series, games, and life. In addition, events, interactive, educational, and surveillance live broadcasts are also common.
Although there are basically 1 billion unicorn companies in these formats, the core requirements of each format are completely different:
â— Show and live broadcast: The anchor and viewer network environment is relatively more complex, so the core experience is smooth, you can sacrifice the bit rate to improve fluency, adaptive code rate, frame rate, etc. are common optimization methods;
â— Â Game Live: In order to ensure the experience, high definition and high fluency are required. The end-to-end delay can make some concessions in exchange for higher compression coding parameters, and accommodate higher frame rate and definition content. ;
â— Â Event broadcast: The core requirements are stability, including high reliability uplinks;
â— Â Interactive live broadcast: The core requirement is an end-to-end delay. It is acceptable to discard video frames when the network is fluctuating.
Therefore, it is necessary to pay attention to different business forms, and the technology used in the backend is completely different. For example, the live low-latency scheme of interactive type, 4K and VR, such as the live broadcast scenario of user bandwidth full utilization, the general CDN technology may not be able to cover.
Despite this, Li Hao still believes that it is easier to build a live broadcast system than before, because a lot of work has been solved by CDNs and terminal service providers, and there is a lot less to do.
two. The core business needs of the live broadcast system
So what are the core functions that need to be focused on when building a live broadcast system? Li Hao analyzed this one by one.
A. Capture and play
At present, video collection has been relatively easy, because the mobile phone function is relatively complete, unlike the PC era, it needs to face different camera drivers, so the technical point that needs core processing is network adaptation. Technicians need to adjust the coding parameters according to their own network conditions, as well as the basic requirements of multi-protocol pull flow, hardware and software decoding, multi-resolution chasing frames. If you can solve the high-end requirements such as cache management and data synchronization on this basis, the overall broadcast experience of the live broadcast will be smoother.
B. Distribution and media processing
The distribution and media processing work is now directly addressed by CDN service providers in addition to the “specially large†platform. Because the CDN service is relatively complete, some functions matching the live broadcast, such as offline notification, protocol conversion, weak network transmission, and functions like transcoding, watermarking, gain, screenshot, and recording have been provided.
C. Functional system
What needs to be built by the core of the live broadcast platform is the functional system. In addition to the account system, there are functions such as popularity, props, rewards, payment, lottery and so on. In particular, the barrage function is the core technical challenge for the live broadcast platform. The main reason is that the volume of the barrage will be very large. The number of live broadcasts is hundreds of thousands. The frequency of the barrage is very high. One or two seconds will send a message. The huge amount of broadcast is very stressful on the system. Therefore, the general live broadcast platform will adopt a partitioning method to solve it, and how to partition and under what circumstances to merge the partitions to maintain proper popularity, there are still many logical problems to be solved.
D. Operational system
The operating system is also very core. The yellow anti-review of video, the review of chat content, and one-click interruption, data statistics, quality monitoring are all necessary, because one must face the pressure of content supervision and review, and secondly, it must be able to monitor the quality of different regions of the country. effect.
However, Li Hao pointed out that even if the above functions are realized, it can only be said that a live broadcast product that can basically run can be built. There are still many places to be upgraded.
three. Key technical knowledge of live broadcast
Next, Li Hao explained in detail some of the key knowledge of the live broadcast:
A. Video frame
A video frame is actually a video unit. The video unit is divided into three types, which are called I, P, and B frames. An I frame can be simply understood as a picture, and the volume will be larger. The B frame and the P frame are a reference frame. For a live stream, the most core frame is the I frame, and the one derived from the I frame is called the GOP. The delay that is usually seen on live broadcasts is actually the internal live stream buffer delay, called GOP cache. For a CDN system, the transmission delay is only a small part of the delay, and part of it is the GOP cache generated in the user stream. Therefore, if the live broadcast platform wants to reduce the delay, it is recommended to adjust the encoding parameters of the upstream stream and lower the I frame interval.
B. Code rate
The code rate is also divided into three types, CBR, VBR, and ABR. CBR is a fixed bit rate and can be used to ensure that the network private line bandwidth is controllable. VBR is a variable bit rate. The downside is that the picture changes drastically and its code rate jump is particularly large. Therefore, in the actual application of live broadcast, ABR uses the most, that is, divides the quality and the code rate equally, and controls an average value.
C. Coding, encapsulation, transmission
The function of the package is equivalent to a bucket, which can put together audio and video of different encoding formats. The good package format is compatible with a wide variety of audio and video encoding formats. The function of the encoding is to compress the original data smaller. The original information like video encoding is large. The current encoding method has made the information redundancy very low. If the frame loss occurs, the video will be screened.
Li Hao reminds live broadcast technicians that you must understand these basic knowledge, otherwise it is difficult for you to understand where the delay of the live broadcast is and why it happens.
four. Live system architecture
For a live broadcast platform, the anchor is equivalent to a data source. Different audiences are equivalent to subscribers, which is actually a producer and subscriber model. How to send the information produced by this producer to the subscribers more efficiently is actually an application-level multicast structure, which needs to be considered at the application layer level, such as the number of transit hops, network distance, and transit bandwidth. Cost and convergence effects, etc.
Push mode is that the anchor directly pushes the stream to the CDN node, and the CDN node is accelerated by its own web page and distributed to the users who actually watch. Live all the features, such as transcoding watermarks, transfer screenshots, transfer to on-demand, all of this feature, including data statistics to provide some API, will be done in the CDN.
A live broadcaster may choose multiple CDNs or have a self-built CDN. The core point of each CDN is how to set up a virtual network with relatively fast distribution, strong disaster tolerance performance and relatively cost-saving in this complicated network environment in China.
So in the entire CDN, the core is the transmission network, followed by the robustness of the functional system. A CDN or a live broadcast system is good or bad. The success or failure is partly due to the smooth transmission and the other part is whether you are stable.
Fives. Three core indicators of live broadcast
Although the requirements of the live broadcast technology are intricate, Li Hao said that there are only three key indicators of the live broadcast: the Karton, the delay, and the opening speed of the first screen. Doing these three key indicators, the live user experience will be guaranteed.
A. Caton
Carton’s resolution and delay are contradictory to some extent. There are three reasons for the occurrence of Caton. The first is that the anchor is uplinked, and all the viewers will be stuck. The second is the card that the CDN internal network brings. For example, the transit network has fluctuated, the node load is not controlled, or some The networking strategy has a problem. The third is the scheduled and terminal network problem, like the DSN mismatch, or the last hop network jitter. To have a manual monitoring, you can find the main problem points targeted processing.
B. Delay
In addition to the video GOP cache mentioned above, the second delay mainly comes from accumulation. In addition to the logic such as frame skipping, it can also be improved by changing the transmission protocol. For live broadcast services with high latency control, such as interactive live broadcast, The protocol such as TCP will be used for transmission, and the UDP protocol will be selected. Because for this live broadcast, all the data of the video can be abandoned, but priority should be given to the immediacy of the audio.
C. First screen opening speed
When the first screen is opened, the test mode is the networking mode of the live CDN, the network coverage rate, and the optimization degree of the transmission protocol. Li Hao particularly reminded that this year's requirements for the opening speed of the first screen are getting higher and higher. Second opening is already the requirement of last year's index. This year, it should be refined to several hundred milliseconds. Without this level, there is no competitive advantage. At this point, it is especially important to choose a reliable CDN.
LED Wall Wash Light
Wall Wash Light Series Include 36x12w LED Wash light, 19x15w Led wash light; Both is hot selling in the lighting market.
36X12W RGBW 4 IN 1/5 IN 1/6 IN 1 /LED Wash Moving Head Light
Specification:
Pure bright in color effect, excellent color mixing, good heat cooling
36 pcs 12W RGBWA+UV 6in1 LED, 36 pcs 10W RGBWA 5in1 LED, 36 pcs 10W RGBW 4in1 LED
10-60 zoom angle, narrow beam effect to wide wash effect, functional in usage.
Small size, easy to carry and install, each unit weighs only 9kg
Linear smooth dimmer from 0-100%, 1-20 times strobe per second, flicker-free for TV and films.
Suitable for mobile productions, events, parties, stage installations, theater, musical concert, TV studios.
Our company have 13 years experience of LED Display and Stage Lights , our company mainly produce Indoor Rental LED Display, Outdoor Rental LED Display, Transparent LED Display,Indoor Fixed Indoor LED Display, Outdoor Fixed LED Display, Poster LED Display , Dance LED Display ... In additional, we also produce stage lights, such as beam lights Series, moving head lights Series, LED Par Light Series and son on...
Wall Wash Light Series,Disco Light,Led Washer Light,Moving Head
Guangzhou Chengwen Photoelectric Technology co.,ltd , https://www.cwleddisplay.com