Skip to main content
June 28, 2013
Question

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

  • June 28, 2013
  • 100 replies
  • 389793 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

TyV28
New Participant
February 9, 2016

I seem to be having issues with MP4box, I can get AME CC to encode the video as I can see it in the preview but once it comes to actually creating the file MP4box crashes no matter what version I use.

I'm using the latest x64 version of MP4box

NVENC 1.09

359.06 drivers (361 has a monitor hz bug)

Windows 10

lk58361083
Participating Frequently
February 9, 2016

try 1.11
the 1.09 outdated for your configuration

TyV28
New Participant
February 9, 2016

I tried that and couldn't seem to get it recognized, I'll try again but 1.11 shouldn't fix the issue with MP4box will it?

jstabb
Participating Frequently
January 27, 2016

Hopefully nvenc4everyone sets up a code repository (GitHub or otherwise) so that people can contribute fixes to a central location.

But in the meantime, here's a version that is based on 1.11 and includes the following changes:

- Fixes mp4box.exe crash from MediaInfo text being encoded in the file (Thanks to irisb50359875 for describing their fix)

- Fixes still images having only one frame rendered (which also caused audio/video to fall out of sync)

Zip file contains x86 and x64 binaries, but only the x64 binary has been tested. You can download it here (nvenc_export 1.11 - j1.zip).

January 31, 2016

jstabb wrote:

Hopefully nvenc4everyone sets up a code repository (GitHub or otherwise) so that people can contribute fixes to a central location.

But in the meantime, here's a version that is based on 1.11 and includes the following changes:

- Fixes mp4box.exe crash from MediaInfo text being encoded in the file (Thanks to irisb50359875 for describing their fix)

- Fixes still images having only one frame rendered (which also caused audio/video to fall out of sync)

Zip file contains x86 and x64 binaries, but only the x64 binary has been tested. You can download it here (nvenc_export 1.11 - j1.zip).

Your version doesn't show up for me when trying to export a video.  Version 1.11wb shows up fine, but when I copy your file into the directory it disappears in the program.  When I copy 1.11wb back, it returns to normal in the program.

The problem is, version 1.11wb has the issue with still frames, so it's unusable.  Your version would be perfect.  I'm not sure how creating plug-ins works, because you say x64 was tested, but I'm on the latest versions of CC and Nvidia drivers, with Windows 10 x64 if that matters.

lk58361083
Participating Frequently
February 3, 2016

Sorry, I don't know how else to help you. I'm running 361.43 drivers on Win10 and everything works fine. Unfortunately I don't have access to a Win7 machine with an NVidia video card, so I can't try it out under a debugger. Maybe nvenc4everyone or irisb50359875 could.

Best of luck.


can you recompile 1.09 with NVENC 6.0 (for new nvidia drivers)? so we will be able to verify that the problem is not in the nvenc_encoders code.

Justaway
Participating Frequently
January 19, 2016

I got another problem now... I get slight audio delay when muxing into mp4 w/ mp4box. I tried encoding with standart H264, and there is no delay.

jstabb
Participating Frequently
January 27, 2016

Do you have a still image in your timeline? The plug-in has a bug where it only encodes one frame of a still image rather than the whole duration it's supposed to be shown, which causes a/v to fall out of sync. A workaround is to set an effect keyframe (on say, opacity) on the first frame of the still image.

Justaway
Participating Frequently
January 27, 2016

Well, the thing is I don't hve still images. I have text, I have multiple sounds, but I don't have still images;(

New Participant
January 15, 2016

Hi guys, I'm new to this encoding thing. It's working fine for me but can I just check whether SLI GPU usage is possible? And what's the usual GPU Utilization? Mine's at 13%. Is there a way to increase this to speed things up?

January 15, 2016

Encoder doesn't support SLI configuration. You can choose only one GPU for rendering. I know what you think. I can't use my second Titan X as well :(

jasonvp
Inspiring
January 15, 2016

ZiggyGG wrote:

Encoder doesn't support SLI configuration. You can choose only one GPU for rendering.

Yeah, I thought I'd read that the NVidia API for the HVENC doesn't even support SLI at all.  And if that's actually the case, then there's no way to write an encoder (like this one) to do it.

Participating Frequently
December 27, 2015

Updated to new version of Premiere, After Effects and Adobe Media Encoder... and the plugin is no longer works! It said: "Error: GPU is not support NVENC encoding"...

Tried the new version of this plugin (1.11), installed latest driver from Nvidia... Still the same!

It still creates the video though, but I'm not sure which encoder it uses!

New Participant
December 28, 2015

I have the same when I start exporting to AME...

9f154e801f.jpg

as you can see, Error: GPU does not support NVENC encoding...

2a10b3c14e.png

Using:

Windows 10 Pro (x64)

GTX 980

Premier Pro CC

MarkWeiss
Inspiring
December 29, 2015

Same problem with the MP4Box crash but even when I revert back to the old NVENC it crashes. Probably the graphics driver. Rolling back to the old 355.82 driver that worked..

New Participant
December 23, 2015

Error - the plugin ins invisible in the format selection menu,
only the old version works, but it gives me a compile error.

I've tried to install all the "Visual C++ Redistributable i could find, but i havent found a specifically ""Visual C++ Redistributable 2013 update 5", anyway, i've installed the latest 2013&2015 versions i could find online.

thanks for your work!

December 26, 2015

I returned to v109. For this it's necessary to install old NVidia driver.

In Premiere it works but not in AE - "error GPU"

Known Participant
December 18, 2015

....Sadly i have formatted my PC to Windows 10 and now the newest version of the program is on, disabling the plugin...

Does somebody knows a work around for this,please?..And if possible, links to the required files and instructions from beginning to end on how to do it the new way, please?

It's the only thing left to do for me !!

Thanks in advace

December 18, 2015

I'm using that plugin on Windows 10. Few post back is my setting things up instructions. Check it.

Known Participant
December 19, 2015

Maybe the nvenc_export file is what's failing, because i've done everything you've put there and gives me the same error

domoLindog
New Participant
December 11, 2015

Hi, I'm getting a 'low-level exception' error every time I try to render a video. Why is that? My NVEnc detects my GTX 970 nicely and my settings are optimal. This is the first time this has happened. I hope somebody can help.

New Participant
December 6, 2015

Virus warning...

guys!

Be careful!

The B version contain a Trojan virus.

Category: Trojan

 

Description: This program is dangerous and executes commands from an attacker.

 

Recommended action: Remove this software immediately.

 

Items:

nvenc_export_b.prm

http://www.microsoft.com/security/portal/threat/encyclopedia/entry.aspx?name=Trojan%3aWin32%2fSpursint.A&threatid=2147705703&enterprise=0

So the nice life of this plugin is end?

Tested on:

Microsoft Defender, Norton Antivirus, AVG, NOD32

New Participant
November 30, 2015

Does not work for me, does not seem to be utilising much GPU and my CPU is running at 100%.

Using 980ti on windows 10.

Whats the best driver to use? probably pre windows 10 anyway so wont work.