RTC live broadcast

RTC (Real Time Communication) is characterized by low latency and no lag. In terms of functional process, it includes acquisition, coding, pre – and post-processing, transmission, decoding, buffering, rendering and many other links, as well as more subdivided technical modules. For example, before and after processing links include beauty, filter, echo cancellation, noise suppression, etc., acquisition includes microphone array, etc., and codec includes VP8, VP9, H.264, H.265, etc. RTC does not rely on “optimization” to achieve real-time interaction, but on the real-time transmission mechanism of the push end.

Many real-time audio and video service professionals use the WebRTC standard, which is an open source browser-based real-time communication solution that uses the UDP proprietary protocol to push and stream media without creating discrete media segments.

The benefit of WebRTC is that the user experience is good, there is no need to install things, you can share a link to see. However, this scheme requires the host end to upload two channels of video: one for INTERACTION between P2P and mianlink, and the other for pushing to CDN by RTMP. Also want to download a video: lianmai P2P sent from the interactive data. The bandwidth of the anchor side is high. In addition, the host terminal needs to encode and decode multi-channel video, and has high requirements on the host terminal equipment configuration. However, the video size window switch between the host terminal and the mic terminal cannot be realized due to the combination of the host terminal and the mic terminal through CDN.

In addition to low-latency streaming, WebRTC provides a real-time two-way data channel that can be used to send and receive data streams. This two-way data technology opens up many interesting possibilities for how online streaming can now become an interactive experience. The audience can vote in real time during the concert for which songs they want the singer to sing. Sports fans can receive customized live sports statistics during or during games. Online shopping channels can display customized offers or pricing for different customers. This possibility seems to profoundly change the live video experience.

AnyRTC real-time broadcast mode, communication terminal equipment is not distributed CDN network, only through anyRTC RTN network broadcast, the delay can be controlled within 200ms, support a maximum of 50 people interactive connection, the maximum number of viewers 100W. During channel broadcast, user roles can be set to switch between anchor and audience, and view layout can be arbitrarily placed according to client scenarios.

The RTMP + CDN live

RTMP (Real Time Messaging Protocol) is a TCP-based streaming media transmission Protocol. The biggest feature of RTMP is its strong binding with CDN. Content is pushed to the edge nodes close to users by the load balancing system of CDN, so that users can get the content nearby. Improve the response speed and success rate of user access, and solve access latency problems caused by distribution, bandwidth, and server performance. In ordinary live broadcast, TCP protocol is generally adopted and CDN is used for content distribution. There will be a delay of several seconds or even more than ten seconds. The interaction between the anchor and the audience can only be carried out through text messages or gifts. RTMP is more suitable for site acceleration, on-demand, short video and other scenarios.

RTMP is a standard protocol based on TCP, which is compatible with CDN architecture. For customers, the access cost is relatively low compared with the existing one-way live broadcasting architecture, but the disadvantages are also obvious: when the host interacts with the linker, the voice will interfere and echo. The transmission delay in CDN is large because of the interaction between broadcast and link. The audience side needs to receive two video streams, which consumes too much bandwidth and flow. Moreover, decoding and playing of the two video streams consumes too much CPU and other resources.

The current CDN usually has a delay of 3-5 seconds, and users’ perception is not obvious when browsing pictures, short videos and other content. For live broadcast that does not require real-time strong interaction, such as live broadcast of sports events, live broadcast of concerts and live broadcast of news, the delay is acceptable and will not affect user experience. However, there is a certain gap between RTMP+CDN mode and the requirements for low delay and no lag in online video conference, online education, e-commerce live broadcasting and telemedicmedical consultation, which have very high requirements for interaction. At this point, RTC technology can better meet the needs of developers.

Different from the most common CDN + RTMP live broadcast technology on the market, anyRTC provides live broadcast solutions using unique live broadcast technology and anyRTC SD-RTN, so that the real-time communication quality between the host end and senior audience (guests) end reaches the special line level. In addition, in order to meet the diverse demands of live broadcasting today, anyRTC also connects with many CDN, supporting the streaming from the server to the CDN and the streaming from the client to the CDN to share live broadcasting content on social platforms.

The construction of a set of real-time audio and video communication capabilities, in addition to the selection of suitable technology according to the scene, but also depends on the price, the comprehensive cost performance of services. In general, the cost of using RTC technology is higher than RTMP+CDN. In practice, UDP transmission consumes more resources than TCP transmission, and retransmission, packet, FEC redundant calculation will increase the amount of calculation, in multi-process mode may also encounter excessive consumption of memory resources, which lead to the increase in development and use costs.

Based on RTMP and CDN technology, it is very reliable and stable for the product, but at the same time, the delay is also increasing, and the use of two RTMP push and pull flow consumes both bandwidth and CPU. RTC with wheat is the trend of future development with high cost and low delay. In the selection of developers, cost performance should be considered comprehensively from four aspects: technical characteristics, applicable scenarios, price and service. Services play an important role in the development and operation stages before and after the launch of a product.