Patreon Logo Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal Logo PayPal. You can also buy games using our partner links for GOG and Humble Store.
Title: App to record screen ?
Vinouch 21 Sep 2020
Hello,
Can you suggest a good app to make a video to record the screen while gaming with lose minor FPS please? I tryed simplescreenrecorder, but I lose 50 fps while recording.
!link

Last edited by Vinouch on 21 Sep 2020 at 5:55 pm UTC
This topic has an answer marked - jump to answer.
Liam Dawe 22 Sep 2020
OBS Studio is pretty much the standard for this.
Avehicle7887 22 Sep 2020
As stan pointed out, your i5 is a bit of a bottleneck since it has to share the load with both the game and recording.

To minimize the fps loss I suggest lowering the quality a bit, don't use any compression (this will minimize cpu usage but produce large files. Also if you have 2 drives, don't save the video on the same drive as the game you're recording as this will create a bit of stutter (especially if it's an HDD).

Simplescreenrecorder is not bad, it's what I use for my game recordings with very minimal frame loss. However this is possible due to high thread count and carefully dividing the load using the 'taskset' command.

OBS is also very good and is a much more featured program than SSR.

Last edited by Avehicle7887 on 22 Sep 2020 at 10:38 pm UTC
mrdeathjr 23 Sep 2020
ffmpeg with nvidia nvenc is very good

:smile:
Vinouch 23 Sep 2020
You have comments rocks. Thanks. I tested some of your suggest. But currently, with OBS, the recording with vaapi don't use my GPU and only use cpu. So, I had further more and I found the soluce to record screen while gaming with AMD hardware encoding without lose FPS. I use the following command. Of course, it's not easy to start/stop recording. I will make a GUI front end soon.
ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1920x1080 -i :0 -vf 'hwupload,scale_vaapi=format=nv12' -c:v h264_vaapi -b:v 15M -preset superfast '/home/username/screenrecord.mp4'

Last edited by Vinouch on 23 Sep 2020 at 1:49 pm UTC
whizse 23 Sep 2020
User Avatar
It's a little bit fiddly to get working, but you might want to use kmsgrab instead of x11grab to capture the screen. It will minimize CPU usage and framedrops as all surfaces stay on the GPU.

(Also works on Wayland and in virtual terminals!)
Dragunov 27 Sep 2020
I prefer Kazam screen recorder. It is extremely easy to use and lightweight.
Vinouch 4 Oct 2020
I found exactly what I need.

A small GUI to record in VAAPI:

https://github.com/Philippe734/tiny.vaapi.recorder

External Media: You need to be logged in to view this.
mrdeathjr 5 Oct 2020
Quoting: VinouchI found exactly what I need.

A small GUI to record in VAAPI:

https://github.com/Philippe734/tiny.vaapi.recorder

External Media: You need to be logged in to view this.
External Media: You need to be logged in to view this.


:smile:
Shmerl 5 Oct 2020
Quoting: VinouchI found exactly what I need.

A small GUI to record in VAAPI:

https://github.com/Philippe734/tiny.vaapi.recorder
Nice, it's a small bash script which you can modify for your needs (like changing the codec and etc.).

https://github.com/Philippe734/tiny.vaapi.recorder/blob/main/tiny.vaapi.recorder.sh

Also, I wonder what's the method in the Wayland session where x11grab is not an option. I suppose there must be some ffmpeg / Pipewire integration for that?

Last edited by Shmerl on 5 Oct 2020 at 9:32 pm UTC
whizse 5 Oct 2020
User Avatar
Quoting: VinouchI found exactly what I need.

A small GUI to record in VAAPI:

https://github.com/Philippe734/tiny.vaapi.recorder
Nice!

You might want to remove the preset option though. It has no effect with vaapi, it's a libx264 setting.

You might also want to experiment with using constant quality in lossless mode (if you don't mind large files) using -qp 0 instead of VBR. I seem to recall getting better results with that, but it probably varies from system to system.
whizse 5 Oct 2020
User Avatar
Quoting: ShmerlAlso, I wonder what's the method in the Wayland session where x11grab is not an option. I suppose there must be some ffmpeg / Pipewire integration for that?
[kmsgrab](https://www.ffmpeg.org/ffmpeg-devices.html#kmsgrab) as mentioned in the thread previously, skips those nasty roundtrips to the CPU.
Shmerl 5 Oct 2020
Quoting: whizse[kmsgrab](https://www.ffmpeg.org/ffmpeg-devices.html#kmsgrab) as mentioned in the thread previously, skips those nasty roundtrips to the CPU.
That doesn't sound like a good method - it requires some explicit permissions access that's not on compositor level. The proper way would be something like pipewire and access controlled by the compositor. For less trips, it can be using DMA-BUF.

Last edited by Shmerl on 5 Oct 2020 at 9:52 pm UTC
whizse 5 Oct 2020
User Avatar
Work in progress here FWIW,
https://github.com/obsproject/obs-studio/pull/1758
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon Logo Patreon. Plain Donations: PayPal Logo PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register