3

I tried to encode to hevc_nvenc but the documentation on FFmpeg is too less and all options are not clearly defined. So if anyone can be good enough what all options do and what settings and filters can be used with which setting to get a good encode.

The options can be found out here

Some example of the information I seek is similar to following:

ffmpeg.exe -hwaccel cuvid -i inmovie.mov -c:v h264_nvenc -pix_fmt yuv420p -preset slow -rc vbr_hq -b:v 8M -maxrate:v 10M -c:a aac -b:a 224k outmovie.mp4

Parameters
-hwaccel cuvid uses NVidia CUDA GPU acceleration for decoding (also working: dxva2)
-pix_fmt p010le YUV 4:2:0 10-bit
-c:v hevc_nvenc uses HEVC/h265 GPU hardware encoder
-preset slow HQ gpu encoding
-rc vbr_hq uses RC option to enable variable bitrate encoding with GPU encoding
-qmin:v 19 -qmax:v 14 sets minimum and maximum quantization values (optional)
-b:v 6M -maxrate:v 10M sets average and maximum bitrate allowed for the encoder

This can be found here.

Soul Spark
  • 82
  • 1
  • 2
  • 8
  • I did refer to https://superuser.com/questions/1296374/best-settings-for-ffmpeg-with-nvenc before posting this. But it was too technical. – Soul Spark Feb 14 '20 at 06:13
  • So the less technical ffmpeg documentation isn't specific enough while the more thorough technical SU entry is too technical? Did you try to brush up on your technical knowledge? You already have two sources that will list options and what they do. So what is actually missing for you? – Seth Feb 14 '20 at 07:04
  • Seth there is no info from FFmpeg side about this encoding type and about the SU post, then please go through it and let me know what you understand. – Soul Spark Feb 15 '20 at 14:45
  • What's too technical? I'd love to simplify that for you. – Dennis Mungai Jul 23 '21 at 17:43
  • What i meant to ask was a similar explanation like ffmpeg has for the hevc and other encoder and decoder. – Soul Spark Jul 25 '21 at 03:23
  • Like the SU post does go through some nvenc flags but as you can see there are a lot more in the gist i have linked. – Soul Spark Jul 25 '21 at 03:39

1 Answers1

3

This is the setting I use for NVENC HEVC on Turing cards

 ffmpeg -strict 2 -hwaccel auto -i "inputfile.mp4"  -c:v hevc_nvenc -rc vbr -cq 24 -qmin 24 -qmax 24 -profile:v main10 -pix_fmt p010le -b:v 0K -c:a aac -map 0 "outputfile.mp4"

Increase 24 - 27 or 30 for lower quality and better compression