Hello guest, if you like this forum, why don't you register? https://forum.fanres.com/member.php?action=register (December 14, 2021) x


NVenc Test Settings

2 Replies, 925 Views

Although NVenc is still no match for x264, it's improved to the point at which it's become useful to me under certain circumstances, especially making a quick "Just wanna watch it" encoding.  Here's a starting point that produces output that works with my BD player.  (Some of the settings spell out the defaults to demonstrate the encoder's options and are strictly speaking redundant.)

Code:
ffmpeg -i input.mkv -vcodec h264_nvenc -profile:v high -level 41 -rc vbr_hq -2pass 1 -qmin 0 -qmax 51 -maxrate:v 40000k -b:v 35000k -bufsize:v 30000k -bf 3 -refs:v 3 -spatial-aq 1 -temporal-aq 1 -aq-strength 8 -b_ref_mode 2 -rc-lookahead 32 -surfaces 48 -no-scenecut 0 -nonref_p 1 -strict_gop 1 -coder:v cabac -g 24 -bluray-compat 1 output.264

You can even make a relatively quick UHD-to-BD conversion, all in one step, without generating an intermediate file, which is handy if space is a consideration:
Code:
ffmpeg -i input.mkv -vf "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable,zscale=t=bt709:m=bt709:r=tv,format=yuv420p,scale=1920:1080" -sws_flags sinc -pix_fmt yuv420p -vcodec h264_nvenc -profile:v high -level 41 -rc vbr_hq -2pass 1 -qmin 0 -qmax 51 -maxrate:v 40000k -b:v 35000k -bufsize:v 30000k -bf 3 -refs:v 3 -spatial-aq 1 -temporal-aq 1 -aq-strength 8 -b_ref_mode 2 -rc-lookahead 32 -surfaces 48 -no-scenecut 0 -nonref_p 1 -strict_gop 1 -coder:v cabac -g 24 -bluray-compat 1 output.264

Note that not every NVIDIA card supports all the encoder's features, so tweak the settings accordingly, and make sure that your drivers are up to date.  Have fun testing!
Thanks! I'll definitely give this a tryout. You've never led me down the wrong path Smile.

Do you have any recommended settings for hevc using the newest nvenc that supports b-frames?
Ha! At present, this is all experimental, and I've purposely left some settings on the defaults, so if you spot any oversights or have any suggestions, please do let me know. I was hoping that you'd chime in, althor, because I remember that you were experimenting with NVIDIA hardware acceleration for various purposes a while back. If you're on Windows, you'll want to look at NVEncC: rigaya is busily working on it.

I'm afraid that I don't use HEVC/h.265 at all and haven't even tinkered with x265. The UHD content that I have is either left as it is or converted to standard HD, hence the UHD-to-BD settings above.
(This post was last modified: 2020-08-04, 07:57 PM by Chewtobacca.)

Possibly Related Threads…
Thread Author Replies Views Last Post
  x265 UHD-BD compliant "perfect" settings spoRv 18 9,275 2021-12-06, 06:12 PM
Last Post: bronan
  I want to change AR, do I have to re-encode? If so, how can I keep original settings? Onti 3 616 2021-07-14, 06:28 PM
Last Post: Onti
Thumbs Up x264 BD compliant "perfect" settings spoRv 146 109,496 2021-03-10, 11:52 AM
Last Post: Serums
  [Idea] x264 BD compliant "perfect" settings - faster version spoRv 26 12,852 2020-05-11, 08:36 PM
Last Post: Stamper
  Handbrake settings - question JackForrester 3 1,522 2020-03-21, 09:25 PM
Last Post: TomArrow
  Tools and settings for compressing x264? NeonBible 1 1,452 2019-01-11, 12:01 PM
Last Post: MrBrown



Users browsing this thread: 1 Guest(s)