So I am working out and just testing different encoder settings and I wonder if someone has some insights , it works OK now but maybe I can improve stuff.
first lets start with my whole command, lets ignore the audio part for now:
The final input will be from bm decklink so i just put some testfile in there for now. Using a RTX3090
-pix_fmt p016le -tier high -c:v hevc_nvenc -rc:v vbr -cq 19 -qmin 10 -qmax 99 -b:v 25M -g 24 -maxrate:v 50M -bf 0 -b_ref_mode 0 -weighted_pred 1 -rc-lookahead 75 -spatial-aq 1 -aq-strength 8 -temporal-aq 1 -profile:v main10 -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -preset p5 -tune ll -f mpegts srt://URL:PORT?pkt_size=1316
Lets dissect to give you an idea of my though process here:
-pix_fmt p016le
This sets 10bit 4:4:4 YUV which is what I want
-tier high
sounds fancy, no idea what this does.
-c:v hevc_nvenc
use hevc_nvenc
-rc:v vbr -cq 28 -qmin 1 -qmax 99
Variable BitRate Encoding with a constant quality factor of 28 (lower = better quality) then some qmin and qmax just to be able to vary it for testing.
-b:v 10M -g 24 -maxrate:v 25M
Taget bitrate for vbr = 10Mbit with a peak of 25Mbit
-bf 0 -b_ref_mode 0
Turns off B-Frames, I dont think I want those in a stream? do I? ehhh need to test this further
-weighted_pred 1 -rc-lookahead 75 -spatial-aq 1 -aq-strength 8 -temporal-aq 1
Super fancy nvidia tech that I turned on probably have something stupid in here.
-profile:v main10
10bit profile
-color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc
The HDR part.
-preset p5 -tune ll
P5 quality encoding setting "slow" seems fine for UHD input on a 3090 but its hitting 80% all of the time, Tune LowLatency as .. its a livestream
-f mpegts srt://URL:PORT?pkt_size=1316
throw it into a mpegts stream and send to my srt endpoint.
All in all the dencoder right now seems to struggle sometimes seemilgy randomly so its not perfectly tuned yet
if you have great ideas I would love to hear your input!