Skip to main content
June 28, 2013
Question

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

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

Participating Frequently
July 10, 2015

Hi, i have this problem:

Can you help me please?

I use Adobe Media Encoder CC 2014.2

My pc:

i5 4690

gtx970

ram 8gb

Participant
July 8, 2015

When I am trying to start NVENC Encoding in Premiere Elements 11 it goes straight to 100%, creates a 0kb Video File and says, there was an error while creating the video file. How can I fix this? I know its not recommend to use Premiere Elements 11, but CPU rendering is still much slower.

irisb50359875
Participating Frequently
July 5, 2015

Short update of my last post: the problem with the wrong image-height in the header files of HEVC output seems to be a problem with

the muxers. Using the latest versions of mp4box and mkvmerge is correcting that - in my test footage the correct size is now written into

the header and MediaInfo is displaying it properly.

Known Participant
July 5, 2015

However that doesn't responds the issue about the Exporting's "Time Left freezing" part

irisb50359875
Participating Frequently
July 5, 2015

Is anybody else having new problems with this latest iteration of the plugin? I am only able to test some H.264 (with GTX 670 and GTX 960)

and HEVC/H.265 (with GTX 960) footage under CS6 and that works flawlessly. If you do experiencing problems, you should try to reproduce

them with my settings you find above and report your specific HW and SW environment.

irisb50359875
Participating Frequently
July 3, 2015

Here is another slightly improved version of the plugin:

https://drive.google.com/file/d/0BwViiZKy_eFpWHhHY0dIak1oNkk/view?usp=sharing

There are still some problems with the plugin - e.g. outputting with the HEVC codec is writing the wrong image-height into the header of the file

(1088 instead of 1080 and 2176 instead of 2160). I have not yet found the position in the source code in order to correct that.

But for example MPC-HC seems to play the file correctly by not using the wrong image dimensions from the header.

Be aware that this is still a "proof-of-concept" plugin as nvenc4everyone stated it - and it might be rough at some edges.

I am mostly using the following H.264-settings and outputting aac/mp4 audio and only change the vido-settings
under NV_ENC_PRESET, NV_ENC_LEVEL_H264 and under the  "Sample basic video param group":

With these settings I do get file sizes comparable to what the original Adobe-Encoder (Mainconcept) delivers. 

Known Participant
July 3, 2015

Hmmm it's been a loooong time i haven't seen the "Max/Target bitrate mbps" option, that's the CULPRIT!!!... I've set that to 5 both like an ol' tutorial and now it changed THE SAME VID AS BEFORE to 2,3GB 1080p25FPS PAL..

Lemme give it another try..

BTW, that updated nvenc_export.prm file cause the "Estimated Time Left" mini window when exporting to FREEZE TWICE and making Adobe stop working... Good thing i've kept the version BEFORE THE NEW ONE you upped and back to normal... I've been a tester, been there, done that...

Also, i used "Autoselect" better in the  nv enc lvl thing because else i'd get the Log Error drama like before, hope you understand

Thanks,i'll let ya know...

PS: Sorry for a tiny on/off-topic but... Where are the settings for the Adobe Programs located at?.. I'd save me a *BEEP*-ton of time to reconfigure profiles, settings, shortcuts etc...Please?

EDIT: 1080p@25FPS 5MBps Bitrate thing to both and using ya options (Except, again, autoselect) = 2,3GB!!...SAAAAVIOOOOUR!

jasonvp
Inspiring
June 20, 2015

Have folks who are using (or trying to use) this excellent plug-in gone through the process of providing Adobe a feature request for this?  That way it's OEM, and integrated a bit better.

June 13, 2015

Hello, amazing job u have done here, been using this for months already but lately without making any changes started to get this error can u help me?

lk58361083
Participating Frequently
June 13, 2015

I noticed that the nvencoder changes the brightness of the video when exporting

Michele Cordoni
Participating Frequently
June 4, 2015

