Blog/Audio & Video quality testing

Video Quality Comparison for H.264 at Different Resolutions and Bitrates (Part 2)

Woman working on a computer

In our previous blog, we explored how different resolutions and bitrates affect video quality when using the H.264 codec. The key takeaways were that higher bitrates offer diminishing returns in quality and that finding the right balance between resolution and bitrate is crucial.

In this blog, we continue our investigation into the H.264 codec, but with a key difference—the video content itself. While our previous analysis focused on mostly static content with minimal movement, this time, we will examine a more dynamic video with increased motion and a denser background.

Static vs dynamic content

For the previous experiment, we used a “talking head” video that followed a standard conference call setup—a user sitting at a desk and speaking throughout the video. This time, however, we opted for a more dynamic approach, introducing movement not only in the subject but also in the background.

Key differences between the two videos include:

  • Increased movement from the user;
  • Lateral camera movement;
  • A more vibrant, multi-colored background.

These elements add complexity to the video, leading to variations in quality scores and trends, even in identical scenarios.

Preparing videos and evaluation

As before, we evaluated two metrics: VMAF as the full-reference metric and VQTDL as the no-reference metric. Using FFMPEG, we generated videos in common resolutions—144p, 240p, 360p, 480p, 720p, and 1080p—while applying YouTube’s recommended upload encoding bitrates: 200kbps, 500kbps, 1000kbps, 2500kbps, 5000kbps, and 8000kbps.

Check out the full list of videos used to create this report.

Video complexity

Before diving into the results, let's first compare the complexity of the original reference videos. This comparison will help us better understand the differences in the results.

We use the Video Complexity Analyzer (VCA), an open-source tool developed by the Christian Doppler Laboratory ATHENA at the University of Klagenfurt, Austria, to assess video complexity. This tool measures various aspects of video complexity.

In this analysis, we focus on two key metrics: spatial and temporal complexity. These are primarily determined using a DCT-based energy function, which divides each frame into 32×32 blocks and calculates the texture energy of each block. This includes elements such as patterns, edges, and details. Based on these calculations, the tool then determines the spatial and temporal complexity of the frames.

Below are the spatial complexity results for both the static video used previously and the dynamic video analyzed in the current tests:

Graph showing spatial complexity for static vs dynamic video

The complexity increases by nearly 60% when comparing static and dynamic videos. Given this, we can expect lower average quality scores for dynamic videos, as their higher complexity requires more encoding resources, ultimately reducing overall quality. This insight will help guide our analysis of the results.

Additionally, we can compare the effects of a static black screen video and a white noise video:

Graph showing spatial complexity for static, dynamic video, static black video and white noise video.

We also compared the temporal complexity of both videos:

Graph showing temporal complexity for static video and dynamic video.

As we can see, there is an even larger difference, where the complexity of the dynamic video is 3.5 times larger than the complexity of the static video.

Dynamic video results

Let's analyze the results for the dynamic video assessment.

VMAF

Let’s start by taking a look at the 1080p. For each resolution, we generated an overtime data graph:

Graph showing VMAF results for 1080p

The first major difference appears at the 2500kbps bitrate, where VMAF scores drop from 94 to 88. The decline continues at lower bitrates, with scores falling below 10 at the lowest 200kbps bitrate.

Comparing the 1080p Static and Dynamic video results highlights the significant impact of dynamic content:

Graph showing static vs dynamic video 1080p VMAF

While the static video maintained its quality even at lower bitrates, the dynamic video showed a significant drop. At just 1000kbps, it was rated lower than the static video at 200kbps.

An interesting observation is that at bitrates of 1000kbps and below, the dynamic video retains much higher quality during the first few frames but then suddenly drops to lower scores. Several factors contribute to this behavior, one of which is the encoding process of I-Frames and P-/B-Frames, a common principle observed not just in H.264 but in other codecs as well.

Key influencing factors

I-frames (intra-frames) are independently encoded frames that serve as reference points for subsequent frames. Since they are encoded with more data, they tend to be of higher quality than dependent frames. This explains the better video quality observed in the first few frames of our results.

P-frames (predicted frames) and B-frames (bi-directional frames) rely on data from other frames. P-frames use previously encoded frames to reduce the amount of data required, but in low-bitrate scenarios, this can lead to noticeable drops in quality. B-frames, while better at preserving video quality than P-frames, use more resources as they predict data from both previous and future frames. However, even B-frames struggle to maintain quality at lower bitrates.

Compared to the static video results, another reason for the sudden quality drop is how H.264 manages rate control. Rate control determines how encoders distribute bitrate across frames. Since initial I-frames consume more bitrate, less data is available for encoding subsequent frames, leading to a sharp decline in quality.

Additionally, the overall complexity of the video plays a crucial role. Compared to static video, dynamic video exhibits an almost 60% increase in spatial complexity and a 3.5x increase in temporal complexity. At the same bitrate, the encoder sacrifices details to keep up with motion and frame rate, resulting in much lower quality.

All these factors combined lead to significantly lower scores for the dynamic video compared to the static one, as well as the sudden drop in quality after the first few frames at lower bitrates.

