I've never understood why people ask this question, there is no magic answer. If you have a lot of cores, use x264 and use the highest CPU preset you can for the resolution/FPS you want to stream at.
My 2700x/1080Ti can Stream 720p60 x264 Medium while simultaneously recording at 1440p60 NVENC CQP 20, without Rendering Lag or Skipped Frames and without capping my FPS in game(Yes, 100% GPU usage without Lagged Frames)
I know this because I tested the limits of my PC, you don't learn anything if you just take what some random on the internet tells you to type in.