How can I record button presses when recording a video on PC?

Motivation

So, I'm having difficulties with clearing some timed levels in a platformer. Even when I feel like I've pressed every button perfectly, I can still barely clear it; and some levels are still beyond me. I've tried watching regular videos on YouTube, but they seem pretty much like the same thing that I do - except they make it and I don't. I've tried looking at speedruns, but what happens there is so mindbending that I cannot even begin comprehending it.

So I was thinking about asking for help on the internet. Probably on some speedrunning forum where this would be on topic, but maybe here. But to ask for help in a meaningful way would also involve showing them what I'm already doing - and that means recording a video. Even more, since some things can happen so fast that it's unclear what is being done, I would like my button presses to also be visible in the video.

Question

I know of plenty of ways to record a session. Fraps, Microsft Game Bar, the Radeon software - just to name a few. But they all only record what is visible on the screen. I would also like my button presses to be visible there. I'm using a USB gamepad (controller?), but I can also play with the keyboard, if that makes things easier. I haven't seen any videos like that so I'm guessing this is an uncommon thing to do. But does anyone know of a way?


Solution 1:

A solution to this problem (although I haven't tried it myself) would be to download OBS. There are many tutorials on how to set up a screen recording, I personally used this tutorial to set up screen recording although there may be better ones.

Once that's set up you can follow some tutorials from the forums or look up "obs input overlay tutorial."

I'm not completely sure this method may work since I haven't tried it myself, but it seems like the best solution.

(Streamlabs, might have input overlay but I haven't seen many results on it)