OBS Studio 30.1.2: OBS is free, open source video recording and editing software.
It's open code and cross platform (Windows, Mac, Linux). It can record video, and stream everything that happens on your computer screen.
It is written in C and C++, and uses all known and unknown- services streaming of our time: Twitch.tv, Youtube/Youtube Gaming, hitbox, beam.pro, Daily Motion, Livecoding.tv, Web.Tv, and many more.
Of course, it can also be used to record on video what is happening on your computer screen, even if you are playing a game.
It utilizes its potential DirectX 11 but you can configure it for OpenGL as well. For video encoding, it uses, among others, codec features such as x264 free software library, Intel Quick Sync Video and Nvidia NVENC to create video streams in H.264/MPEG-4 AVC format, offering the best possible ratio between file size and quality.
GitHub releasenotes
Download the application on the platform you are interested in