If screen recording is actually the thing causing the issue you might try CPU encoding with one of the fast lossless codecs and doing the "real" encoding in a second pass later. As a bonus, software encoding should also give a higher quality result. That does require an SSD and quite a bit of free space though.