hey - why not using OBS Studio with Xaymar's AMF Plugin?
Releases · Xaymar/obs-studio_amf-encoder-plugin · GitHub
here you have more possibilities for custom Settings
AMFenc Plugin for OBS Studio (by Xaymar) - YouTube
some videos with videos with old Plugin (you can find some newer videos on my channel and compare the quality to your videos)