aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-24 01:29:30 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-24 01:29:30 +0200
commite107adbc32ebae14e6f0ae49338a95e8d31d9d84 (patch)
tree544b894a3857aee4eef8b23b48c0ff1c0f937100
parent7d719a44c6ce76ecfc05287d0cbb2b36e84b4ca6 (diff)
Show warning when amd driver adds black bars, set frame resolution after changing video codec context resolution
-rw-r--r--TODO6
-rw-r--r--kms/client/kms_client.c2
-rw-r--r--src/encoder/video/vaapi.c7
3 files changed, 12 insertions, 3 deletions
diff --git a/TODO b/TODO
index ff2f917..00989c0 100644
--- a/TODO
+++ b/TODO
@@ -20,7 +20,7 @@ Reverse engineer nvapi so we can disable "force p2 state" on linux too (nvapi pr
Support yuv444p on amd/intel.
fix yuv444 for hevc.
Do not allow streaming if yuv444.
-Re-enable yuv444.
+Re-enable yuv444 and allow yuv444 for software encoding. Good for remote desktop. But for remote desktop its more ideal to use yuv420 and when the image is not moving then send a png image instead, for clear image when the image is static.
Support 10 bit output because of better gradients. May even be smaller file size. Better supported on hevc (not supported at all on h264 on my gpu).
Add nvidia/(amd/intel) specific install script for ubuntu. User should run install_ubuntu.sh but it should run different install dep script depending on if /proc/driver/nvidia/version exists or not. But what about switchable graphics setup?
Test different combinations of switchable graphics. Intel hybrid mode (running intel but possible to run specific applications with prime-run), running pure intel. Detect switchable graphics.
@@ -160,4 +160,6 @@ Show rotated window size in monitor list when using incorrect monitor name.
Desktop portal capture on kde plasma makes notifications not show up unless the notification is set as urgent. How to fix this? do we have to make our own notification system?
-Add the option to specify a path to desktop portal session token, to allow different recording modes (streaming, recording, replay) to restore with different setup. \ No newline at end of file
+Add the option to specify a path to desktop portal session token, to allow different recording modes (streaming, recording, replay) to restore with different setup.
+
+Explicit sync is done with the drm property IN_FENCE_FD (see https://drmdb.emersion.fr/properties/4008636142/IN_FENCE_FD). Check if this needs to be used on wayland (especially on nvidia) when capturing a monitor directly without desktop portal.
diff --git a/kms/client/kms_client.c b/kms/client/kms_client.c
index 80bb9cd..d3e68dd 100644
--- a/kms/client/kms_client.c
+++ b/kms/client/kms_client.c
@@ -103,7 +103,7 @@ static int recv_msg_from_server(int server_pid, int server_fd, gsr_kms_response
int status = 0;
int wait_result = waitpid(server_pid, &status, WNOHANG);
if(wait_result != 0) {
- res = 0;
+ res = -1;
break;
}
usleep(1000);
diff --git a/src/encoder/video/vaapi.c b/src/encoder/video/vaapi.c
index 952fab4..910eb18 100644
--- a/src/encoder/video/vaapi.c
+++ b/src/encoder/video/vaapi.c
@@ -168,6 +168,13 @@ static bool gsr_video_encoder_vaapi_start(gsr_video_encoder *encoder, AVCodecCon
}
}
+ if(video_codec_context->width != frame->width || video_codec_context->height != frame->height) {
+ fprintf(stderr, "gsr warning: gsr_video_encoder_vaapi_start: black bars have been added to the video because of a bug in AMD drivers/hardware. Record with h264 codec instead (-k h264) to get around this issue\n");
+ }
+
+ frame->width = video_codec_context->width;
+ frame->height = video_codec_context->height;
+
if(!gsr_video_encoder_vaapi_setup_context(encoder_vaapi, video_codec_context)) {
gsr_video_encoder_vaapi_stop(encoder_vaapi, video_codec_context);
return false;