Speed-Distortion Optimization: Tradeoffs in Open Source HEVC Encoding
Date & Time
Monday, October 21, 2019, 11:30 AM - 12:00 PM
San Francisco Room
Can we halve the cost of encoding a movie without sacrificing its perceptual quality?
The HEVC video compression standard is an essential technology for providing UltraHD and HDR content, and a driver for significant increase of coding efficiency for HD content. This increase comes at a cost of a significant increase in computational complexity. Combined with increase of number of encodes due to the number of rungs in adaptive streaming ladder and to content-adaptive encoding, use of HEVC in multi-rate streaming context requires substantial increase in computational capacity. This, in turn, translates into increase in infrastructure or public compute costs.
The main goal of this paper is to show what can be done to optimize the throughput of an open source distributed encoding system running on commodity hardware either on premises or in the public cloud. This will be done using the popular open source x265 video encoder. It is ubiquitous in commercial cloud encoding implementations and is typically used in conjunction with ffmpeg. It is a versatile encoder which allows user control over various aspects such as use HEVC coding tools, rate-distortion optimizations (RDO), perceptual quality, instruction set extensions, and concurrency at a very fine granularity. It also outputs a plethora of internal information through its logging system. This level of detail, combined with the source code availability, lets us do a detailed tradeoff analysis at both quality and code path level.
We start the analysis from examining the cost-benefit analysis of x265 presets which recently went through an overhaul. We will continue with effects of lesser-known options controlling RDO behavior, such as SSIM-based RDO. We further examine the effects of disabling or limiting some of the coding tools offered by the HEVC standard, such as in-loop filtering. We then evaluate CPU-level aspects of x265 performance, such as core frequency and utilization, and compare performance on latest generations of server processors, both in on-premise and public cloud settings.
Lastly, we analyze tradeoffs of massively parallel chunked encoding, where chunk duration and number of concurrent encoding jobs per machines are an additional optimization variable.
Our evaluations are done on large amounts of UltraHD and HD cinematic content. Quality and quality constancy are evaluated using modern perceptual quality metrics such as VMAF and SSIM+.
The value of this paper is in the detailed analysis of the codec performance. This information is currently not readily available to practitioners.
Technical Depth of Presentation
What Attendees will Benefit Most from this Presentation
The ideal audience would be engineers working on video compression for adaptive streaming distribution.
Take-Aways from this Presentation
There is not much information available on performance / quality tradeoffs of HEVC encoder in production-like environment, beyond the x265 documentation itself and several incomplete blog posts