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:
no AAC or Dolby-Digital
no MPEG-4 muxing (*.MP4)
(To fix: Select a different codec, then re-select NVENC_export.)
Sorry, NVENC hardware was introduced with NVidia's Kepler family (2012) Anything older than that will NOT work with the plugin.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
However that doesn't responds the issue about the Exporting's "Time Left freezing" part
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi,
Is it possible to add option to use %TEMP% dir for pre-muxed streams instead of output dir?
It would be handy in our scenario when movies are rendered to network share and there is SSD drive installed locally.
Right now plugin renders both h264 and aac files to network drive, then muxer needs to download it back to local pc and write back into network drive - it would be much faster when using SSD in this step.
Copy link to clipboard
Copied
I have extended the plugin with the possibility to set the final output path differently from the export path set in Premiere Pro.
The procedure:
(a) define the user variable ADOBEOUT in Properties->Advanced->Environmental Variables
(b) set its value as the path where you want to output your rendered final output file e. g. S:\MyOutputDir or S:\MyOutputDir\
(c) in the Export settings in Premiere Pro set the Export filename to e. g. E:\MyScratchDirectory\MyOutputfileName.mp4
The result:
(a) the pre-muxed streams will be put on E:\MyScratchDirectory and will be deleted after successfull muxing
(b) the final output will be S:\MyOutputDir\MyOutputfileName.mp4
If the user variable ADOBEOUT is not set in the Environmental Variables, the plugin works as before.
This version of the plugin can be downloaded at: nvenc_export.prm - Google Drive
Copy link to clipboard
Copied
Hi,
Tyvm for your effort, but is it possible to make it to work in opposite way?
Using ADOBEOUT part for premuxed streams and Export path for final product sounds much more logic - no need to edit variable when changing desired output folder.
Or is it some technical limitation that rendered file must be located in selected export folder and plugin just invoke muxing stuff on it later?
Cheers
Copy link to clipboard
Copied
for this problem there is any solution?
Copy link to clipboard
Copied
In my experience, this error occurs when the profile level is set too low for the resolution you are attempting to render. Try a higher profile level.
Copy link to clipboard
Copied
my settings for 1080p 30fps video
Copy link to clipboard
Copied
Can you post the source code on GitHub so we can help with the plugin ?
Looking at the Adobe Media Encoder logs, I get this :
- Video: 2560x1440, 29.970 fps, 1.0000 PAR, <ERROR, GPU does not support NVENC encoding!>, 00:00:15:08
Which is not true, my video card is definitely supported but I'm suspecting the plugin has trouble with the latest driver (353.62 on Windows 10) which is why I'd like to be able to directly fix the problem myself. Looks promising, I hope I can get it to work soon.
Copy link to clipboard
Copied
Ti133700N wrote:
Can you post the source code on GitHub so we can help with the plugin ?
Looking at the Adobe Media Encoder logs, I get this :
- Video: 2560x1440, 29.970 fps, 1.0000 PAR, <ERROR, GPU does not support NVENC encoding!>, 00:00:15:08
Which is not true, my video card is definitely supported but I'm suspecting the plugin has trouble with the latest driver (353.62 on Windows 10) which is why I'd like to be able to directly fix the problem myself. Looks promising, I hope I can get it to work soon.
I'm getting the same error message, although I've had no problems exporting to a .mp4.
I tend to do a 2-step render, first of all by using multiple instances of BGrenderer to blast through and make an image sequence (much faster than a normal render), which I then add sound & music to, then export from AME via AE.
GPU-Z tells me the GPU is working at a high rate, but oddly enough, it seems it takes a similar amount of time to export the image sequence to .mp4 as it does the main build comp, which is at the moment 18 minutes for a 1min30 1080P video. Experience tells me it should be way faster than that!
I've managed to get a print screen of the gpusniffer.exe screen from AME and it says "Not chosen because of kernel failure"
Anybody else run into similar problems?
Using:
dual 3.2Ghz Xeons
56Gb Ram ( was 64Gb, one stick died)
GTX 980Ti
Win 10 on SSD
project on 7200rpm HD
Latest Nvidia drivers 362.00
Copy link to clipboard
Copied
Out of sync audio and video encoding occurs when I try to get 1920x1080 25i Upper Field First. Sound hurry regarding the video to three frames. The following screenshot I placed the original video on the first track and fit under a coded video for the second track: https://drive.google.com/file/d/0B0aZhCFoWEEkR1huSG1jcWt0YThXYjZublMyMmtVVXJENlJB/view?usp=sharing
My export settings. https://drive.google.com/file/d/0B0aZhCFoWEEkNHFyNG9nLWVSQ0FTU0VoSW5ZQmVobG9WNGtV/view?usp=sharing
I found the only way to keep out of sync, set "max_ref_frames = 1" and "numBframes = 0". In this case, video and sound are synchronous, but the metadata stream registers "Frame rate: 50 fps". Metadata mp4 option appears: "Original frame rate: 50.000 fps" with "Frame rate: 25.000 fps".
I use mp4box (GPAC 0.5.2 / 678) and NeroAACCoder 1.5.1.
Any ideas?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hello I just registered to thank you (nvenc4everyone) and (irisb50359875) for make this awesome work, I was very dissapointed with my new GTX 960 but thanks to you now I can render videos to youtube with my GPU now and is like 100x faster. Thank you guys, for your time and dedication to this.
Copy link to clipboard
Copied
Sad to say the newest version of nVidia's drivers break this plugin. I had it working superbly with my Titan X on the drivers that came with it. But due to so many problems with Premiere's sluggish playback of 4K, I was advised to update the driver. Now I get that assertion failed message with 4K to HD exports and an 'error compiling movie' with HD to HD exports.
Copy link to clipboard
Copied
Audio is mute after a few seconds since the newest nvidia driver update, had to render in the old h.264 from premiere
Copy link to clipboard
Copied
I've rolled back to 347.88 driver to get NVENC working and solve a host of other problems with my three monitor setup scrambling desktop icons and resolution at random on startup. Things are MUCH better now.
Copy link to clipboard
Copied
seems to be only giving me the option to save as m4v not mp4. what am i doing wrong?
Copy link to clipboard
Copied
m4v is an elemental stream. To make an MP4 you need to multiplex the audio with the video for one playable file (like you would upload to Youtube). Choose the Multiplexer tab and choose MP4. Make sure you have an MP4box path set and the utility installed in the appropriate folder. Choose the audio tab and make sure to set the NeroAAC encoder button in NVENC to configure the path to point to the encoder exe file. When you render, the temporary video and audio streams will be written to the export drive. Then two command line processes will happen, one after the other. These are encoding the PCM audio to AAC and the second one multiplexes that AAC to the video, then deletes the temporary video and audio clips it created and leaves the finished MP4, when it's working properly.
I should not that in nVidia's Titan X, you will get an Assertion Failed! error. Click Ignore and the rendering will continue as usual.
Copy link to clipboard
Copied
I found another bug. This is with the Titan X and driver 353.62.
Fails to create Blu-ray compliant output, even with profile level 40. I compared NVENC codec settings on the old machine with GTX680 and found a discrepency between the darRatio: X and darRatio: Y parameters. The compliant encoder has these values at 1920 and 1080. The non compliant encoder has them at 3686400 and 2073600.
No matter how I copy the settings from one machine to the other, the new machine with the Titan X will not produce Blu-ray compliant output. Encore always re encodes the footage, which is time consuming with no hardware encoding and lossy with another generation of loss.
Still works for Youtube MP4 encodes, but you must click through the C++ Assertion Failed! error by selecting "Ignore".
Copy link to clipboard
Copied
Hi.
I'm making video clips to play on CasparCG. H.264, mp4 container. The files created by the encoder is "strobe" during playback, unlike file encoded by default Premiere settings.
file with the strobe:
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 35033 kb/s, 25 fps, 25 tbr, 100k tbn, 50 tbc (default)
working well file:
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 32050 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
I noticed the difference in the parameter "tbn". Codec time base doesn't match video framerate in "working bad file", and i think that's why CasparCG doesn't play video correctly.
Can i fix this parameter with nvenc?
Copy link to clipboard
Copied
I have recently discovered that Premiere has H264 GPU decoding capability on NVENC.
It can be enabled in secret menu Ctrl+F12, Debug Database view: gpu.enablegopformats = true.
After a reboot it vastly improved scrubbing performance of H264 files. They scrub now like Cineform or Prores from SSD.
GPU-Z app shows "video engine load" around 60% on my GTX970 while intensive timeline scrubbing.
There are problems with multicam workflows, but in general it works!
Tried also on GTX660 and was unhappy with the results, but on modern Maxwell generation of NVENC it flies like a rocket!
I think Adobe should make NVENC decoding/encoding official and stable!
Please fill the feature request form about this, like i did
Copy link to clipboard
Copied
Sorry to see that my Premiere Pro CC 2015.0.2 (9.0.2 (6) build) has not this voice in CTRL+F12/Debug DatabaseView... here, the GPU-related voices in CTRL+F12 menù are the ones in the picture.
Copy link to clipboard
Copied
Michele, please look a bit lower, it's right after GF. settings