Welcome toTencent Cloud + community, get more Tencent mass technology practice dry goods oh ~

Author: Li Haiqi (Senior Product Manager of Tencent Cloud)

Have you watched the World Cup live? CCTV net, the clarity and fluency of CCTV video and audio have left you a deep impression? Let’s take a look at the feedback:

As the copyright owner and content distributor of this World Cup, CCTV has high technical requirements for the live broadcast support service of this World Cup. CCTV network finally chose Tencent Cloud – video cloud speed HD products, to provide its users throughout the country with smooth and stable HD live services. After the official launch and operation of CCTV.com, the ultra-speed HD service performed well indeed. In the initial stage of the World Cup, it formed a sharp contrast with the user experience of other platforms, and changed the previous users’ opinions on the live broadcast of large-scale events on CCTV.

In this paper, from the working principle of speed HD, through deep learning to optimize the World Cup scene, according to CCTV needs and other technologies PK won, finally deployed online operation as the timeline, record and summarize Tencent cloud speed HD is how to complete the CCTV World Cup live support.

A, Tencent cloud speed HD in the end is what the ghost?

The main quality problems of common transcoding include transcoding distortion, low resolution blur, camera jitter, high noise, low bit rate sawtooth, etc.

Topspeed HD service is an intelligent dynamic coding technology newly launched by Tencent video Cloud. The main principle of topspeed HD service is to process live video streams intelligently through deep learning, so as to provide users with higher resolution live video streams at lower bandwidth costs. ** It is mainly accomplished through the following modules.

1. Intelligent classification of video scenes: We first form a scene model library of more than a dozen mainstream categories and dozens of small categories including games, sports, shows, outdoor, animation, food, films and TV dramas through deep learning. During the beginning of ultra HD service, the real-time live streaming was detected and analyzed, and the corresponding scene model was matched. In terms of matching rate, the matching accuracy of CNN network model is more than 98% for obvious scenes such as games, football, basketball, animation, etc. CNN+RNN+LSTM analyzed the time domain and space domain with an accuracy rate of more than 85% for scenes with scattered screen features and large changes in inter-frame motion, such as TV series, outdoor sports, food and tourism.

2. Coding parameter matching: according to the real-time identification results of scene classification in the first step, the optimal coding parameters are selected in combination with the source rate, frame rate, resolution, texture and motion variation amplitude of the video, as well as the comprehensive dimensions of machine load and picture quality effect.

3. Pre-processing: sharpening, soft blur, de-interlacing, block removal, noise reduction, color level compensation, frame reduction and other pre-processing are carried out according to different scene classification, customer’s different requirements for video picture quality, and combined with video source picture texture and real-time motion detection results.

4. Dynamic coding optimization: Tencent Cloud-Speedhd service applies completely different coding parameters for different video categories and different video segments within the same video, including but not limited to IBP frame type, quantitative parameter QP, resolution, etc. Encoding parameters can be updated in real time by frame.

5, code rate intelligent control: Since the theoretical convex curve of rATE-distortion obtained by preprogramming is as close to the optimal distortion curve as possible in the scene with obvious motion change switching, no matter the standard H.264/JVT-G012 bitrate control algorithm or X264 bitrate control algorithm. For the scene frames with obvious switching in real-time detection of motion scenes, on the basis of x264 bit rate control, we will integrate the frame timing information to do some compensation factors and picture quality control, so that the subjective viewing score VMAF value can be improved by more than 3-5 points.

As shown above, speed HD has lower and more accurate bit rate control with the same VMAF score.

6. Detail reduce: For H264 video coding format, we design an algorithm to eliminate noise in the frequency domain of video residual. This algorithm adaptively performs macroblock-level video processing by combining the residual size of the current encoded macroblock, the QP value of the macroblock, and the historical frequency domain value, and selecting a matching video denoise template based on different scenarios. It can optimize noisy macroblocks with very low CPU consumption while preserving the integrity of clear macroblocks.

7.ROI processing: SIFT+ differential image + moving target image detection or user specified (such as table logo, watermark) pay attention to THE ROI area, the macro-block coding of this area for strengthening (zoom/zoom quantization step), sharpening, color level compensation and other processing, such as CCTV World Cup requires the image quality and brightness enhancement of table logo and subtitle area.

Tencent Cloud – Video cloud mainly through the above module cooperation processing in the cloud to open Tencent cloud speed HD service.

500 games simulation, 100 games practice – Deep learning for World Cup scenarios

After the Spring Festival this year, Tencent cloud Speed HD service began to access some head game live platform, and has been recognized by customers. However, we have not been in touch with customers of sports events (especially football events). Before the World Cup, we conducted a systematic machine learning and visual effect optimization evaluation for football match scenes, in order to make the best preparation for the upcoming World Cup.

