2 Replies Latest reply on Mar 18, 2013 10:56 PM by nvenc4everyone

    Support for NVidia GPU hardware H.264 encoder (NVENC)?

    nvenc4everyone Level 1

      The latest NVidia GPU architecture, Kepler, now has a dedicated hardware H264 acceleration block, NVENC.

       

      It is similar in function/purpose to "Intel's Quicksync" (except that Quicksync works with more codecs: MPEG-2, VC-1, and H264.  NVENC only supports H264 encoding.)  The company claims the hardware-block can encode 1080p video much faster than the host-CPU alone (probably at the loss of some image quality.)  This feature is supported on desktop NVidia GPUs with the model GT640, GTX6xx.  And in laptop NVidia GPUs GT640M, GT650M, GT680M (and a few others.)

       

      Does Premiere Pro CS6 take advantage of NVENC?  If not, are there any third-party plugins that add NVENC-support to CS6?

       

      If not, I'd like to try writing a plugin that uses NVENC, though that'd definitely be an ambituous undertaking!

        • 1. Re: Support for NVidia GPU hardware H.264 encoder (NVENC)?
          Jim_Simon Level 8

          I don't believe there's any way to make this work using Adobe tools.  You'll probably need to use an encoder from another company.

          • 2. Re: Support for NVidia GPU hardware H.264 encoder (NVENC)?
            nvenc4everyone Level 1

            I have finished a 'proof-of-concept' NVENC Exporter plugin for CS6.  This took much longer than I thought it would (mostly due to my inexperience in interacting with Adobe's 'suite' API.)  And the beta-plugin is very rough around the edges (no audio or muxing support), and needs some further speed-optimizations, but works well enough for me to start basic testing and behavior characterization.

             

            ------------

             

            The following comments are based on my proof-of-concept NVENC-exporter plugin, run on a Geforce GTX650 1GB. The plugin is compiled from the NVidia NVENC Public Beta SDK 2.0 (Dec 2012) and Geforce 314.07 drivers (Feb 2013).  The programmer-API to access NVENC is protected by a license-key.  The SDK comes with a free trial-key, but doesn't indicate how it compares to a (purchased) retail-key (i.e. does it perform the same but with restricted features/functionality, or does a retail-key offer higher quality encodes?)

             

            First off, how is the video image-quality (compared to the MainConcept H264 that Adobe bundles with CS6)?  Based on naked-eye comparisons, NVENC is anywhere from slightly to somewhat worse.  As such, since the quality delta was easily discernable at all bitrates, I didn't find it necessary to take objective psnr measurements.

             

            (1) At "low bitrates" (eg. 6mbps or less at 1920x1080 24fps), NVENC is noticeably worse than Mainconcept.  The fixed GOP-pattern (group-of-picture) really kills the output-video at scene-transitions, because the encoder doesn't make intelligent decisions about where to place reference-frames.

             

            (2) At "high bitrates" (eg. ~25mbps for 1920x1080 24fps), NVENC is slightly worse than Mainconcept, though now the two are almost neck-to-neck.  NVENC seems to have problems tracking very subtle color transitions.  For example, on animated/computer-generated scenery (like a Disney cartoon), NVENC had shows a tendency to introduce blocking artificats into sky gradients and other tonal-gradients.  Mainconcept was much better in this regard.

             

            Next, what about speed?  Speedwise, NVENC easily wins (as expected.)

             

            (3a) For 1080p video, NVENC consistently finished straight "media-export" jobs in Adobe Media Encoder (i.e. straight "in to out" without any adjustments/changes to the source video) roughly 3x faster than the Mainconcept H264-Bluray codec.  For example, NVENC needed 30 seconds to re-encoded a 120second Bluray clip.  Mainconcept usually took 90 seconds.  (Both encodes were single-pass VBR; run as video-only, no audio, no muxing.)

             

            (3b) for 3840x2160 video, NVENC's speed-advantage shrinks to roughly 2x. (This is likely due to a very slow hostmem-hostmem frame-copy operation inside my plugin.)

             

            (4) NVENC CPU-usage hovers between 30-40% during the Adobe Media Encoder session.  Mainconcept always used near 90-100% CPU.  (My machine is an Intel i5-3570K 4-core CPU.)  If someone were comparing NVENC/Mainconcept on a 2-core laptop, the speed-difference would be closer to 6x.  Even so, NVENC falls behind Intel's "QuickSync" technology (unfortunately, Intel doesn't offer a Quicksync exporter-plugin for CS6.)

             

            In summary, in its current state NVENC isn't good enough to replace MainConcept in the content mastering and final encode process.  But many users may find it useful as a 'quick preview tool'; to generate fast encodes for a bunch of different edit/cut tests (with the intention of throwing most of them away.)