Skip to main content
Jun 28, 2013 6:39 AM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

421 replies

TyV28
Participant
Feb 9, 2016 5:11 PM UTC

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

Translate
lk58361083
Participating Frequently
Feb 9, 2016 5:52 PM UTC

try 1.11
the 1.09 outdated for your configuration

Translate
TyV28
Participant
Feb 9, 2016 6:10 PM UTC

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?

Translate
jstabb
Participating Frequently
Jan 27, 2016 5:43 AM UTC

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).

Translate
Jan 31, 2016 1:14 PM UTC

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.

Translate
jstabb
Participating Frequently
Feb 2, 2016 2:14 AM UTC

Oops, it looks like I included debug binaries by mistake. Here's a new link with release binaries: nvenc_export 1.11 - j2.zip

Sorry about that.

Translate
Justaway
Participating Frequently
Jan 19, 2016 5:01 PM UTC

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.

Translate
jstabb
Participating Frequently
Jan 27, 2016 4:56 AM UTC

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.

Translate
Justaway
Participating Frequently
Jan 27, 2016 8:45 AM UTC

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

Translate
Participant
Jan 15, 2016 5:14 PM UTC

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?

Translate
Jan 15, 2016 8:18 PM UTC

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 :(

Translate
jasonvp
Inspiring
Jan 15, 2016 11:43 PM UTC

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.

Translate
Participating Frequently
Dec 27, 2015 2:09 AM UTC

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!

Translate
Participant
Dec 28, 2015 3:28 PM UTC

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

Translate
MarkWeiss
Inspiring
Dec 29, 2015 2:05 AM UTC

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..

Translate
Participant
Dec 23, 2015 11:03 PM UTC

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!

Translate
Dec 26, 2015 8:01 PM UTC

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

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

Translate
Known Participant
Dec 18, 2015 10:57 PM UTC

....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

Translate
Dec 18, 2015 11:59 PM UTC

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

Translate
Known Participant
Dec 19, 2015 6:08 AM UTC

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

Translate
domoLindog
Participant
Dec 11, 2015 5:12 AM UTC

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.

Translate
Participant
Dec 6, 2015 12:24 PM UTC

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

Translate
Participant
Nov 30, 2015 5:30 AM UTC

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.

Translate