So... I'm comin' mad tonight... Yesterday I rendered a lot of files with nvenc_export (last version), without any problem... tonight, It's almost impossible to make an error free rendering (error compiling movie: unknown error). I'm using the same software (Premiere Pro CC 2014 with all the last updates), the same render preset, the same driver, the same pool of effects, the same source for videos and the same destination for my output file. I'm rendering at 1600x1200. I noticed that sometimes the render plugin suffers for the presence of corrupted (?) preview files in the preview folder (even with "use previev files" cell is not selected)... now I'm trying to render after the deletion of these files and after clearing the cache folder... let's see... the most frustrating thing (for me, on my pc) is the unpredictable behavior of the plugin... with the same setting, sometimes it works, sometimes returns unknown error... sometimes AME works and Premiere doesn't not, sometimes is the opposite thing... nvenc_export is fantastic (when it works), but needs more stability.

Edit: I found another "random" (?) problem: when the rendering starts, sometimes the outputted file is not in sync with audio, even if in the Premiere Timeline is ok. I can't understand if the problem is the source video, the source audio or the codec itself.

My pc: i7-2600k, 32 Gb DDR3-1866, nVidia GTX Titan with Double Precision Enabled, 1 Tb SSD Raid0 for software (even the Adobe Suite), 240 Gb SSD OCZ Vertex4 as "working folder", 100 Gb OCZ RevoDrive X2 as cache disk for the Adobe Suite.

Participating Frequently
June 5, 2015

Yes i had the same problem. It seems random too. The video after exported is out of sync on the end, (long video). The problem seems occur with specific videos/project because in this project it is always out of sync after multiple exports, but others projects not. In timeline audio is ok.

Participant
May 31, 2015

Hi,

First of all great work on this! I can't wait to get this working But wait, I must, because I'm getting some errors

When I try to export a movie I get "Error compiling movie: Unknown error".

I've tried with the default m4v settings, and the default mp4 settings (with MP4box and Nero AAC Enc). I have the C++ 2010 SP1 installed.

I have the following setup:

GTX680 2GB

AMD X6 1055T (has SSE3)

Premiere Pro CC (latest cloud edition)

Nvidia Drivers: 350.12

Windows 7, 64 bit

16GB RAM

I'd like to help for the cause of this problem, but with an 'Unknown error' I'm not sure where to start!

Is there a log file somewhere with more information? I saw a lot of 'fprintf(stderr, ' in the source code? Or are these errors displayed in Premiere Pro?

Participant
May 31, 2015

OK, it seems to be something with the project I was using. It works better when I try a blank project with a single video file (Premiere Pro crashed due to a "serious error" at the end of the export). I'll experiment more and report back.

nikefootball41
Participant
May 17, 2015

I'm getting rendered in fine form with these settings. But when I wanted to fast forward video created and can not fast-forward media player crashes. There is no problem when I watch the beginning. but locks up when I want to wind forward. I wonder what is the problem.

Known Participant
May 19, 2015

I am in serious trouble!.

It's been a time i haven't updated NVENC_Export and now i've wanted to try out it's latest February 2nd version (or 1.09). Now i can't export A-NY-THING!!!!.

It gives me the following error:

AmMRrer.jpg

Back then, i don't know now wich version i had, I was only able to export to 1280x720 and at 29,97NTSC FPS (If i tried 1920x1080 an error would come up and well,NOPE!,nothing,just close down the app). The Mp4box and Nero Audio thing were correctly set, i even saved the Format/Setting into a setting to never forget and it's still there. Everything worked fine until this version came up and just updated the contents of the Nvenc_export.prm files like the instructions said (Dunno if mp4box and Nero were updated too though). Wanted to install this 1.09 version to see if i could finally be able to export to 1920x1080 60FPS for gameplay recordings)

I NEED HELP!!!!. Using Adobe Premiere Pro CC 2014.2  and the most recent Nvidia drivers released (the ones with Windows 10 support). Please help me out!!. Any kind of instructions will be helpful (I'm TOTAL NOOB,sorry X_X;;; )

Thanks in advance

EDIT: If i click "Omitir" (Skip/Ignore) at 1280x720 and 29,97 or 60FPS it'll encode as normal, but i don't want anymore errors to happen!.I want to start CLEAN. Also,besides of eliminating this error (so whenever i press Export it goes straight into action, i'd like to do 1920x1080@60FPS exportings too. Any solution to that? (But first, please, a solution to my problems!)

EDIT 2: Seems the files from the system32/SysWOW64 from the nvcuvenc_337.94.rar RAR were removed. Placed 'em again ,but still no luck.

Participating Frequently
May 21, 2015

Same here, after last NVIDIA drivers update...