1. Machine learning and visual adjustment: web crawler football game video more than 500 games. In order to build the optimal dynamic coding model of the World Cup, visual effect analysis and optimization effect evaluation are made for each game video in the following details: high-speed motion scenes, football following model training, long-term shot optimization, highlight replay ROI regional enhancement, audience expression capture and other details.

2. CSL testing the waters: although we have been optimizing the dynamic coding model of football matches by ourselves, we are still a little worried about the lack of real landing users. Around mid-April, we took the initiative to promote the super Hd service for Chinese Super League games live on Dragon Ball, and gradually added the super HD service for some Chinese Super League games. Although there were some problems at the beginning, the effect was gradually optimized to meet the needs of customers.

3, Premier League cut quantity: after early practice in dragon Ball Super League matches, we basically have a basic idea in mind. In the later stage, I began to actively look for some sports event customers. Xinying Sports, as the mainland rights owner of the Premier League, is basically the dominant player in the premier League (and the pace of play in the PREMIER League is much faster than in the Chinese Super League, which would be more in tune with the World Cup scenario). With the help of our architects and business people, we have promoted the ultra high definition service of Xinying Sports. After several rounds of testing and optimization, the customer has finally passed the verification.

Three, before the game, invisible PK

As the whole video cloud industry is extremely valued by CCTV customers, cloud manufacturers are competing. Following CCTV’s decision to introduce new technology to improve the clarity of matches during the World Cup, cloud service providers have offered their own solutions. After several rounds of testing, CCTV.com finally decided to choose between Tencent Cloud and a cloud manufacturer. As the World Cup is approaching, it is a great test for us. In the PK process with the opponent, we have carried out dozens of service upgrades and optimization in bit rate control, de-blurring, de-blocking, anti-interleaving, motion search and block decision-making modules. After round after round of PK, CCTV.com finally chose Tencent Cloud.

As you can see above, Ultra HD has a slight advantage in VMAF quality, with a bit rate around 8-10% less than its competitors.

Four, unite as one, one week to complete the privatization of CCTV network speed HD service deployment

Although we won in terms of technical indicators, due to the particularity and urgency of the World Cup, and the customer does not have matching hardware resources such as servers. So the requirement became: “Bring your own machine for private deployment.” In fact, in the early stage of our communication with customers, we are clear about the “privatization deployment” and are also preparing for it. However, time was really pressing at this time. Faced with the requirements of “server delivered”, “switch delivered” and “operation and maintenance personnel provided by themselves”, the team had too little time to prepare. But we do not want to give up, and good service for the HD live broadcast of the World Cup, for users, for customers, for Tencent are extremely important. After urgent negotiations, we came up with a new privatization plan.

Privatized deployment plan after upgrade:

Objective: to build a set of Tencent cloud speed HD transcoding cluster in CCTV network, support CCTV5 channel live during the CCTV World Cup, RTMP/FLV push and pull stream, support CCTV RTMP/FLV/HLS pull stream after transcoding.

Machine deployment: The customer only has rack resources in the machine room. Considering that if the customer prepares the machine-related hardware resources, the group will go through a long procurement application cycle, and it will not be able to serve the World Cup if we follow the conventional process. Therefore, we borrowed 10 sets of M10 transcoding machines from the company, and other related auxiliary equipment, such as switches, optical modules, optical fibers, network cables, etc., were purchased separately through collaboration. When deploying servers and other hardware, the developer and architect students wired themselves and screwed screws. (This is the real full stack engineer)

Five, the opening whistle, we are more nervous than the players

Finally, ** before the World Cup we compatible with the customer hardware devices and software code modules of various adaptation requirements. Now it’s time for the real test. ** Before the first day of the competition, everyone was still nervous, all the previous efforts will be wasted if something goes wrong after the live broadcast. After the game started, we stared at the screen nervously: ** all service indicators were normal, the streaming effect exceeded expectations, and the broadcast effect was obviously superior to other platforms. After the first day of the competition, we also received excellent reviews from our customers and the feedback from external users was a relief. However, the competition has only just begun, a month of the World Cup, we will also continue to fight in the invisible place!

Attached are some pictures of the scene:

Finally, I hope you can enjoy Tencent cloud to bring you the World Cup speed HD service.


Question and answer

How do I transfer live video streams to Android?

reading

WebSocket and MSE for HTML5 live streaming protocol

A NOW live audio acquisition quality test tool

Technical application of applets in live broadcast products


Has been authorized by the author tencent cloud + community release, the original link: https://cloud.tencent.com/developer/article/1151441?fromSource=waitui

Welcome toTencent Cloud + communityOr pay attention to the wechat public account (QcloudCommunity), the first time to get more massive technical practice dry goods oh ~