SeaDve / Kooha

Elegantly record your screen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kooha stutters when recording on 5K monitor

VeldoraTheDragon opened this issue · comments

System Info

- io.github.seadve.Kooha 2.2.3
- Flatpak: false
- Experimental: false

- Distribution: Arch Linux
- Desktop Session: gnome
- Display Server: wayland

- GTK 4.10.1
- Libadwaita 1.3.1
- GStreamer 1.22.1
- Pipewire 0.3.69

Describe the bug
When recording a 5K Monitor, the clock stutters and when viewing the recorded video, it stutters aswell.
Also, the video is not complete. By that I mean, that the last scene in the video is not the same as on my screen.

To Reproduce
Steps to reproduce the behavior:

  1. Select 5K Monitor to record
  2. Record a video
  3. Observe

Expected behavior
The video should be recorded like recording the internal laptop screen.
Fluent, without stuttering and not auto-cutting the video.

Screenshots
Final screen, after recording the video
final_screen

Kooha config used for the video.
kooha_config

Additional context
If applicable, please attach the logs from running Kooha in the
terminal with the following environment variables: RUST_BACKTRACE=1 RUST_LOG=kooha=debug GST_DEBUG=3 PIPEWIRE_DEBUG=3
(e.g., RUST_BACKTRACE=1 RUST_LOG=kooha=debug GST_DEBUG=3 PIPEWIRE_DEBUG=3 flatpak run io.github.seadve.Kooha).

kooha_log.txt

Additional video
https://user-images.githubusercontent.com/127216238/232750851-4cbdb2de-98cf-4e09-af00-28dbca961dfd.mp4

Since we're only using wayland as display server, we're kind of limited when it comes to video recording software.
It would be a blast, if the problem could be looked into and fixed.
And we're not installing flatpak on Arch Linux, due to the large software availability of the AUR.

Thanks.
~ Veldora

This is likely the encoder cannot keep up with the incoming frames. Is this also reproducible in 30FPS?

Hi, thank you for answering

When setting the FPS to 30, it seems fine to me.
No stuttering or anything similar.

Is this anything you can solve within Kohaa or is it the encoder, which is installed on my system, as you've mentioned?

Thanks for the quick reply!

Is this anything you can solve within Kohaa or is it the encoder, which is installed on my system, as you've mentioned?

There is hardware-accelerated encoding, but it is experimental and so, it is hidden behind KOOHA_EXPERIMENTAL=1 env.

Alright.
Unfortunately, when running KOOHA_EXPERIMENTAL=1 kooha and then recording with 60fps, it's still stuttering.

But I guess 30fps is totatlly fine for a 5K monitor, since I didn't notice a difference between 60fps and 30fps.

Unfortunately, when running KOOHA_EXPERIMENTAL=1 kooha and then recording with 60fps, it's still stuttering.

You have to select a different encoder, particular the VAAPI ones, from the preferences too

You have to select a different encoder, particular the VAAPI ones, from the preferences too

I have now tried the VAAPI encoder, in combination with KOOHA_EXPERMIMENTAL=1.

When recording the 5K monitor, it stutters the same as before.

(I still don't know if that's the setting you've meant)

You have to select a different encoder, particular the VAAPI ones, from the preferences too

I have now tried the VAAPI encoder, in combination with KOOHA_EXPERMIMENTAL=1.

When recording the 5K monitor, it stutters the same as before.

(I still don't know if that's the setting you've meant)

Yep, I think you got it right, the VAAPI VP8/VP9/H264 ones.

However, the current version 2.2.4 still does the processing on the CPU before it get passed into the encoder. I worked on the new version to do the processing completely on the GPU. If you could build and try the main branch, please do.

I will try to test the main-branch as soon as GTK 4.13 hits stable.
(Which is required according to the meson.build)

Currently it's unstable and only available in the gnome-unstable repo, which I won't activate on my machine, since I don't like to install an unstable version of an entire DE.

I see, that's understandable.

I think GTK 4.13 will never hit stable. GTK 4.14 and other even versions would be the one which will reach stable.

On the other hand, if you use Flatpak, it would be easier and won't install additional packages, other than the runtime. There's also a prebuilt package: https://github.com/SeaDve/Kooha/actions/runs/8036231577/artifacts/1272837145

When trying to install the flatpak version of the dev-environment, requiring org.gnome.Platform/x86_64/master failed, since it couldn't be found.

However when installing the gnome.Platform manually, only the versions are viable options, e.g.:

  • org.gnome.Platform/x86_64/45
  • org.gnome.Platform/x86_64/44
  • org.gnome.Platform/x86_64/43
  • org.gnome.Platform/x86_64/42
  • ...

Could it be, that gnome changed something in the structure and the dependency of the flatpak needs to be updated?

Sorry, forgot to say you also need to add gnome-nightly repo:

flatpak remote-add --user --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo

so org.gnome.Platofrm//master would exist

Okay the following:
I've run the program with KOOHA_EXPERIMENTAL=1 flatpak --user run io.github.seadve.Kooha.Devel

  • WebM (VP9): More fluent, but still stuttery
  • WebM (AV1): No changes, still stuttery as default.
  • WebM VA H262: Doesn't work at all:
An error occurred while recording

Caused by:
    0: ../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstPipeline:pipeline7/GstBin:kooha-pipewiresrc-bin/GstPipeWireSrc:pipewiresrc7:
       streaming stopped, reason not-negotiated (-4)
    1: Internal data stream error.

If you need any more information, I'll try to help where I can.