With the continuous growth of voD service, the cost of bandwidth is also increasing sharply.
This topic mainly analyzes our practical experience on how to reduce the overall operating costs while ensuring smooth and stable broadcasting services for users in the last two years.
I. Business introduction and cost analysis
Every day, we media creates hundreds of thousands of videos, and rich video content is played billions of times a day. Among them, video processing is the most important link between content creation and consumption. For the massive video content, the first thing involved is storage. For the original video without compression, the storage cost should not be underestimated. On the other hand, the formats, types, resolutions and quality of videos vary greatly. In order to serve the consumption needs of different users across the platform, we need to provide unified and standardized output of videos. For users with different devices and different network environments, especially the increase of mobile network consumption scenarios, bit rate optimization and multi-bit rate output also become a crucial link. To sum up, to reduce the cost of vod scenes, we can start from the following directions:
Production: video transcoding and review
Storage: Storage cost of object storage
Distribution: Cloud storage traffic charges and CDN bandwidth charges
Second, bit rate optimization
No matter from which direction to do cost optimization, compressed video bit rate is the most core point. We introduced H.265 in nineteen, which resulted in a bit rate reduction of about twenty to thirty percent compared to H.264. On the other hand, we introduce content-aware coding optimization. Firstly, parameters are adapted to common scenes in the video library through offline coding analysis. Then, machine learning is combined with video pre-processing module to quickly predict appropriate parameters for coding. Overall, about 50% bit rate reduction was achieved through H265 and content-aware coding. Detailed analysis of bit rate optimization will be discussed in the next chapter of this topic.
Theory and reality
So if we optimize the bit rate for all videos, we can directly convert the bit rate reduction into the benefit of bandwidth cost? The answer is no. Firstly, H.265 is not supported by all platforms, and the extra machine overhead brought by complex coding also affects the calculation of the final cost. Therefore, it is necessary to weigh various factors such as the actual business scenario, machine computing cost and decoding coverage. The relevant product prices of Aliyun are used for example analysis here. Assuming that a video lasts 60 minutes, the original bit rate is 2Mbps, the additional compression rate of H.265 is 20%, and the traffic cost is 0.15 yuan /GB, the figure is shown below:
It can be calculated simply that for a processed H.265 video, it needs to play the whole video for at least 723 times to balance the cost of additional transcoding. In addition, the H.264 format still needs to be reserved for all videos because of platform coverage issues with the actual H.265 decoding. So the final cost formula is as follows:
Bandwidth cost benefit = bit rate reduction * video clicks * video duration * platform coverage – additional transcoding costs
In summary, to balance the cost of additional transcoding, the video would need to be played at least 1157 times in its entirety, based on h.265 coverage of 60%.
Strategy center
Combined with the actual situation of online business, we introduced the strategy center this year and adopted the trigger transcoding optimization, as shown in the figure:
At present, the long tail effect of short video service within the platform is very obvious.
For a large number of unpopular videos, we do not perform additional transcoding and complex calculations like H.265;
For the hot content online, while ensuring its online speed, the strategy Center delivered the optimization task of hot video by collecting video playback data and cluster load information, and finally replaced the video version processed quickly with the version with lower bit rate and higher picture quality.
For the collected hot video data, it will be used for the dynamic regulation of the account level, so as to realize the production of the fast online version and the high quality and low bit rate version at the same time after the high-grade account sends a message, so as to ensure that users can use the optimized version to play in the first time.
After the launch of the strategy Center, the coverage rate of one-point optimized videos reached 85%, and the average video viewing bit rate decreased by 15%.
V. Future and outlook
1 Optimization of encoder
After the launch of the policy center, it is possible to launch the encoder with higher complexity. We will continue to optimize the current H.265 encoder and try to add more AI algorithms to the encoder to balance picture quality, complexity and video bitrate. We are also working on next-generation coding standards such as AV1. In the pre-processing of the video, we will try to train more and finer scene classification models and further optimize the bit rate by extracting more features.
2. Strategy adjustment and optimization
In the future, we will introduce more playback data indicators and original video information to adjust the hit ratio of the strategy center.
3 Decoding end optimization
Through the cooperation of the client team, we tried to improve the video quality on the decoding side, so as to achieve further bandwidth saving.
The article comes from a bit of information content in Taiwan video team