How Thread Count Impacts Video Encoding Quality, Throughput, and Cost

When working with FFmpeg and other encoding tools, it’s easy to focus on codec settings or bitrate control, but have you ever considered how thread count affects your encoding workflows? It might seem like a small configuration detail, but it significantly impacts video quality, encoding speed, and even operational costs.

I just added a lesson entitled Optimizing Thread Count for Quality and Performance to  my course, Streaming Media 101: Technical Onboarding for Streaming Media Professionals.  Here are some of the higher-level findings.


Key Takeaways From the Lesson

  • What Are Threads? Threads are virtual components that divide tasks to be handled by your CPU’s cores, and while more threads can speed up encoding, they also impact video quality—particularly low-frame quality.
  • Quality Tradeoffs: Encoding with a single thread consistently delivers the highest quality, especially for transient low-frame issues, but it’s painfully slow for testing workflows.
  • Throughput vs. Cost: Tests on AWS instances showed that using one thread per instance delivers the best balance of cost and throughput, reducing costs by up to 50% compared to higher thread counts.

Insights From Real-World Tests

Here’s what we discovered in testing with FFmpeg and x264:

  1. Quality Impacts: Encoding with 64 threads resulted in a 10 VMAF point drop in low-frame quality for some clips, especially high-motion sports content. Using eight threads minimized these issues while maintaining reasonable speed (see image atop the page).
  2. Cost Efficiency: By running 32 instances with one thread each, encoding costs dropped dramatically compared to using high-thread configurations on a single instance.
  3. Stability Risks: Oversaturating threads beyond core count introduced instability, leading to crashes and poor throughput.

Practical Recommendations

  • For Production: Use one thread per instance for optimal quality and throughput. It’s cost-efficient and avoids the pitfalls of oversaturation.
  • For Testing: Balance speed and quality with around 8 threads per encode. This speeds up your workflow without compromising results significantly.

Why It Matters

For anyone managing encoding workflows, understanding how threads affect performance is essential. Whether you’re producing content for streaming platforms or testing workflows internally, the right thread configuration can save time, improve quality, and reduce costs.

For more on threads and many other configuration options, check out Streaming Media 101.

About Jan Ozer

Avatar photo
I help companies train new technical hires in streaming media-related positions; I also help companies optimize their codec selections and encoding stacks and evaluate new encoders and codecs. I am a contributing editor to Streaming Media Magazine, writing about codecs and encoding tools. I have written multiple authoritative books on video encoding, including Video Encoding by the Numbers: Eliminate the Guesswork from your Streaming Video (https://amzn.to/3kV6R1j) and Learn to Produce Video with FFmpeg: In Thirty Minutes or Less (https://amzn.to/3ZJih7e). I have multiple courses relating to streaming media production, all available at https://bit.ly/slc_courses. I currently work as www.netint.com as a Senior Director in Marketing.

Check Also

Seedtag: Harnessing AI for Contextual Audience Targeting

Cookies are gone from Safari and Firefox, and on their way out in Chrome. This …

Why That Amazon Product Follows You Everywhere: A Look at Behavioral Tracking

We’ve all experienced it—you check out a product on Amazon, and before you know it, …

How GPAC Technology is Shaping the Future of Streaming: Key Insights from Fred Dawson

In a recent interview available on YouTube, Jan Ozer sat down with Fred Dawson, an …

Leave a Reply

Your email address will not be published. Required fields are marked *