• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
10

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

Guest
Jun 27, 2013 Jun 27, 2013

Copy link to clipboard

Copied

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.

TOPICS
Hardware or GPU

Views

373.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
replies 421 Replies 421
Contributor ,
Mar 05, 2015 Mar 05, 2015

Copy link to clipboard

Copied

Delving further into investigation, I find that playing with the levels of h.264 encoding affect this problem of transcoding.

Only files of Level 40 or below are accepted in Encore without transcoding. But the problem here is the max bitrate is limited to 20mbps. If I go to Level 41 (the default for BD profile), Encore forces transcode to MPEG2. Level 41 is a ceiling rate of 50mbps which is ILLEGAL for BD and probably why Encore is rejecting them and transcoding.

There must be some flag being set incorrectly in the h.264 output file by the NVENC encoding process.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2015 Mar 07, 2015

Copy link to clipboard

Copied

The NV_ENC_PRESET_BD_GUID with sliceMode=1, sliceModeData=4 (the '4' flag does not exist btw) and level_41 is not Blu-Ray compliant with Encore and forces Encore to transcode the video. Also the final export shows green artefacts and Encore freezes for a while while importing. Any solutions to the problem ? Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 07, 2015 Mar 07, 2015

Copy link to clipboard

Copied

Not a solution, but a workaround, until the author fixes it, is to use level 40, which is limited to 20mbps, but does load into Encore with "Don't transcode" as the default.

Hopefully the author of the plug in will figure out what the problem with Encore compatibility is and come up with a solution that allows 40mbps BD renders.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 08, 2015 Mar 08, 2015

Copy link to clipboard

Copied

Yeah... That doesn't work for me... Still not compliant and still artefacts... Can you please tell me your exact settings ? Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 08, 2015 Mar 08, 2015

Copy link to clipboard

Copied

NVENC BD compliant.PNG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2015 Mar 24, 2015

Copy link to clipboard

Copied

This is such a good idea, I really don't know why Adobe don't have their own team of developers doing this work, it would make their product so much more effective.

Many thanks to nvenc4everyone for putting his unpaid time and effort in to this plugin.

I'm having a problem rendering PAL 1080p 25 footage though.  I have a 3 minute clip and it renders blisteringly fast compared to my old laptop.  The problem is the video output has a stuttery / slomo quality to it and because of that the audio isn't synched..  My laptop is brand new with raided SSDs, a GTX 980M and 16GB RAM, so hardware spec should be alright.

I'm using AVCHD footage from a Panasonic GH2.  I've followed all the prequisites so far and now I'm wondering if it's something to do with my frame rate

Is anyone else using 1080p 25?

Does anyone have any ideas what might be causing the issue?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2015 Mar 24, 2015

Copy link to clipboard

Copied

I wonder if nvenc4everyone  is still monitoring this thread?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 31, 2015 Mar 31, 2015

Copy link to clipboard

Copied

Works great, thanks. Render time cut by 400%. Can't get MP4BOX to work though; TSmuxer works fine (even for YouTube) though so it's all good.

Is this still being developed?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 02, 2015 Apr 02, 2015

Copy link to clipboard

Copied

Had that problem too.. fixed by updating Visual Basic and downloading the latest NVENC plugin.

Remaining bug is the profile that allows up to 40mb/s rate has an invalid flag for Blu-ray, and thus gets transcoded when imported into Encore. Using a lower profile produces compatible file, but limited to 20mb/s.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 05, 2015 Apr 05, 2015

Copy link to clipboard

Copied

I just rendered a window dub draft for my client yesterday and uploaded it to my DropBox account for her to review. I used the NVENC encoder to do this job, with better than expected results.

The minimum bitrate of 1mbs enabled me to bump the frame size from my usual 180x120 to 720x480 with minimal quality loss. I would not have believed 1mbs could look as good as DVD MPEG at 4.5mbs, but it looks almost perfect, even full-screen.

The render time was 2X realtime, even with the 50% performance penalty of using a Quicktime 32-bit video CODEC for the original footage (Atomos Shogun recorder). The fact that it took only 48m to render a 90-minute concert with color correction and titles and time code, from DNxHD MOV files, is impressive. The GPU did much of the work and the main CPU wasn't nailed the ceiling on load.

Whoever said that hardware encodes look bad at low bitrate should take another look. The quality was so good that I could use a large frame size for the draft. The whole 90 minute video fit in under 700mb h.264 file, which uploaded to DB in about 2 hours on a slow DSL connection. In the past, to get a file that small, I had to use 180x120 frame size or else the block artifacts were horrendous. And the render took HOURS, doing it the software way. NVENC has so many uses that improve workflow productivity. This alone makes the $250 I dropped on a GTX680 on eBay well worth the investment.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 10, 2015 Apr 10, 2015

Copy link to clipboard

Copied

Hello!

I have GeForce 740m. I also want to try this plugin. But

ABrefCe.png

