aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2026-05-16 21:57:52 +0200
committerdec05eba <dec05eba@protonmail.com>2026-05-16 21:57:55 +0200
commitb83ee825b8b59a03a94e9bb42dd490500da0e5b4 (patch)
treec61cf7132ce12ecacd06ecaeea11299764cbb361
parent23703bb590c376b6011b0aadff49b7d7b4414146 (diff)
Fix audio/video desync when recording while replaying/streaming
Thanks Reginald Gillespie
-rw-r--r--TODO2
-rw-r--r--src/main.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/TODO b/TODO
index fb87ec0..935388e 100644
--- a/TODO
+++ b/TODO
@@ -420,3 +420,5 @@ Fix webcam capture on nvidia x11. It doesn't work when capturing a webcam at the
Make -fm content the default, but first make it record at no lower than 2 fps if nothing updates. This is to make sure live streaming works and seeking in video player doesn't get messed up.
Fix camera capture on nvidia x11. It doesn't work with mjpeg either now because external shader compilation fails.
+
+Revert the revert of improving pipewire capture, for better cursor capture. It caused glitches for some, especially in kde plasma when hdr is enabled. Try marking test and moving the cursor and see.
diff --git a/src/main.cpp b/src/main.cpp
index 5eae367..c2a5516 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -639,6 +639,7 @@ static void open_video_software(AVCodecContext *codec_context, const args_parser
av_dict_set(&options, "preset", "veryfast", 0);
av_dict_set(&options, "tune", "film", 0);
+ av_dict_set_int(&options, "forced-idr", 1, 0);
if(codec_context->codec_id == AV_CODEC_ID_H264) {
av_dict_set(&options, "coder", "cabac", 0); // TODO: cavlc is faster than cabac but worse compression. Which to use?
@@ -746,6 +747,7 @@ static void open_video_hardware(AVCodecContext *codec_context, bool low_power, c
// av_dict_set(&options, "tune", "ll", 0);
// }
av_dict_set(&options, "tune", "ll", 0);
+ av_dict_set_int(&options, "forced-idr", 1, 0);
switch(arg_parser.tune) {
case GSR_TUNE_PERFORMANCE: