You've followed the excellent suggestions from BOB__BI and R Profitt to optimize your PC's performance, especially reinstalling the RAM in the correct slots and disabling or uninstalling unneeded apps and processes. The PC should be running better now. One more tip: go to Power Options and select High Performance. This ensures the cpu and RAM run at peak performance. (You may even be able to set Ultimate Performance depending on your exact version of Windows.)
After that, the biggest remaining bottleneck is NOT your Core i5-2400 cpu. The biggest bottleneck is definitely the onboard Intel HD graphics. Go ahead and install the GTX 1050Ti graphics card. It's a good card for 1080p gaming and has vastly, VASTLY more muscle for the streaming job compared to Intel HD 2000 Graphics. Your PC's power supply has plenty of power for adding the G-card. You also need an SSD. A good quality 120GB SSD can be had for as little as $30. "Clone" your Existing Windows system onto the SSD to make the PC faster, more sponsive (or you can do a fresh install of Windows if preferred). Youtube has plenty of video tutorials on how to do it.
Do these two things - graphics card + SSD - and your PC will certainly be able to stream smoothly at 720p (which looks good on Youtube), and it will probably even stream OK at 1080p.
I've converted several HP and Lenovo PCs equipped with the Intel Core i5-2400 into gaming PCs by minimizing unnnecessary apps & processes, then adding a GTX or 1050Ti. Most new games can run smoothly at Medium detail @1080p, while a few need to be run at 720p. You should be able to capture and stream your PS4 gaming, no problem.
The worst case scenario is that it works, but after a while you want to upgrade the PC. Well, you still have a nice little graphics card and SSD you can put in the next PC if desired. Sounds like a win either way!