But my videocard is Kepler series!

How can I add support of my videocard?

Cpk1NxN.png

Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 10, 2015 Apr 10, 2015

Copy link to clipboard

Copied

Mine has 4GB VRAM. I think the minimum is 1.5GB in order for Premiere to recognize it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 10, 2015 Apr 10, 2015

Copy link to clipboard

Copied

3ZA4Xyi.png

My videocard supports NVENC and have 2 gb.

But I have this error. Why?

n3won8g.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 13, 2015 Apr 13, 2015

Copy link to clipboard

Copied

I would try updating the nVidia drivers to the latest. Sometimes these alpha/beta software plug ins are picky about the driver version. It was necessary to update some things to get NVENC working properly for me, but once done, it's amazing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 13, 2015 Apr 13, 2015

Copy link to clipboard

Copied

Oh, you are the author of the plugin!

Big thanks to you!)

As I can see according to youtube video, your plugin creates magic))

I want to render with your plugin!

Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 15, 2015 Apr 15, 2015

Copy link to clipboard

Copied

No, I am not the author! (Wish I had the brains to write code, but no, I'm just a dumbo editor).. I use NVENC to blast out window dubs to my clients in 2X realtime speeds. Took some tinkering and some support from this group, but once I got it going, it became a powerful time saver.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 15, 2015 Apr 15, 2015

Copy link to clipboard

Copied

I hope you can resolve issues of this plugin!)

Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 22, 2015 Apr 22, 2015

Copy link to clipboard

Copied

We hope the starter of this thread is monitoring and will eventually do some more work on the plug in. Really the only bug that affects me is the fact that Blu-ray compatibility with the level 42 profile is no good. Encore recodes it. Have to use a lower profile that limits bit rate to 20mb/s. Looks okay, but not as good as 40.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

Just wondering what the motion estimation is like using the NVENC 1.09 plugin on something like an Nvidia GTX 960 I havn't seen any settings like the ones available on something like VidCoder freeware. Subpixel motion estimation level 10 QPRD in all frames for example or Psychovisual Trellis. Maybe this is something that can be added with future releases? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 02, 2015 May 02, 2015

Copy link to clipboard

Copied

I found another bug. If the source footage is Apple Quicktime Photo JPEG the MP4Box process fails and deletes all the files. If the footage is from a camera, it completes the multiplexing successfully, but if the footage is an intermediate render to QuickTime, the files get deleted after the muxing fails. It happens too fast to read any error message off the command window.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 27, 2015 May 27, 2015

Copy link to clipboard

Copied

Hi all!

I've got the same problem as wegosi had with his Geforce 740m, and as i see, there was no fix on that. I have 840m and get something like that when I try to export:nvenc error.JPG

I've got Windows 8.1, Premiere Pro CC, newest Nvidia drivers 352.86, Nvenc export 1.09. I also added my 840m into cuda_supported_cards.txt file in premiere folder.

Anyone, any ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 28, 2015 May 28, 2015

Copy link to clipboard

Copied

Anyone, any ideas? 840m Mobile GPU not supported NVENC.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

Hello, my name is Michele... thanks for your good work... with your plugin my encoding is quite faster! But I've a question for you, to resolve some problems: I've a GTX Titan, with the last nVidia GeForce drivers (350.12 WHQL), on Windows 8.1 Pro x64. I have all the software you link installed (even vcredist x86 and x64).

When I make an encoding from Premiere Pro CC 2014 (original software), the plugin works quite well. Not Adobe Media Encoder CC 2014: this one crashes and shuts down just after playing an encoding. [Premiere->Export Media Files->Queque->AME->Start->some seconds of encoding then crash]. Another little problem: I've done two tests with the same timeline, with the same codec setup... the first without mp4 multiplexing (two files, m2v and m2a that works perfectly); the second with mp4 multiplexing... the resultant mp4 stutters. I attach the encoder setting. encoder setting.JPGThanks for your help.

Edit: just an update... I've tried about ten encoding... even using the same configuration and the same timeline/effects, sometimes Premiere doesn't work, sometimes AME doesn't work. Premiere says "low-level error".

When the encoder works, it can use the 98% of Video Engine, it loads GPU for about 40% (but this value is quite variable), 11-20% Memory Controller Load, about 2.3 Gb Video Memory load. The CPU max load is about 40%.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2015 May 05, 2015

Copy link to clipboard

Copied

Quick FYI, if your file has a "#" in it, MP4Box will fail every time. Found that out the hard way.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 11, 2015 May 11, 2015

Copy link to clipboard

Copied

I think that must be it.. because the QT Photo JPEG video I was trying to encode was named "Flagg Coal #75". Well that pretty much nails it then. Luckily, I still have the Premiere CS3 project and the original XDCam footage, so I wound up exporting a much higher quality version without the loss of color subsampling from Photo JPEG.

Thanks for pointing out the "#" compability issue. Now I know.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines