Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kooha stutters when recording on 5K monitor #233

Open
VeldoraTheDragon opened this issue Apr 18, 2023 · 12 comments
Open

Kooha stutters when recording on 5K monitor #233

VeldoraTheDragon opened this issue Apr 18, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@VeldoraTheDragon
Copy link

VeldoraTheDragon commented Apr 18, 2023

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

@SeaDve
Copy link
Owner

SeaDve commented Feb 22, 2024

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

@VeldoraTheDragon
Copy link
Author

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?

@SeaDve
Copy link
Owner

SeaDve commented Feb 22, 2024

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.

@VeldoraTheDragon
Copy link
Author

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.

@SeaDve
Copy link
Owner

SeaDve commented Feb 23, 2024

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

@SeaDve SeaDve added the enhancement New feature or request label Feb 23, 2024
@VeldoraTheDragon
Copy link
Author

VeldoraTheDragon commented Feb 26, 2024

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)

@SeaDve
Copy link
Owner

SeaDve commented Feb 26, 2024

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.

@VeldoraTheDragon
Copy link
Author

VeldoraTheDragon commented Feb 26, 2024

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.

@SeaDve
Copy link
Owner

SeaDve commented Feb 26, 2024

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

@VeldoraTheDragon
Copy link
Author

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?

@SeaDve
Copy link
Owner

SeaDve commented Feb 26, 2024

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

@VeldoraTheDragon
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants