i5 6400 download 250 uplead 250 camara logitech brio but the stream is laging so hard i dont know why i use obs and5000 Kbps software x264 i have 8gb ram and now i use 1280 x 720p and its sooo lagy dont want load my stream my camara
Your lag could be caused by a few things, best thing to do is open up task manager while your stream is running and it will show you where the issue is (you might need to click more details) it will show you cpu usage, ram usage, hdd usage etc, so whatever is hitting close to 100% is what is most likely to be causing the issue. It could be the cpu, but a 6400 shouldnt have any issues doing a 720p stream so IMO it's unlikely to be that. IMO 4k is kind of a waste when it comes to cam, 4k displays are such a small part of the market it dosnt really make sense, 1080 @60fps would make more sense imo.
If none of the usage is getting close to 100% then the lag could be caused by temperature issues, you can check the cpu temp by downloading hardware monitor, if you got the pc when the i5-6400 was released (2015) then it could just be that the thermal paste needs replacing, or if you havnt cleaned the dust out in a while that could be another thing that would cause high temps. (when temps get high the pc lowers performance to stop it over heating)
If you wanted to replace the entire system any 12/13th gen i5 or Ryzen 5 system would be more than capable of handling your stream.
If the cpu usage is high then you can add in a dedicated graphics card (something like a gtx 1650 should be capable of encoding a 4k stream) and then switching to hardware encoding
If you just wanted to replace the cpu, the 9th gen is the newest one that will fit in your current pc, you might be able to get away with an i5 9th gen, tbh given the age I would just look for an i7 or i9 at that age though.
If you wanted to keep the current system I would look at upgrading the ram to 16gb though, especially if you are doing software encoding. Software encoding is very ram heavy.
Things generally arnt as simple as what single part do I need since everything is interconnected, if you have a 13th gen i9 but dont have enough ram for example you will still have issues with your stream lagging.