Across different resolutions, the static video showed only a slight difference at 240p. However, for the dynamic video, VMAF results at 1000kbps and lower still indicate a noticeable drop in quality.

Graph showing static vs dynamic video 240p VMAF

If we examine the overall averages across different resolutions, we can draw several conclusions:

Graph showing different resolutions and bitrates
  • Across all resolutions, the drop in quality begins at a 1000kbps bitrate.
  • Similar to the observations from the static video in the first section, using lower bitrates at lower resolutions proves more effective. For example, at 1080p with a 500kbps bitrate, the VMAF score is approximately 39. However, at 720p with the same bitrate, the score increases by more than 50% to an average of 61.
  • At the lowest bitrate of 200kbps, the scores improve progressively from 1080p down to 240p. However, at 144p, the score drops due to the extremely low resolution.

VQTDL

Now, let's examine the VQTDL results. Starting with the 1080p data, we can see a similar correlation between VQTDL and VMAF scores:

Graph showing VQTDL results for 1080p

While the overtime format data has a wider range than VMAF scores—for instance, in the 1080p/1000kbps case—the difference between the high scores of 3.9 and 4.2 remains minimal from a subjective standpoint and aligns well with average VMAF scores.

We also notice a similar pattern: the 200kbps and 500kbps data exhibit the same initial quality spikes observed in the VMAF score evaluation.

Looking at the overall average VQTDL scores, we can draw several key observations:

Graph showing overall average VQTDL scores across different resolutions.
  • Overall VQTDL scores correlate well with the VMAF results.
  • We can observe the same behavior where 200kbps scores improve from 1080p until 360p and then are slightly lower at 144p due to the resolution being so small.

YouTube

The last comparison, just like with the static video, was made by uploading the dynamic video to YouTube and using the yt-dlp tool, downloading it in 4 different resolutions - 144p, 360p, 720p, and 1080p.

YouTube encodes each of these resolutions with the following bitrate:

  • 144p - 86kbps
  • 360p - 389kbps
  • 720p - 1425kbps
  • 1080p - 2990kbps

The first thing we can take note of is that YouTube also has significant changes between both of the videos:

Graph showing static vs dynamic video for YouTube

As we can see in this graph, the bitrate for the dynamic video increases in each resolution, being almost 5 times larger at 1080p than the static video.

VMAF

Let’s take a look at all of the VMAF results combined with data from the YouTube tests:

Graph showing VMAF vs Res/Bitrate combined with the YouTube tests

Based on this data, the YouTube tests fit well in the overall picture, with the bitrates achieved by those tests achieving appropriate results:

  • 144p at 86kbps having the lowest results at ~13 VMAF;
  • 360p at 389kbps having a VMAF score of ~66, slight lower then the scores of 360p/500kbps;
  • 720p at 1425kbps with a score of 85 being between results of 720p 1000kbps and 2500kbps;
  • 1080p at 2990kbps having slightly higher scores than the results for 1080p 2500kbps.

VQTDL

A similar trend can be observed for VQTDL results as well. The scores from YouTube tests fit well in the overall picture between the other VQTDL scores, just like with VMAF data.

VQTDL vs Res/Bitrate

Key takeaways

This data comparison provides valuable insights into how content complexity affects video quality when encoding with the H.264 codec.

1. More complexity = lower quality

Our testing shows a clear trend: the higher the complexity of the video content, the lower the quality scores, particularly at lower bitrates and higher resolutions. More intricate details and visual effects demand more data, which leads to a noticeable drop in quality. For instance, when comparing dynamic and static videos, VMAF results for the same test cases can be as much as 10 times lower.

2. Allocate at least 500kbps for encoding

The data reveals that quality scores drop significantly below 500kbps across all resolutions. While the difference between scores narrows with higher resolutions, the gap between bitrates remains most prominent between 200kbps and 500kbps. This is especially noticeable at 1080p, where quality degrades from below average to almost unrecognizable.

3. H.264 prioritizes quality in the first frames

This phenomenon is especially evident in 1080p tests at lower resolutions. The initial frames receive relatively high scores before dropping suddenly. This occurs because H.264 prioritizes the first reference frames, which are crucial for predicting subsequent frames. However, when there’s insufficient bitrate, predicted frames lose quality sharply, leading to sudden drops.

4. Finding the right balance between resolution and bitrate

An important takeaway is the need to balance resolution and bitrate according to the requirements of your specific use case. If overall quality is the priority, it’s better to opt for a slightly lower resolution with a higher bitrate. Sacrificing bitrate for a higher resolution without adequate resources will result in visible degradation in quality.

Final thoughts

Ultimately, finding the right combination of resolution and bitrate is essential for achieving the best possible video quality, especially when dealing with content that is more complex or dynamic. By understanding these nuances, content creators can optimize their encoding strategies and ensure a higher-quality viewing experience for their audience.

Stay tuned for upcoming blogs as we explore how different encoders impact the video quality in these scenarios.

Ready to optimize your video quality? Get in touch to learn more about video testing services to unlock the full potential of your video content!

QA engineer having a video call with 5-start rating graphic displayed above

Deliver a product made to impress

Build a product that stands out by implementing best software QA practices.

Get started today