Improve FFmpeg and NVENC output quality

Solution 1:

 ffmpeg.exe -vsync 0 -hwaccel cuda -i "Drive:\PATH\Input.webm" -c:v h264_nvenc -rc constqp -qmin 17 -qmax 51 -qp 24 -preset p7 -tune hq -pix_fmt yuv420p -rc-lookahead 4 -profile:v high -bf 0 -keyint_min 1 -refs 7 -qdiff 20 -qcomp 0.9  -me_method umh -subq 9 -me_range 36 -b:v 0 -g 300  -c:a copy  "Drive:\PATH\Output.mp4" 

Works on GeForce GTX 1660Ti

"increasing quality without increasing bitrate", the only possible solution is getting the 'best bang for the buck', ie the best compression possible. Above are the 'standard' parameter i use for QP.

-rc constqp : Keeps the quality constant. In your case, there should be no artifacts if the source has none.

-qcmin and -qcmax : Possibly redundant as there is a fixed qp defined and used.

-preset p7 and -tune hq : These are possibly the most important parameters, begging brutal analysis of the video (better quality at a given bitrate).

-rc-lookahead 4 -keyint_min 1 -qdiff 20 -qcomp 0.9 : I dont mind KFs being close togather if the encoder feels it should place them so, this helps motion estimation vectors 'resetting' if the frames differ considerably at any point. Lookahead 4 for rate change combined with -qdiff, -qcomp set to these values gives a free hand to quickly go up and down bitrates as the frame demands.

Since '-keyint_min 1' is set, I dont mind setting KF intervel to a max of 300.

-me_method umh : Is redundant, included only due force of habbit.

Bframes are excluded, this is a personal choice and i think works better for archiving, Im prolly at odds with everyone on this, but I really prefer not having b-frames.