Hi,
Please try to configure virtual buffer size:
-vbs <size> Virtual buffer size [Default = 0]
Here is a reference link:
And hardware preset type:
-hpt <type> HW preset type (1 = ultrafast, 2 = fast, 3 = medium, 4 = slow)
Please note hardware preset type improves image quality but affects encoding speed. Slow type may not be able to achieve 4Kp30.