Speed up H.264 encoding with a budget GPU

By | 11th June 2016

MSI GTX750Ti Graphics Card

In this article we will explain how a graphics card can help to reduce the amount of time required to compress video files into a web and gadget friendly format. If you’re already familiar with basics of video compression and just want to see the findings of our tests then scroll down to the results chart below. As always with our technical blog posts we’ll try to explain the details in plain English without too much technobabble.

Why must we compress video?

Video files can take up a lot of hard drive space. Uncompressed standard definition video takes around 20MB/s (megabytes per second). Fibre Broadband tops out at 80Mb/s (megabits per second) which is a theoretical maximum of around 10MB/s – even with a perfect 80Mb/s connection you still couldn’t stream uncompressed standard definition video. Most tablets, phones and SmartTVs don’t support uncompressed video either. Therefore video files need to be highly compressed to make the files small enough to be suitable for web use or viewing on devices such as iPads or on your SmartTV.

At the time of writing the H.264 MP4 (MPEG4) is the most widely used compression format (CODEC). It’s supported by all the main web video platforms such as YouTube and Facebook. All SmartTVs, tablets and computers can also play properly encoded H.264 files. Video editing and encoding software can convert compressed and uncompressed videos into H.264 MP4 files.

Exploit the power of a graphics card for video encoding

The CPU (central processing unit) is the brain of the computer – a modern CPU can do all the processing including the graphics processing. On a very fast modern computer you can expect to compress video quicker than realtime – around 10x faster in some cases so an hour of footage can be converted in a few minutes. However, on less powerful computers encoding can take quite a while and because the computer is working flat out it’s not much use for anything else. Some modern computers have a CPU that support hardware assisted video encoding. Intel i5 and i7 CPUs have QuickSync video processing technology which does speed up some types of encoding.Graphics intensive computing such as computer games or video encoding require a huge amount of computing power. A GPU (Graphics Processing Unit) is a specialised plug-in card that works alongside the CPU but is dedicated to processing complex graphics. Video game graphics has seen massive increases in GPU computing power requirements with high end GPUs costing several thousand pounds. Modern GPUs include many features that are useful to video compression. We tested one of the cheapest GPUs available to see how much of a difference it would make to video encoding speed on some otherwise slow computers.

Hardware and software used for testing

i5 with GTX750Ti GPU

We took three Windows 10 64 bit computers with the following specifications:

Intel Celeron 1073u CPU, 4GB RAM, PCIe Firewire & USB3.0 cards
Intel Pentium E5800 CPU, 4GB RAM, PCIe Firewire & USB3.0 cards
Intel i5 3740 CPU, 8GB RAM, PCI Firewire card

GPUs tested were the Nvidia GT710 1Gb DDR3 and Nvidia GTX750Ti 2GB DDR5

We also ran one test on an edit machine i7 2600K ,16GB RAM, GTX750Ti GPU

All tests except one were done with Avidemux 64 bit Open Source video conversion software to conduct the tests. Avidemux includes support for Nvidia GPU video encoding. We converted a PAL DV AVI video file to H.264 MP4 with a 12×12 border applied and a de-interlacing filter. Software encodes were left at the default H.264 data rate of around 2.5 to 3Mb/s. Hardware encoding allowed us to specify a target data rate of 2.5Mb/s with a maximum of 3Mb/s. These tests were conducted in a non-scientific way and are therefore not intended to serve any purpose other than to share the findings of our in-house experiments.

Avidemux is updated frequently. Check their website and forums for current builds and issues.

Video encoding results


Avidemux test results

All three test machines were tried with no GPU, the GT710 and the GTX750Ti (where possible). The Celeron machine couldn’t support eh GTX750Ti due the low output of its power supply. The i7 machine is one of our edit systems and was benchmarked for reference only – no other configurations were tried on that machine.

The results show us that the Celeron and Pentium machines were pretty much useless without help from a GPU. The Celeron couldn’t run the 750Ti but the Pentium showed a modest gain with the GTX750Ti over the GT710. One anomaly was that the Celeron seemed to outperform the Pentium with the GT710 installed. It’s possible that the Pentium was bottlenecked by other factors such as hard drive speed or other system speed limitations.

The i5 machine saw an almost equal boost in performance from either the £23.00 GT710 or the £90 GTX750Ti. Again this is likely to be a limitation of other system hardware such has hard drive read/write speed.

The i7 machine was tested just to see what it could do – it has faster drives and a faster, hyper-threading CPU so it was no surprise that it produced the best results.

Lessons learned from our little tests

A cheap GPU can significantly speed up the encoding performance of a low powered computer and make it truly useful. A mid-range computer also benefits from a decent performance boost but adding a higher specification card might not be worthwhile if the system is throttled by other factors such as hard drive speed. If you want a super fast machine the an i7 with a decent GPU and fast drives will do the trick (but cost a lot more).

Finally, it’s important to consider disk access, read and write speeds. If you use a computer with a single hard drive (a traditional spinning drive) then you may find the MP4 compression process is restricted by the hard drive itself. Put simply the graphics card churns out the data faster than the computer can record it back to the hard drive. A fast second hard drive – either internal or external (USB3.0) will negate the problem and allow the CPU+GPU to work much faster. In our tests encoding to an external drive (a low cost SSD) made a dramatic improvement to the number of frames per second being processed compared to using a single internal hard disk drive.

5 thoughts on “Speed up H.264 encoding with a budget GPU

  1. amellon

    Hi there,
    with GT710, Avidemux 2.6.13 and Windows 7 64 bit, I cannot make the GPU take the load the encoding at all. What am I missing?

    1. Gavin Gration Post author

      We don’t do AvideMux support but here’s the settings we use.

      If you haven’t done so already then make sure you have the latest Nvidia drivers for the GPU and the current version of AvideMux 64bit. Do NOT use default Microsoft drivers for the GPU – download them directly from Nvidia.

      In the Video Output settings select H264(ff/nvidia) to use the GPU. Set the data rate using the Configure option. Set the Audio Output setting to AAC(lav) and use Output Format MP4v2 Muxer.

      Those are the options we used. Our systems are set to ONLY use the Nvidia GPU. If you’re on an i5/i7 and also using the built-in CPU Graphics then it may not work – I haven’t tested that configuration.

  2. amellon

    Thanx for your prompt reply. The problem is that the H264(ff/nvidia) option is not available with my configuration. I don’t know why. Latest nvidia drivers are used and latest AvideMux 64bit. I will check it out. Thanx anyway.

  3. amellon

    Problem solved. It seems that Avidemux 2.6.13 supports not H264(ff/nvidia). Version 2.6.12 does.


Leave a Reply

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