Need a project to easily capture the last 30 seconds of action? ReplaySorcery might just be the open source project that you're looking for.
Unfortunately, on Linux the GPU vendors like AMD and NVIDIA do not provide their special tools like ShadowPlay or ReLive. On Windows, those can give you simple to use and high quality instant-replay recording. On Linux, you could use OBS Studio but it's a bit overkill, needs it to always be open and always recording. This is where ReplaySorcery comes in, giving you a new way to capture the action.
Here's an example video, after some testing by me:
That's a completely unedited recording done by ReplaySorcery. Game featured: ScourgeBringer.
How does it work? You set it up as a systemd service, so it's running in the background. You can then just hit Ctrl+Super+R (info: the Super key is otherwise known as the 'Windows key'), and then it will output it into a video file for you into your Home / Videos folder. Curiously, it encodes it using JPEG and then when you come to save it switches over to x264 to make a video file.
The result as you can see is wonderfully smooth too and after testing it in a few games, I didn't see a drop in performance for them either—nice! While it currently doesn't support audio capture, that's eventually part of their plan. It's also not currently supported on Wayland. While there's other ways to do it, If all you need is a quick and simple capture tool, ReplaySorcery definitely does the job.
Check out ReplaySorcery on GitHub if you're interested.