mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-04-04 18:46:37 +09:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a0fb9f449 | ||
|
|
73fd0a30cd | ||
|
|
085d4632d2 | ||
|
|
39503de742 |
@@ -193,3 +193,5 @@ KDE Plasma version 6.2 broke HDR and ICC profiles for screen recorders. This was
|
||||
I don't know how well recording HDR works in wayland compositors other than KDE plasma.
|
||||
## GPU Screen Recorder starts lagging after 30-40 minutes when launching GPU Screen Recorder from steam command launcher
|
||||
This is a [steam issue](https://github.com/ValveSoftware/steam-for-linux/issues/11446). Prepend the gpu-screen-recorder command with `LD_PREFIX=""`, for example `LD_PREFIX="" gpu-screen-recorder -w screen -o video.mp4`.
|
||||
## The video isn't smooth when gpu usage is 100%
|
||||
If you are using the flatpak version of GPU Screen Recorder then try installing GPU Screen Recorder from aur or source instead. Flatpak has a limitation that prevents GPU Screen Recorder from running faster when playing very heavy games.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
|
||||
@@ -66,6 +67,9 @@ bool gsr_dbus_client_init(gsr_dbus_client *self, const char *screencast_restore_
|
||||
char socket_pair_server_str[32];
|
||||
snprintf(socket_pair_server_str, sizeof(socket_pair_server_str), "%d", self->socket_pair[1]);
|
||||
|
||||
/* Needed for NixOS for example, to make sure gsr-dbus-server doesn't inherit cap_sys_nice */
|
||||
prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0);
|
||||
|
||||
const char *args[] = { "gsr-dbus-server", socket_pair_server_str, self->screencast_restore_token ? self->screencast_restore_token : "", NULL };
|
||||
execvp(args[0], (char *const*)args);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define GSR_DBUS_CLIENT_H
|
||||
|
||||
/*
|
||||
Using a client-server architecture is needed for dbus because cap_sys_nice doesn't work with desktop portal.
|
||||
Using a client-server architecture is needed for dbus because cap_sys_nice breaks desktop portal.
|
||||
The main binary has cap_sys_nice and we launch a new child-process without it which uses uses desktop portal.
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Description=GPU Screen Recorder Service
|
||||
EnvironmentFile=-%h/.config/gpu-screen-recorder.env
|
||||
Environment=WINDOW=screen
|
||||
Environment=CONTAINER=mp4
|
||||
Environment=QUALITY=50000
|
||||
Environment=QUALITY=40000
|
||||
Environment=BITRATE_MODE=cbr
|
||||
Environment=CODEC=auto
|
||||
Environment=AUDIO_CODEC=opus
|
||||
@@ -27,4 +27,4 @@ Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
WantedBy=default.target
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
project('gpu-screen-recorder', ['c', 'cpp'], version : '5.5.2', default_options : ['warning_level=2'])
|
||||
project('gpu-screen-recorder', ['c', 'cpp'], version : '5.5.3', default_options : ['warning_level=2'])
|
||||
|
||||
add_project_arguments('-Wshadow', language : ['c', 'cpp'])
|
||||
if get_option('buildtype') == 'debug'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "gpu-screen-recorder"
|
||||
type = "executable"
|
||||
version = "5.5.2"
|
||||
version = "5.5.3"
|
||||
platforms = ["posix"]
|
||||
|
||||
[config]
|
||||
|
||||
@@ -39,6 +39,12 @@ static void reset_cap_nice(void) {
|
||||
if(!caps)
|
||||
return;
|
||||
|
||||
cap_flag_value_t cap_sys_nice_value = CAP_CLEAR;
|
||||
cap_get_flag(caps, CAP_SYS_NICE, CAP_EFFECTIVE, &cap_sys_nice_value);
|
||||
if(cap_sys_nice_value == CAP_CLEAR) {
|
||||
fprintf(stderr, "gsr warning: cap_sys_nice capability is missing on the gpu-screen-recorder binary, performance might be affected. If you are using the flatpak version of gpu-screen-recorder then the only fix is to use a non-flatpak version of gpu-screen-recorder\n");
|
||||
}
|
||||
|
||||
const cap_value_t cap_to_remove = CAP_SYS_NICE;
|
||||
cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap_to_remove, CAP_CLEAR);
|
||||
cap_set_flag(caps, CAP_PERMITTED, 1, &cap_to_remove, CAP_CLEAR);
|
||||
|
||||
Reference in New Issue
Block a user