Skip to main content
June 28, 2013
Question

NVidia GPU-accelerated H264-encoder plugin, ready for public testing

  • June 28, 2013
  • 100 replies
  • 389835 views

Hi all,

I have written a 'proof-of-concept' GPU-accelerated H264-encoder for Adobe Media Encoder (CS6).  It requires an NVidia 6xx/7xx series "Kepler" GPU (CUDA capability 3.0), and uses the dedicated GPU's builtin hardware-encoder (NVENC) to offload the H264-encoding process from the host-CPU.  This software is "proof-of-concept", so it's missing some critical features (no interlaced-video support, no AAC-audio or Dolby AC-3 audio), and of course, it could be buggy!  But it's free.

!!!! Disclaimer: NVENC-export is third-party software that is not supported by either Adobe or NVidia.  It comes with no warranty -- use at your own risk.

Software/hardware Requirements:

(1)Adobe Premiere Pro CS6 or Media Encoder CS6 (Windows version)

Sorry, MacOSX is not supported. (NVidia NVENC SDK doesn't support MacOSX.)

(1)NVidia Kepler GPU <GKxxx> with 1GB VRAM or more  (GTX650 or above, GT650M or above)

(Sorry, NVidia Fermi <GFxxx> is NOT supported, it doesn't have the NVENC hardware feature)

Note,if you have MPE-acceleration enabled, keep in mind the NVENC-plugin consumes some additional VRAM because it uses your GPU to perform H264-encoding.

Strongly recommend a 2GB card

(2) Microsoft Visual C++ 2010 SP1 x64 redistributables

          (download this from Microsoft's website)

Installation instructions:

     In Adobe Premiere Pro CS6:

     (1)      On your system, locate the installation-directory for Premiere Pro CS6.

               Usually, this is C:/Program Files/Adobe/Adobe Premiere Pro CS6

    (2)     Copy the included file Plug-ins/Common/nvenc_export.prm

               to <installation dir>/Plug-ins/Common/

     -> To choose the NVENC-plugin in Premiere Pro,

          In the format-menu, select <NVENC_export>

     In Adobe Media Encoder CS6:

     (1)    On your system, locate the installation-directory for Media Encoder CS6.

          Usually, this is C:/Program Files/Adobe/Adobe Media Encoder CS6

     (2)     Copy the included file Plug-ins/Common/nvenc_export.prm

          to <installation dir>/Plug-ins/Common/

     -> To choose the NVENC-plugin in Media Encoder,

          in the format-menu, select <NVENC_export>

Performance & quality notes:

(1) How much faster is NVENC-export than Adobe's built-in Mainconcept H264 encoder?

Depends on your PC system.  On my test-system, which is ordinary desktop PC with Intel i5-3570K (4-core 3.4GHz), NVENC-plugin is roughly 4x faster than Mainconcept. On a dual-socket Xeon Ivy Bridge-E system, NVENC would probably only be 2x faster (in Media Encoder.)

(2)How does the video-quality compare?

Comparing similar settings/video-bitrate, Mainconcept performs better at lower-bitrates(less artifacts).  At medium-high bitrates, NVENC is comparable to Mainconcept.

(3) How does NVENC-export encode the video?

The plugin fetches videoFrames from the Adobe application, then converts the frames from YUV420 to NV12 surface-format (using host-CPU.)  Then it passes the converted frames to the NVENC front-end.  From here, NVENC hardware takes over, and handles all aspects of the video compression. When NVENC hardware is done, it calls the plugin to output write the elementary bitstream (to the selected filepath.) NVENC-hardware does NOT encode audio, nor does not multiplex the A/Vbitstreams -- this is still done in software (on the host-CPU)

The NVENC hardware block has very little CPU-overhead.  But since video-encoding is just 1 step in the entire Adobe rendering path, CPU-usage will likely still be quite high when using NVENC-plugin.

(4) What's the maximum-size video NVENC-export can handle?

H264 High-profile @ Level 5.1, which works out to roughly 3840x2160 @ 30fps. (Note the actual encoding-speed will probably be less than 30fps.)

(5) How fast is the NVENC-export hardware in Kepler GPU?

Assuming the Adobe application host is infinitely fast (i.e. can send video to plugin in zero-time), NVENC-hardware will encode High-profile (CABAC, 2 refframes, 1-bframe) 1920x1080p video @ ~100fps. At 3840x2160p (4k video), the hardware encode-speed drops to roughly 20-25fps.  That is still faster than a desktop PC.

NVENC-speed is generally same across the Kepler family - the high-end Geforce GTX Titan (or GTX780) is no faster than the entry-level Geforce GTX650, because all Kepler models share the same NVENC hardware-block, which is totally separate and independent of the GPU's 3D-graphics engine.

In premiere Pro 6, MPE acceleration will greatly affect how quickly Adobe can render video to the exporter.  So a more powerful Kepler GPU will probalby complete projects faster than a less powerful one (up to NVENC's performance ceiling.)  For more info, please refer to NVidia's NVENC whitepaper at their developer website (public)

(6) I have a multi-GPU setup, can I encode with multiple GPUs?

No, NVENC targets and uses only a single physical GPU.  (You can choose which one.)

Known limitations and problems:

NVENC-plugin is a 'proof-of-concept' program -- it is not a finished product.  So it's missing some features, and other things are known to be broken:

    • Interlaced video encdoing does not work at all (not supported in current consumer Geforce drivers)

    • Audio support is very limited: uncompressed PCM)

no AAC or Dolby-Digital

    • Multiplexer support is very limited: MPEG-2 TS only, using an included third-party tool TSMuxer.EXE

no MPEG-4 muxing (*.MP4)

    • When the muxed MPEG-2 TS file in Windows Media Player (WMP), there is no sound.  This is because WMP doesn't recognize PCM-audio in mpeg-2 ts files.  You have 2 choices; you can use a third-party media-player such as MPC-HC or VLC.  Or you can postprocess the audio-WAV file into a compatible format (Dolby Digital/AC-3)

    • in the pop-up plugin User-interface, the <multiplexer> tab is missing or not shown properly.

(To fix: Select a different codec, then re-select NVENC_export.)

    • Doesn't support older NVidia GPUs (GTX5xx and older, GT630 and lower)

Sorry, NVENC hardware was introduced with NVidia's Kepler family (2012)  Anything older than that will NOT work with the plugin.

This topic has been closed for replies.

100 replies

Participant
July 28, 2014

Hi! Thank you for the program. Version 1.01 works good, 1.02 too. But starting from 1.03 till 1.07 there is NO NVENC_export at the Export setting. Can you help me? Thank you.

Premiere CS6.

Participant
July 5, 2014

Thanks so much for making this. I'm using PP & AME CC 2014, with an i7-2600K CPU and a Nvidia GeForce 660 Ti video card.

When using MainConcept, spitting out a 50mbps H.264 encode, I get a ten-minute video rendered thus:

  • Using software/CPU only: 45 minutes (all CPU cores working 100%, negligible GPU usage)
  • Using CUDA engine: 20 minutes (~60% CPU usage, and around 15% GPU usage)
  • Using nvenc_export + software/CPU mode: ~45 minutes (same as just with MainConcept). I guess this means in this instance, PP cannot feed the renderer fast enough.
  • Using nvenc_export + CUDA - cannot render -- I get the message about not being able to scale, and tells me to export to 1920x1080, but this already *is* the resolution of the source footage and Premiere sequences, so I don't know what I can do here. Any help? I have a feeling this might really speed things up beyond the 20 minutes CUDA alone takes.

Thanks!

Participant
June 30, 2014

Need some help everything was working like it should but I started getting a error and mp4box stop working no mater what I do I download the dev mp4box and that did work I just don't know what to do I'm not using v106 i'm using v107

adobe premiere elements 12 64bit

Participant
May 31, 2014

For any of you with questions try this video:

It's a bit shorter than the installation tutorial so i thought it might be useful.

Participant
May 31, 2014

Ok, followed the video and listened to the instructions, reinstalled GPAC and videos come out fine and lightning fast (though only through premiere pro). However, i cannot change the resolution even by a single pixel in either direction or it throws up an error.  Why is this?

Participant
May 31, 2014

Known problems:

(Same limitations as previous versions.)

(1) If MPE hardware-acceleration (CUDA) is enabled in Premiere Pro or Media Encoder, then nvenc_export cannot resize the source-video to a different output-size.  You must make sure the source-video size and output-video size are the same, otherwise the video-encode will fail.  (Alternatively, turn off MPE hardware-acceleration.) I suspect this is caused by Adobe's hardware MPE-renderer not supporting resize-operations on the PrPixelFormat_YUV_420_* surfaceformat, which is requested by nvenc_export.

Question already been answered. As the tutorial says read the page.

May 28, 2014

Thank you for taking the time to develop this encoder.  I followed all the directions and the videos you put up on YouTube, but somehow when I export a video from Premiere to AME and go through all the settings it only wants to export it as an AAC.  Once in AME if I click on the file that's in line to be encoded to try to change the settings the "Export Video" option isn't there and the NVENC_export format is not there.  It is there in Premiere but not AME.  I did put the nvenc plugin in the Premiere/Plugins/Common folder and also the same plugin in the MediaEncoder/Plugins/Common folder too but somehow it's not working.  so no matter what I do if I export a video it always just gives me the AAC.  I've also tried both MP4 and TSmuxer but the results are the same.

What am I doing wrong?

May 28, 2014

BTW I have a Quad-core 920 with a Nvidia GeForce GTX 660 Ti

Participant
May 25, 2014

Matt here...

After an exhaustive google search which was leading me in circles, i greatfully landed on this thread and have followed everything the best i could (as i read, i downloaded each new version until the very end).  However, i'm having a few difficulties with making everything run properly and so i got my account working here and have come with some questions.  I got the plug-in and other add ons in the correct locations and have pointed media encoder to see everything. However, i'm getting error messages and or the GPU is not being utilized (i've seen a single spike of like 3%.)

I've got the follow specs:

windows 7 ultimate x64

16 GB of RAM

Core 2 Quad

GeForce GTX 650 Ti (768 cores, 2 GB of VRAM)

and PLENTY of hard drive space.

I know enough to get into trouble and know enough to fix it.  But i'm not so good with finally finding a possible solution and just as i taste victory, hitting a dead end. I'm going to be trying a few different combination of settings with the encoding to see if i can't get some sort of GPU response.  I've got the MP4Box on the machine, the NeroAaaEnc thing on the machine and currently installing the visual C++ redistributable mentioned above (googled it to make sure i had it).

EDIT/UPDATE:  5 minutes later, after a reboot and trying a few different combinations, i found one that went through the conversion process well enough. It took media encoder about 5 minutes to go through it (only CPU utilization) and about another minute or so to process the audio.  This is a significant cut down in time from the 30 to 40 minutes i was waiting with to about 7 minutes total.  But, what confuses me is that it didn't touch the GPU, only the CPU.  Is this plug-in supposed to touch the GPU and use more than 3% or just the CPU?

EDIT/UPDATE 2: after finding a faster conversion (its about 10 minutes), MP4Box crashes when combining the files. I moved the exe to its own folder, etc. currently going back to the old method of 45 minute conversions.

June 14, 2014

A little late with this post;
To explain why your CPU is still being used 100% (or near there), it is because audio is not GPU-accelerated and is being done by the CPU. Also, some of the data still has to be processed by the CPU- the GPU is only accelerating the process through the NVENC block on your GPU; this block is actually a very small portion of your GPU and does not relate to 3D rendering, and thus your GPU reports that it is using a very small amount of its total power.

Known Participant
February 12, 2014

Thanks, any chance for a mac version?

Participant
August 15, 2013

This is awesome, keep working on it. I'm trying it out right now, so I'll come back with comments once my test video is done!

Inspiring
August 3, 2013
June 28, 2013

Download link:

...Whoops, I knew I forgot something ...

This is hosted on Google-drive:

     Version v1.01 (June 27, 2013) - https://docs.google.com/file/d/0B96CRWkNxmWdSElqaDhZOXV6T3M/edit?usp=sharing

When you click on the above link, it will open the contents of the ZIP-container (nvenc_export_v101.zip)

Don't download the individual files, you'll want the whole ZIP file:

July 13, 2013

NVENC_export Version v1.02 (July 13, 2013) is now available -

  • Now supports exporting to *.MP4 file (requires third-party tool MP4Box.EXE)
  • Now supports AAC-audio (requires third-party tool NeroAacEnc.EXE)
  • No longer includes TSMuxer.exe (you must download that separately)

Download link:

     NVENC_export Version v1.02 (July 12, 2013) - https://docs.google.com/file/d/0B96CRWkNxmWdLTF2Z3N1TGUtYVE/edit?usp=sharing

     NVENC_export Version v1.02 (July 13, 2013) - https://docs.google.com/file/d/0B96CRWkNxmWdLVRWeFNXWEh4NVE/edit?usp=sharing

When you click on the above link, it will open the contents of the ZIP-container (nvenc_export_v102.zip)

Don't download the individual files, you'll want the whole ZIP file:

Third party tools:

(1) NVENC does not include built-in multiplexing.  If you wish to output *.TS or *.MP4 files, you must download and install the following third-party tools:

(2) To enable AAC-audio output, you must download and install NeroAacEnc.

Known problems:


Unfortunately, the <Multiplexer> tab sometimes shows up without the label/description.  It still works, but see the picture below.  (Look to the left of the <Video> tab.)

[Edit]: <July 13 release> should fix this problem.

Message was edited by: nvenc4everyone (update to July 13 release)

Message was edited by: nvenc4everyone (fix download-link to July 13 release)

ElDorito
Participant
February 9, 2015

NVENC_export Version v1.09 (Feb 2, 2015) is now available -

  • [1.09] For Maxwell Gen2 GPUs (Geforce GTX960 and up) - add support for  HEVC Main Profile (YUV 4:2:0, 8bpp)  NVENC HEVC doesn't support some features (for example: no bframes, no interlaced video.)

  • [1.09] Add support for another external muxing tool, MKVmerge.  (This is mainly to handle HEVC and H264_HiP444 video, because TSmuxer and mp4box seem to have frame-dropping or random-seek problems with NVENC's output.)

  • [1.09] Fix mp4box muxing bug that caused the mux operation to fail (without writing anything) when the output file's dirpath contained spaces.

  • [1.09] Hopefully rate-control problems that happen @ 4k resolution.  Apparently, the NVENC driver API needs minQP and maxQP to be turned on for all rate-control modes (you don't need to adjust these, just use the default value of 0 & 51.)

  • nvenc_export requires Geforce driver 349.07 (Dec 2014) or later

Download link

NVENC_export Version v1.09 (Feb 2, 2015) - https://drive.google.com/uc?export=download&id=0B96CRWkNxmWda3B4RnA0MlRWMDQ

  • You will also need to download and install the following item from Microsoft:

"Visual C++ Redistributable for Visual Studio 2013 Update 4"

(2) To enable AAC-audio output, you must download and install NeroAacEnc.


  Known problems:

(Same limitations as previous versions.)

(1) In Adobe Premiere CC 2014 and Media Encoder CC 2014, the 'Export Audio' option is permanently enabled.  (This seems to be a problem between the Adobe CC SDK and CC2014;  it didn't happen in last-year's release.)

(2) NVENC does not include built-in multiplexing.  If you wish to output *.TS or *.MP4 files, you must download the third-party tools mentioned above.

(3) If encoding to interlaced-video, you must set the Field Type to Upper First. Other choices will cause the plugin to crash, or generate a bad (unusable) file.

(4) NVENC does not support (AC3) Dolby Digital audio, only PCM.  (If you separately download and install NeroAacEnc, then AAC-audio is supported.)

(5) High_Profile_444 output can cause problems with TSMuxer and MP4Box (stuttering video, or even unreadable video.)  And not all encoder options function correctly in High_Profile_444 (some options are ignored, others cause unreadable output.)

Source code link

This section is only for software-developers who are interested in recompiling nvenc_export.The C++ source-code can be downloaded from the following link


NVENC_export Version v1.09 SRC (Feb 2, 2015) - https://drive.google.com/uc?export=download&id=0B96CRWkNxmWdSGxXX1pudTEwNzQ

(nvenc_export is distributed under the LGPL license.)

I must apologize for the condition of the source-code.  I'm not a professional software developer, so some dir/paths might not work correctly out-of-the-box.  You'll need to know your way around Windows application development to fix some basic compile environment issues (for example, "d3dx9.h missing".)


     Also, you will need the following items (not included in the above link) to recompile NVENC_export:

  • Microsoft Visual Studio 2013 Pro (with Update 4)

This can be downloaded for free, through Microsoft's "BusinessSiteSpark" program.

  • Microsoft DirectX SDK (June 2010)

Download it from Microsoft

  • NVidia CUDA 6.5, NVENC 5.0, and NVAPI SDKs

Download them from NVidia

  • Adobe Premiere CS6 SDK

Download it from Adobe

(edit fix formatting)


I am stuck.

I have downloaded the v1.09 of the nvenc export plugin, but it isn't showing up in my Premiere. I installed the Visual C++ Redistributable, and moved the plugin into my Premiere folder, but it isn't showing up when I go to export!

System Specs:

Intel i5 4670 CPU

MSi GTX 760 GPU

8GB RAM

Premiere Pro CS6

Any way you can help?