The right software alone isn't going to do trick. It all depends on your setup, especially if you're doing local recording. You're going to do a lot of tweaking from your game graphic settings to what driver you are using for recording.
There's also the unfortunate side of having to know how the driver in question works too.
Recently, I made a switch in OBS from cpu intensive recording (x264) to using my gpu instead (AMDF which is the NVENC version for AMD cards), this resulted with large files but really good quality recording, the problem however, was choppy playback.
After hours, more like a couple of days of reading and testing, it turns out that during recording, the dumps of both video and audio are out of sync leading to this corruption. Further reading, sigh, revealed that I need to enable a setting which will alleviate this issue. Just one and it worked.
Also, it never ends, I'm currently playing the Division2. For whatever reason this game just does not like being recorded. Now I don't have a powerful enough gpu (R9 290) as it's getting on but do have a powerful cpu (R7 2700). This game didn't like sharing the cpu, as the gameplay was a stuttering mess, hence the switch to gpu based recording.
All is well and good but the moment I open OBS, the game becomes slightly sluggish with frame skips and some major frame drops. I've done everything I could so far with plenty of headroom for both game and OBS to record.
The funny thing is, the final recording is fine.
Edit: typo