Recording a window with OBS is very easy, this allows easy streaming and recording of gameplay or a video window.
The screenshot above shows an OBS studio window displaying a video window, you select the window by double-clicking the Window Capture (Xcomposite) 2 option. This brings up another dialogue to select any open window on your desktop to record.
Then, click the Window option to select the desired window. This can be used to stream to Youtube for free, as long as you get a stream key. But recording a window to a video file works too. Press Start Recording to begin recording a video file. Press the Settings button to set the video resolution and the keybinds for starting and stopping recording or streaming. Using numpad keys is handy. Should not conflict with game keybinds. The video resolution, base resolution and output scaled resolution can be the same. This works just fine.