I only really have limited knowledge of game capture on the PC - so I can throw in what I know, if it helps.
First things first, if you are capturing from a game console, you'll need a capture card. There are loads of different types out there, for older consoles without HDMI, and the rest that do have HDMI. There are many brands but it basically boils down to an Elgato, Avermedia, or Razer (I'm sure somebody with more knowledge in this area will have others too).
If you're just capturing from a PS4, Elgato HD60s will do the job. It can capture up to 1080p 60FPS. It requires USB 3.0. You just connect it between your console and a PC.
Then you can use software to handle the recording and streaming. Elgato will have it's own, but most people use either OBS or Xsplit. I personally use OBS - it's quite simple to use and has a load of options. If your PC is lacking in power, you may have to experiment with the encoding settings e.g. bitrate for streaming. But I think an i5 with 16GB RAM is more than enough for most things, as most i5's have a hardware encoder, and the Elgato doesn't require dedicated graphics as such.. as all your PC will need to do is crunch some numbers in order to push out what the card is sending through.
If you're capturing PC stuff.. You can record on the PC you're using, but that would require a beefy PC (thats what I do
)
You can capture your commentary audio on your PC, then mix it all together in OBS. You've got full control, so you can change things on the fly before you start streaming or recording.
Doing the recording or streaming in OBS is simple. It can stream directly to Twitch, YouTube, Facebook etc. Or you can record direct to your hard drive and then you can upload as an edited video.
On that note, you can't do any editing/trimming in OBS. You can place simple filters, move stuff around your 'scene' (i.e. lay out whats going to appear on the screen), but you'd have to do any editing in some proper software... Or if you're like me.. Just stick it online as-is warts and all...
Hope that (kinda) helps.