Video encoding using GPU – Part 2

Video encoding using GPU – Part 2

By Kennet Eriksson, Björn Isakson and Kojo Mihic

GPU hardware codecs

AMD, Intel and Nvidia all have dedicated hardware video decoders and encoders on their graphics cards able to handle some of the most popular codecs.

 Both AMD, Intel and Nvidia hardware encoders can be called from within the FFMPEG media frame work and also from within some encoding applications like Adobe Media encoder. Before you start experimenting with hardware encoders, make sure you know what chip-set you got and also make sure to have the correct SDKs installed. Be aware of that the technical feature set is not as complete as it is with more mature codecs like x264 and x265.

Speed vs Quality

The real winning with hardware encoders is the speed performance, leaving the CPUs to do other tasks. The encoders from the vendors mentioned above in this post all outperforms x264 and x265 in speed for similar jobs. But when it comes to picture quality, x264 and x265 got a more complex feature set for professional video encoding and can generate better visual quality in lower bit rates.

As mentioned in earlier blog post there are drawbacks to keep in mind when working with hardware encoders. For example, the Nvidia HEVC encoder (at this time) has no support for b-frames nor 4:2:2 chroma subsampling and the decoders only support 4:2:0 chroma subsampling. From the very beginning the Nvidia codecs was aimed for game streaming, but the quality nowadays is at pro level, at least in higher bit rates.

Mezzanine encoding

In the transcoding industry, there is sometimes need for a mezzanine file transcoding. Especially when working with 4K distribution it’s most times more efficient to make downstream transcodings from a mezzanine file then directly from the source file. And here is one area where GPU hardware encoders can be used to save some transcoding time. Using GPU encoded HEVC files as a mezzanine format works quite well since the bit rate is not that important for mezzanines, and for downstream transcoding HEVC decode can also be accelerated using the GPU decoders.

Color space conversions

One problem we’ve seen so far using Intel Quick Sync encoders is color space conversions going bananas. We are right now testing Quick Sync in our lab environment but haven’t yet found the reason why the color space conversions go wrong sometimes. This is something we might get back to at a later time.

Is it easy to set up?

The Nvidia encoders works very well in Windows 10 with the latest drivers.

Getting Nvidia-cards to work in macOS is a bit of a challenge since Apple only support AMD GPUs natively. Also, you need minimum macOS High Sierra 10.13.4 to get eGPU support at all. But don’t go up to macOS Mojave 10.14, because there are no drivers for Nvidia using Mojave at this time. Also make sure you have a Thunderbolt 3/USB-c connection since Apple dropped support for eGPU using Thunderbolt 1 or 2. There are third-party hacks to make it work, but the time you will spend on getting that to work will probably cost you more than just buying a new Windows PC.

 Quick sync was a bit more challenging but after some hacking we got it to work on CentOS, Windows 10 and Mac OS (the qsv-encoders used inside Videotoolbox on Mac). Quick Sync encodes are not as fast as the Nvidia encodes, but still faster than CPU encodes with similar settings. But as mentioned before. The feature set is limited for complex encodings

 AMD encoders works fine on Mac OS. Unfortunately, we haven’t had the opportunity to test AMD graphic cards in Windows or Linux machines. The best speed bump was when encoding h264. For HEVC encodes the AMD GPU performs slower compared to Nvidia and Intel.

Let’s talk

At Pixlo we have done quite much experimental lab-testing with GPU encodings lately and would love to share our knowledge with different parts of this industry to validate all kind of workflows, set-top-boxes, TV sets, devices and web players where GPU encode or decode would fit in. Get in contact with us for further discussions!

Abbreviation, acronym and initialism

  • 4K UHD A video pixel resolution of 3840x2160 pixels
  • B-frame Bi-directional predicted picture. Can use information from earlier and later video frames to predict how to save data in macro blocks or coding tree unit blocks
  • CPU Central Processing Unit (the brain of the computer, often called Processor)
  • CRF Constant Rate Factor (Quality based video encoding found in x264 and x265)
  • eGPU External GPU
  • GPU Graphics Processing Unit (the brain of the graphics card used in a computer environment)
  • HEVC NVENC Another H265 video encoder
  • i7 Intel Core i7 microprocessor
  • SDK Software Developer Kit
  • QSV Intel Quick Sync Video
  • x265 An H265 video encoder

About Pixlo

The evolution of the media landscape leads to new requirements on content providers. The number of IPTV and OTT platforms offering VOD and TV-anywhere are growing. The demand for fast and accurate deliveries of media assets are increasing.

Pixlo is here to take complete care of your media asset during the whole process from acquisition, transformation to delivery. Hereby we help you maximize the profits from your content.

  • Handles EST, TVOD, SVOD. Certified for Pre Release handling by HBO, Stars, Fox, CBS, Showtime. Qualified by all major studios for home entertainment. 
  • Hundreds of clients around the world onboarded, including all Nordic TV and streaming platforms. Approved by international streaming giants like Netflix, Amazon, Google, Xbox and PlayStation. 
  • Agile approach. Proven track record of large-scale delivery projects and acknowledged as universal problem solver. 
  • Offers modular workflow tools tailored after customers’ needs. Suitable for complex deliveries to multiple platforms.











To view or add a comment, sign in

More articles by Björn Isakson

  • Increased demand for older video content

    By Magnus Hoem and Björn Isakson The over-all effects on our society from the COVID-19 outbreak are still to unfold but…

    2 Comments
  • It is time for HDR! Can’t wait anymore!

    By Kennet Eriksson, Björn Isakson and Kojo Mihic The industry has promoted it for years, but the market has not been as…

    10 Comments
  • GPU vs CPU encoding - Part 1

    By Kennet Eriksson, Björn Isakson and Kojo Mihic There is no secret that GPU outperforms CPU processors when it comes…

    3 Comments
  • 4K UHD - Challenging standard

    By Kennet Eriksson, Björn Isakson and Kojo Mihic Abstract Nowadays, when buying a TV set, it is hard to find something…

    3 Comments
  • HDR - The bright future is here

    By Kennet Eriksson, Björn Isakson and Kojo Mihic HDR - what does it give us? If you are shopping for a new TV set you…

    2 Comments
  • IMF – Interoperable Mastering Format, for local markets

    By Kennet Eriksson, Björn Isakson and Kojo Mihic Abstract In this article we address the implementation of IMF in…

Others also viewed

Explore content categories