Well I finally bought a Gigabyte GTX 960 and have spent the past couple of days testing Nvidia's new hardware avc/hevc encoder and the results are all over the place.
First things first, driver issues nearly made me return the card thinking it was defective. Using the latest version from Nvidia's website would result in program crashes, driver crashes, lockups and blue screens when trying to encode using nvenc within Media Coder, Hybrid and Staxrip, 3 of the only 4 apps that currently support this new technology.
I finally was able to get a complete encode accomplished by uninstalling the newest drivers, manually going into the registry and the system files and removing anything related to Nvidia, downloading the 347.25 drivers. It originally took some time for me to determine what the problem is as it was a combination of buggy drivers, buggy implementation of nvenc and poor nvenc settings on my part.
The give away that it was software related was that the card would benchmark just fine using 3d benchmarking tools, but aside from not being able to encode using nvenc, CUDA based encoding and filtering was slower than my GT 610. After doing the above steps, I was able to get down to some serious testing.
Reading through Nvidia's documentation they clearly state that x264 was the quality standard they targeted with nvenc, specifically the "very fast" preset IIRC.
Here's the thing, this hardware is still very new and the 3 above listed apps support a rather pedestrian implementation of nvenc, Selur might as well remove support for this encoder from Hybrid as in it's current state it's little more than an insult to his software's users. It acts like it's encoding, I think, but you can't tell because the feedback you get is that it's encoding audio, even though no audio source was chosen, the encoding speed and progress keeps flashing on the screen so fast that I think I was able to make out an encoding speed of 30fps, honestly after a few tries I just shut the app off and moved on.
Media Coder is barely better, I was able to get a complete encode done, there are few encoding parameters configurable at the current time, encoding speed is lighting fast but the quality was atrocious, that is until I look closely at the file. I realized that Media Coder's implementation has poor rate control, in an encode where I set a target bit rate of 12000 kb/s it only used 4000 kb/s. Once I realized that, my opinion of the quality changed, for an encode that only used 1/3 the bit rate I have asked for, the quality was acceptable.
Staxrip is easily the best implementation of the 3, though it too is lacking support for many of the features that nvenc offers. Still, using the high quality settings, I was able to get fully functional encodes, with comparable quality to x264 at about 50 fps. There seems to be a major bottleneck with this software, no matter how I configured the encoder, either avc or hevc, high performance or max quality, it would not go over 50 fps. I know this is a problem with Staxrip because Media Coder easily hit over 200 fps, so it's not a bottleneck related to my computer.
If those were your only choices one would be forgiven to conclude that Nvidia's hardware encoder was little more than snake oil, a con job not worthy your hard earned cash.
Enter Adobe Media Encoder and a user over at the Adobe forums known as "nvenc4everyone". This guy (or girl) coded a full featured plugin that supports, near as I can tell, all the nvenc parameters, including 2 pass, AQ (yes, nvenc features hardware AQ) and lossless 4:4:4 for both avc and hevc. The plug in is available for free and works with AME and Premiere Pro, both CC and CS6.
This plug in is what shows nvenc true potential. At the highest quality settings, with 2 pass, it easily matches x264 at the medium preset, and while AME doesn't show the encoding frame rate a 2 pass HQ avc encode finished in faster than real time for the whole thing, which works out to roughly 2x real time for 1080p30 at 12000 kb/s.
Now that's not so fast that a software based solution can't match it, I'm guessing a high end Intel hexa core should be able to match it but Nvidia has two aces up it's sleeve that makes one take notice of this new technology.
One, the encoding speed and quality applies to hevc encoding as well and it is in this arena that nvenc holds a distinct advantage. You are not putting together any system, at a reasonable price, that can finish an x265 2 pass encode in 2x real time. It would take you quite an investment to be able to encode 2x real time with x265 and nvenc and x265 trade punches with regards to quality when nvenc is properly configured.
Second, and this is the big one that really made me think that Nvidia may be onto something special here, namely power consumption. I monitored the cpu, the gpu and the system as a whole during the nvenc sessions and during the encodes the total power usage only went up by about 24 watts. That's it. You can't match that with a software based encoder, a cpu running at full load will spike up the power usage as will a gpu based encoder causing the gpu to run at full tilt.
I also understand why gpu based encoding suddenly seemed to drop off the face of the earth. Divx has publicly said that will not be offering a gpu powered hevc encoder, Main Concept (which is owned by the same parent company as Divx and Rovi) dropped support for both their OCL and CUDA encoders from Total Code, Pegasys, which licensed the Divx Hevc encoder never released a TMPG build that supported it and even Nvidia seemed to stop pushing CUDA encoders. It all makes sense now, I would be very surprised if the next iterations of ever major popular video editing app, like Premiere Pro, Sony Vegas, Video Mastering Works, Total Code and all the others didn't support nvenc in one form or another.
The fight nvenc wins is not against x264, it matches it in quality and is somewhat faster but the next generation from Intel or Skylake should erase that advantage, the fight nvenc wins is against Divx Hevc and x265, which require significantly more cpu resources to run fast, nvenc matches or beats their quality depending on source characteristics and flat out levels them in the speed department.
I'm not saying run out and buy a nvenc capable video card, I'm saying don't be surprised if one day it's considered must have hardware for any video enthusiast.
If anyone wants me to run any test encodes, feel free to provide a link to that source you want me to encode.
+ Reply to Thread
Results 1 to 30 of 53
-
-
I ran some test with that plugin as well .
Main problem I see is that it does not use hardware encoding when you apply filters. That's pretty common in an NLE. -
I have no idea where you are getting this information from, I am running a Blu-Ray test encode as I type this, with AME and I'm applying a LUT "cold tones" and monitoring the whole thing with gpu-z, nvenc is definitely being used as CUDA being used for the filtering and the render is flying.
I can't wait until Sony and Adobe incorporate nvenc into their products, it will be a game changer. -
But with (GPU enabled) filters there is definitely a diminished return.
What are your fps numbers on 1080p?
I get between 65-70fps. -
There's a major bottleneck somewhere in my system, after extensive testing with Staxrip and the Adobe plugin, no matter what settings I use, how many reference frames (I even tested with 16), 1080p video is encoded at about 50fps regardless of whether I'm using nvenc h264 or h265 or how much bit rate I use and I tested from as little as 4000 kb/s to as much as 25000 kb/s.
For comparison, x264 with the ultra fast preset does 1080p30 video at 12000 kb/s at about 30fps and x265 with the ultra fast preset only hits 10fps, so nvenc is about 1.75x faster than x264 and an amazing 5x times faster than x265, with superior quality at those presets.
I believe Nvidia's claims of hundreds of frames per second encoding speed as published here:
http://developer.download.nvidia.com/compute/nvenc/v5.0_beta/NVENC_DA-06209-001_v06.pdf
But I can find no reference to the test system they used, I'm guessing one needs very fast disk I/O and a very beefy cpu to feed the video card fast enough to max out the encoder.
Regardless, I really like this technology, I plan on doing all my encodes using it from now on. -
I haven't found any reference to 10 bit encoding support, I'm assuming that it will be coming in a future product.
-
Just an update, I popped in a clean 500gb hard drive I had laying around, did a fresh format and decided to try that out as the target drive. 1440x1080 7000 kb/s VC-1 to 1440x1080 7000 kb/s hevc with nvenc is being done at 105 fps! Now that's what I'm talking about. For comparison x265 with ultra fast only hits 24 fps, so nvenc is 4x faster in this case.
Clearly I have an I/O bottleneck in this system, time to start saving up for a couple of really fast SSD's. -
7000kb/s = 875kB/s = 0.85MB/s x 2 = 1.7MB/s
You could copy an entire movie from one location to another in minutes using any old hard drive but if it's re-encoding them it's limiting the speed to 105fps?
If a movie contained 150,000 frames and you copied it from one location to another at 105fps it'd take about 23 minutes to copy. Is that about how fast it's encoding? I wonder what it is about encoding those frames that slows the hard drive down so much? -
I'm trying to figure it out, there definitely a massive bottleneck somewhere on my system, I'm assuming I/O, could be a decoding bottleneck, I have a theory that it may have something to do with how AMD processors execute AVX instructions, but something is holding this system back.
Gives me a good excuse to save up some dough and build beefy Haswell-E based system in a couple of months.
I wish I had one of those PCI-E SSD drives to play with, see if that eliminated the bottleneck. -
I think I almost have it worked out, I'm currently hitting 610 fps with a DVD source that is being de-interlaced and encoded to h264 with 4 b frames and 8 reference frames. That is one fast encode!
-
Given the bottleneck couldn't have been the hard drive, what was it (given you worked it out)?
I'm planning on building the new PC I've been planning on building for years very soon now, and I've considered a better Nvidia card for encoding, but I'd like to see the result compared to x264. I really don't care how fast it is if the quality isn't at least as good as x264's default settings. I can always make x264 faster, even if not as fast as 610fps, but I don't, because I prefer to encode for quality 99% of the time.
And if I'd need to encode at a much higher bitrate to match x264's typical CRF16 to CRF18 quality, that'd be a deal breaker too, no matter how fast it encodes. -
I'll give you an idea of how nvenc compares to x264 quality wise, attached you will find a 30mb/s 1080p50 file from the FHD benchmark. This isn't really a fair benchmark for nvenc because it was taken from uncompressed yuv sources and encoded using x264+placebo at a high bit rate, thus it's using the same compression algorithms as one of the test participants.
Regardless, I downloaded it and tried to encode it using the "medium" preset and crf 22, the result was a file bigger than the source so I tried a different approach. I encode it with x264+medium at 5000 kb/s, nvenc h264 and nvenc h265 at 5000 kb/s. None of them are what anyone would consider a high quality result but it should show that these encoders trade punches at x264+medium comparison. The difference is that x264 encoded at 19fps with my 8320 and nvenc encoded at 130fps for both hevc and avc.
This is really a tough source for any encoder, x265 looks like crap, all the encoders I tested require much higher bit rates to get a clean encode with this source, but nvenc certainly holds it's own and remember I was using Staxrip which doesn't expose all nvenc's capabilities such as AQ, 2 pass, hierarchical B and P and a number of other goodies.
Link to any source and I'll run test encodes so you can make up your own mind. I would say if you were going to build a new system anyway and you were planning on buying a good video card, then you really should consider something in the 9xx family of Nvidia cards. -
Thanks for the samples. I'm out of time today but I'll check them out tomorrow. If you don't mind doing it, I might also upload a section of a DVD for you to re-encode and then I can re-encode it myself using x264 and compare the results.
Cheers. -
So I also downloaded the Open Source movie "Valkaama" in DVD format, it's not the highest quality source but it should be indicative of what many users will be using as their source:
http://www.valkaama.com/index.php?page=valkaama&l=en
I encoded it to x264+medium+tune film+crf 18 via Staxrip, looked to see how much average bit rate and max bit rate was used and used those values to encode a comparison with nvenc h264 and h265 using Staxrip and AME via the plug in.
The 2 mkv files were done with AME and the two mp4 files were done with Staxrip. In all cases this is less bit rate than I would use for my encodes but since CRF 18 seems to be the most popular for DVD transcoding, I figured I would use that. Personally I have a hard time picking a winner, to me they all look bit starved but quality wise they seem pretty equal to me, the difference is that the x264 encode was done at 74fps, the 2 Staxrip encodes were done at 260fps and the AME encodes, for a 2 pass encode, finished in under a minute each, that's for 22 minutes worth of movie (I just did the first VOB), which is just mind blowing speed.
Will be uploading the samples shortly but the forum seems to be having a problem right now, the connection keeps getting reset when I try to upload the samples. -
Folks - reading this with a great deal of interest - i'm not an expert in video - so please forgive the lack of technical speak.
Here is what i am seeing:
I have a GTX650 mated to a Phenom II x6.
I have tried only Mediacoder and DVDfab for re-encoding of Aussie DVB-T (usually broadcast at DVD resolution Mpeg2 TS)
Using the default settings in both so that i can watch free-to-air recorded shows at my leisure - i compress to Apple mp4
(whatever that means - looks good on a tablet or indeed on the telly, and is playable by all my devices)
I pretty much select the video size and bitrate of the output to be "same as original"
The size out the output file is usually half of the input file.
In Mediacoder - i get about 400 fps
Sit down now - because DVDfab sits at around 800-850 fps. (i am pretty pleased with this!)
It means i can re-encode a 1-hour show in about 2-3 minutes.
I can't tell the difference between input and output even on a 60" telly.
while this is going on i monitored what the machine is doing....
- the disk drives are nowhere near stressed - maybe peaking at 10% (i have separate physical disks for input and output)
- the cpu is mostly asleep although all 6 cores are in use
- Memory use never tops 1G (according to perfmon) (so much for buying 8G of RAM)
- the gpu is at about 70% capacity (according to GPU-z)
It took a while to get here - i had my gtx650 for almost 2 years before proper software came along. -
The GTX 650 is Kepler based so it supports the first gen nvenc chip which only features H264 encoding support, less encoding options and is supposed to be slower than Maxwell. Still the speeds you are getting are impressive, which tells me that I definitely need to dig a bit deeper and figure out what's going on.
I'm tempted to pick up a couple of 10000 rpm raptors and RAID them, I can picked them up for $130 a pop, anyone have any experience with these drives? -
before you rush out and waste money on HDD -
i'd check to see if your existing ones are clagging out - I have the cheapest 7200rpm drives i could find 5 years ago when
i built the system - as i said, encoding doesn't even cause them to hit 10%.
I doubt very much that they are the problem....
use the windows resource monitor to see what is stressed, and GPU-z to see what your card is doing.
I know that mediacoder uses the CPU do decode, and GPU to encode, so you might find (as i did) that the cpu
might not be able to decode fast enough.....
DVDfab is a different story - CPU is almost unused according to perfmon -
It is fairly easy to see if you are actually disk bound, just read and write to a RAM disk to test (and obviously you would need enough memory).
-
Nah, because I'd buy a much larger 7200rpm drive for the same money or less, short stroke it by creating a partition around the size of the entire 10,000rpm drive, that partition will probably give you a similar sustained transfer speed as the 10,000 drive, and you can still create a second large partition to use for storage.
http://www.techarp.com/showarticle.aspx?artno=691&pgno=2#original
http://www.techarp.com/showarticle.aspx?artno=691&pgno=2#after
I still haven't had a chance to do any sample perusing, but hopefully soon........ -
My initial thoughts..... you encoded the 30mb sample using average bitrate encoding. I doubt the bits are distributed efficiently because it looks like crap at the start and fairly good at the end.
Here's the same bitrate again except this time it's a 2 pass x264 encode. Obviously if you happened to pick a CRF value that resulted in the same bitrate the quality would be virtually the same. I know some people use ABR encoding, but probably mostly at reasonable bitrates.
I won't upload samples because my internet connection is dog slow and even uploading a 30MB file would take a while, but here's a few screenshots to illustrate my point. The very first frame of your x264 medium encode looks a little better than the very first frame of my 2 pass encode at the same bitrate, but by frame 50 they're worlds apart.
It's interesting because the average bitrate encode seems to be doing a little better on the fairly static areas of the frame, but where there's substantial movement it's a mess. The 2 pass encode has kept the over-all quality more even throughout all areas of the frame.
Your x264 medium preset sample from post #13, frame 50:
x264 2 pass encode, medium preset, same average bitrate, frame 50:
Last edited by hello_hello; 10th Apr 2015 at 08:51.
-
Moving on to frame 2000, your x264 average bitrate encode has a slight edge, but it's probably spending the extra bits it has left over towards the end that would have been much more effective earlier on.
Average bitrate:
2 Pass:
That's my issue with comparing ABR encoding. I'd never use it. Especially for a video that short. The 2 pass encode looks better over-all (or much better at the beginning), and x264's CRF at the same bitrate should look the same. I'd like to see the same source encoded with the nvidia h264 encoder at the same bitrate using 2 pass encoding in order to compare it to x264's 2 pass. Is that possible?
Post edited to change the order of the pics. I posted them the wrong way around initially.
My personal test encoding method would involve a reasonable length sample encoded with x264's CRF 18 to use as a reference point. Like it or not, x264's quality/bitrate ratio is the one other encoders would need to improve on to be considered better. Preferably a source with a small amount of fine noise or film grain. Nothing intrusive, but for me encoding fine grain at reasonable bitrates is the biggest problem.
Then I'd use the resulting bitrate for comparison encodes with other encoders (whether they be ABR or 2 pass) and compare the results. If the other encoders produce an equal or better result in respect to quality, then I'd consider using them. Faster encoding speed would just be an added bonus. The ability to encode via an AVIsynth script would be fairly mandatory too, most of the time.
Having said that though, how do you beat x264's CRF encoding as a reliable method of encoding at a specific quality if other encoders don't have a quality based encoding method? Even if they're way faster and can match x264 at a specific bitrate using 2 pass encoding, you're still back to guessing in respect to quality with every single encode.
Edit: I just realised MeGUI automatically sets keyint=500 for 50fps encodes and for the average bitrate encode it was set to keyint=250. I tried a quick re-encode and the quality is low enough for the smaller maximum gop size not to make a substantial difference. I think it only increased the keyframe count by one or two in this case anyway.
I also just realised the x264 medium preset encode from post #13 is ten bit and the nvenc encode is eight bit. Not that it seems to make a substantial difference at the very low quality end of the quality scale.
Last edited by hello_hello; 10th Apr 2015 at 09:15.
-
Where'd everyone go?
I had a bit more of a play with the samples from post #13. When you look at the bitrate distribution, it seems to show why the nvenc encode looks worse than the x264 medium preset encode at the beginning and better at the end. The closer I look, the less I think it's "trading punches" with an x264 average bitrate encode. Only in respect to the fact they're both fairly average, but the closer you look, the less similar they are.
x264 average bitrate (10 bit x264 medium encode from post #13):
nvenc h264:
How a x264 10 bit 2 pass encode distributes the bits:
x264 10 bit CRF 32.5 encode
I'll confess for this short encode, x264 2 pass looked slightly better than x264 CRF for almost every frame I compared. I'm guessing, but that seems to be mainly because the 2 pass encode gave more bits to the keyframes, especially the very first frame.
Assuming x264's 2 pass bit distribution does provide constant visual quality, nvenc's bit distribution doesn't appear to make much sense, while x264 in average bitrate mode seems to have done a better job.
Bitrate Viewer's frame based view instead of GOP based view:
x264 2 pass:
x264 CRF:
And for completeness, here's how x264 average bitrate and nvenc did it.
x264 average bitrate:
nvenc:
I'm not quite sure what to make of the last two yet, aside from nvenc seems to keep the bitrate fairly consistent throughout for each GOP, or even increasing it as the encode progresses, when in reality the opposite would probably provide more consistent quality, but given Bitrate Viewer scaled them differently it makes them a bit harder to compare. All my x264 comparison encodes are 10 bit because the x264 sample from post #13 was 10 bit, and I wanted to compare my encodes with that one as accurately as possible. 8 bit in this case doesn't seem to change much though.Last edited by hello_hello; 11th Apr 2015 at 10:22.
-
Tried it on an actual project at 1080/50p with GPU effects enabled and it gives me a non descriptive general error message.
-
do you know if handbrake support Encoding with Hevc with this graphic card?
I have got mediacoder premium 64 bit, the last version. could you tell me what kind of settings I have to put, to activate the encoding by GTX?
First of all I Set costant Quality, than I choose the formate H.265. reguarding the encoder, what I have to choose? NVENC Encoder?
the other settings...source...MEncoder
? what is?
I hope you answers to all my questions -
No Handbrake isn't using NVENC currently, StaxRIP is a great encoder for NVENC currently. I'd recommend the beta build which supports both NVENC H265/H264 enabling easy parameter selection as well as command line where you can enter your own parameters. Hybrid is also a great encoder with a huge selection of options. They both will probably seem a bit overwhelming for the novice user, but I managed to figure it out so it's possible. The Adobe media encoder plug-in only supports h264 and once you see h265 it's hard to want to encode in h264 again... ever.
-
-
You still use your CPU with NVENC encoding but less of it in comparison to x.265 so you can multi-task with no apparent load while your streaming 100+FPS. Here's an example of the difference between NVENC and x.265.
Yea, 4 minutes vs 2 hours... to encode, however x.265 chopped an extra 160 Mb in file size thanks to use of 4 b-frames compared to NVEnc which doesn't even support B-Frames. Quality wise however at least for me on my 80" I can't tell the difference.
NVEnc 1.10 (x64), using NVENC API v5.0
OS Version Unknown (x64)
CPU Intel Core i7 950 @ 3.07GHz [TB: 3.11GHz] (4C/8T)
GPU GeForce GTX 970 (13 EU) @ 1177 MHz (355.98)
Input Buffers CUDA, 16 frames
Input Info y4m (yv12) -> nv12 [SSE2], 854x480, 959/40 fps
Output Info H.265/HEVC main
854x480p 1:1 23.975fps (959/40fps)
Rate Control CQP
CQP I:20 P:23 B:25
GOP length 240 frames
B frames 0 frames
Ref frames 3 frames
MV Quality Q-pel
encoded 61653 frames, 252.82 fps, 1249.55 kbps, 383.05 MB
encode time 0:04:04 / CPU Usage: 1.79%
frame type IDR 257
frame type I 257, avgQP 20.00, total size 6.87 MB
frame type P 61396, avgQP 23.00, total size 376.18 MB
finished after 00:04:05.740
Created C:\Test.265 (383.054 MB)
================================================== ===========================================
x265 [info]: HEVC encoder version 1.7+478-365f7ed4d896
x265 [info]: build info [Windows][GCC 5.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 1 threads
x265 [info]: frame threads / pool features : 4 / wpp(8 rows)+pmode
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut : 23 / 250 / 40
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / 0 / 0
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-20.0 / 0.60
x265 [info]: tools: rd=3 signhide tmvp strong-intra-smoothing deblock sao
x265 [info]: frame I: 247, Avg QP:21.03 kb/s: 4836.68
x265 [info]: frame P: 16276, Avg QP:22.54 kb/s: 1827.82
x265 [info]: frame B: 45130, Avg QP:27.19 kb/s: 310.45
x265 [info]: Weighted P-Frames: Y:3.1% UV:2.6%
x265 [info]: consecutive B-frames: 5.9% 5.7% 10.2% 65.6% 12.6%
encoded 61653 frames in 7310.58s (8.43 fps), 729.16 kb/s, Avg QP:25.94
finished after 02:01:50.719
Created C:\test.265 (223.752 MB)
-
at huge difference between the two, is a great thing!
in this way the full blu ray I can convert them very quickly, now it takes me an eternity
I wanted to buy the Noctua nh-d15 to not freeze the CPU, but in this case I'll just buy this graphics card.
I took an i7 4790k, with the multiplier unlocked just because they can withstand higher temperatures, but I see that you are using a i7-950 so I can feel relaxed.
I have one last questionCan you tell me how long does it take to convert a full blu rayand a blue ray blue ray rip(H264)? approximately... please
if not on the vps terabytes grow too fast
thanks for all!!!!!!!!!
Thank you very much for answering so detailed!!
Similar Threads
-
Gtx 970 upgrade
By johns0 in forum ComputerReplies: 21Last Post: 14th Apr 2015, 09:01 -
Nvidia NVENC HEVC is better than x264
By sophisticles in forum Video ConversionReplies: 10Last Post: 25th Mar 2015, 13:27 -
Anyone have EVGA GTX 570?
By sdsumike619 in forum ComputerReplies: 5Last Post: 25th Jan 2015, 17:44 -
ffmpeg with '--enable-nvenc'
By Selur in forum Video ConversionReplies: 1Last Post: 13th Jan 2015, 06:45 -
Compatible H.264 for Premiere (lossless NVENC)
By Dogway in forum EditingReplies: 1Last Post: 19th Sep 2014, 10:17