OBS software is free open source software for enrollment video. It is open source, cross platform (Windows, Mac, Linux) can record video, and do streaming of everything that happens in screen your computer.
It is written in C and C++, and uses all known and unknown streaming services 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 takes advantage of DirectX 11 but you can also configure it for OpenGL. For video encoding, it uses, among others, codec capabilities 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