What other encoder settings are you using? AV1 is pretty CPU intensive to encode, and if your settings are too aggressive, you'll still run out of CPU resources. I suspect THAT is why Minecraft is running so slowly -- SVT-AV1 is using all the available CPU resources and minecraft can only run ~25fps with what is left over.
The AOM-AV1 encoder is VERY slow, and SVT-AV1 is much faster... but it's still much slower than x264 or x265.
My main experience with SVT-AV1 is for archival video encoding, but I'll try to apply that knowledge to streaming. I'll include links to what I'm reading so you can do your own research if you want to better understand what I'm talking about.
From the SVT-AV1 documentation, here's their documentation on suggested usage with ffmpeg:
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Ffmpeg.md
Notably, they recommend using preset 10 for realtime encoding (higher number presets are faster but produce worse quality output at a given bitrate). The list of all presets is here:
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/CommonQuestions.md#what-presets-do
I did some test encodes of a 1080p video file on a 5600G (the machine I'm on right now). 4K is 4x as many pixels as 1080p. Though the scaling won't be linear, I'd expect roughly 1/4 the encode fps at 4K using the same settings. If you're trying to also encode HDR (10-bit color) then there will be an additional slowdown. As a rough estimate, I'd expect another 10% decrease in encode fps.
Preset = 10, CRF = 30: 67 fps
Preset = 10, CRF = 30, 10-bit color: 61 fps
Preset = 11, CRF = 30, 10-bit color: 71 fps (note: CPU utilization was poor at ~70% of 12 threads)
Using the assumptions from above, I'd expect the 5600G using all 12 threads to be able to encode 4K HDR at ~15fps ( 61/4 ).
Using some more rough math, I'd expect that a 5950X capped at 20 threads will get roughly 25 fps*. 20/12 = 1.67 1.67*15 = 25
* Yes, I realize that a 5950X runs at higher clocks than a 5600G and will have somewhat higher perf... but the difference will end up being minor... not like 2x or anything.
Based on these estimates, a 5950X does not have enough performance to encode SVT-AV1 at 4K60 in HDR in realtime. I'd recommend you try 1440p or even 1080p to start with just to see if you can get your stream running smoothly before trying 4K.
Still, I'll continue with my explanation in case you find it useful.
To use any of the parameters not specifically implemented in ffmpeg (such as parameters for controlling how many threads it uses), you need to use:
-svtav1-params
and then pass in the parameters without dashes, in a : separated list. I know this is probably a bit confusing unless you're already familiar with how it works so I'll provide an example:
If you wanted to pass in CRF = 30 and preset = 10 as svtav1-params you'd write it like this:
Code:
-svtav1-params preset=10:crf=30
No dashes, no spaces, and use the : character instead of commas. To pass in more parameters, just add more, being sure to use : between parameters. If you're only passing in one parameter, you'd omit the :
For restricting thread count the section of their parameters documentation I think is most relevant is:
https://gitlab.com/AOMediaCodec/SVT...s/Parameters.md#appendix-a-encoder-parameters
The section mentions using
--lp to restrict logical processors. I confirmed that this works with ffmpeg when passed using svtav1-params. I ran the following on a 5600G:
Code:
ffmpeg.exe -i test.mkv -c:v libsvtav1 -svtav1-params preset=10:crf=30:lp=2 svt_test.mkv
and while encoding it states:
Code:
Svt[info]: Number of logical cores available: 2
When I don't pass in lp=2, this normally says: Number of logical cores available: 12
FWIW, this yielded an encode speed of 31fps at ~30% CPU utilization on the 5600G (~3.6 cores), so you may need to experiment to see what value to use to achieve the desired CPU saturation on a 5950X.
Also note: if you're using a really fast preset, the SVT-AV1 encoder may not be able to achieve good CPU utilization on a 16C/32T CPU.
TL;DR
SVT-AV1 is very CPU intensive. Even though the 5950X is fast, I don't think it's fast enough to encode 4K60 HDR in realtime. I've provided settings to use to cap SVT-AV1 to use fewer threads. I'd recommend trying 1440p first to see if you can get that performing acceptably before trying 4K.
I hope this is helpful.