Coder Social home page Coder Social logo

Comments (24)

143mailliw avatar 143mailliw commented on May 23, 2024 1

I'm having the same issue on Arch.

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

Perhaps try attaching a regular OBS log. That never hurts.

Also try to run from a console with GST_DEBUG=3 obs and post the log.

from obs-gnome-screencast.

AbrarSL avatar AbrarSL commented on May 23, 2024

2021-02-12 07-32-00.txt
obs_log.txt
obs_log_stderr.txt
Here you go.

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

Everything lloks fine to me. You seem to be on very recent versions so I will just assume this is also GNOME 3.38.

You could crank up the GST_DEBUG variable for furthers logs. There is no error at least. So I can imagine two scenarios: The data is being send to OBS, but we mess up some timestamps that make OBS reject any data after the first (I believe I just increase a frame counter, was never a problem before, but who knows) or the screen capture api does not deliver any more data after the first frame.

Then the GST_DEBUG variable is increased it should log each processing frame if it gets one. So maybe you can make an judge which one of the two scenarios is more likey.

from obs-gnome-screencast.

iwillspeak avatar iwillspeak commented on May 23, 2024

I'm getting the same issue. I ran with GST_DEBUG=TRACE:

stdout.log
trace.log

Anecdotally it looks like more than one frame makes it. You can move things around for a short time before the screen share stops updating.

image

from obs-gnome-screencast.

iwillspeak avatar iwillspeak commented on May 23, 2024

This was working about a month ago. I suspect Gnome is the culprit here, but I have no evidence for that. I can get the xdg-portal plugin to work for screen sharing but the frame rate on that is no where near as smooth as it was with this plugin.

from obs-gnome-screencast.

AbrarSL avatar AbrarSL commented on May 23, 2024

I can get the xdg-portal plugin to work for screen sharing

May I know what that plugin is?

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

I can get the xdg-portal plugin to work for screen sharing

May I know what that plugin is?

There is a link in this project's README.md

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

If it has been working before it may be something due to upstream breakage.

For the record, here some versions that are working for me:

Package: gstreamer1.0-pipewire
Version: 0.3.19-4

Package: libpipewire-0.3-0
Version: 0.3.19-4

Package: libmutter-7-0
Version: 3.38.3-2

Not sure if that is all that are relevant components that may cause issues.

Device: Radeon RX 570 Series (POLARIS10, DRM 3.40.0, 5.10.0-3-amd64, LLVM 11.0.1) (0x67df)

from obs-gnome-screencast.

AbrarSL avatar AbrarSL commented on May 23, 2024

My mutter version is the same but the other packages are newer. Thank you for pointing me to the link as well.

from obs-gnome-screencast.

goggle avatar goggle commented on May 23, 2024

I experience the same issue in Arch Linux.
Has it been identified what the source of issue is? If it is a upstream issue, is there a bug report somewhere?

from obs-gnome-screencast.

konstantinblaesi avatar konstantinblaesi commented on May 23, 2024

Same on Fedora 33, Gnome 3.38.4, OBS 26.1.2

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

It is most likely due to mutter/libmutter breaking things with its latest update. Since nobody seems to post there versions this is just a guess. All I can say is that is works fine with latest Debian unstable.

from obs-gnome-screencast.

goggle avatar goggle commented on May 23, 2024

Here are the version of some packages for which obs-gnome-screencast does not work anymore (at least for me in Arch Linux):

Name            : gst-plugin-pipewire
Version         : 1:0.3.22-1

Name            : pipewire
Version         : 1:0.3.22-1

Name            : mutter
Version         : 3.38.3-1

So the mutter package has the same version in @fzwoch's configuration, but pipewire is more recent.

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

Maybe related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983334

from obs-gnome-screencast.

goggle avatar goggle commented on May 23, 2024

I don't see this defunct process on my system:

$ ps aux | grep pipew
alex         940  0.8  0.1  90448  9372 ?        S<sl 02:31   0:07 /usr/bin/pipewire-pulse
alex        1100  0.5  0.1 111908 15048 ?        S<sl 02:31   0:04 /usr/bin/pipewire
alex        1160  0.0  0.1  89376 10080 ?        S<l  02:31   0:00 /usr/bin/pipewire-media-session
alex        2343  0.0  0.0   6752  2368 pts/0    S+   02:45   0:00 grep --color=auto pipew

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

It perhaps just crashes while trying to screen capture and then gets restarted bei systemd or so. Or maybe not. But did anyone try to revert from .22 to .19?

from obs-gnome-screencast.

iwillspeak avatar iwillspeak commented on May 23, 2024

I'm on Manjaro, so can't easily roll back to .19. I did initially notice this issue on .21. After yesterday's upgrade to pipewire 0.3.22 the OBS now hangs and has to be force closed if an obs-gnome-screencast is added. As for the XDG portal source plugin that also no longer works. I can't get screen sharing to work in browser either. I wonder if this is all related.

Name                  : obs-gnome-screencast
Version               : 0.1.1-2
Name                  : pipewire
Version               : 1:0.3.22-1
Name                  : gst-plugin-pipewire
Version               : 1:0.3.22-1
Name                  : mutter
Version               : 3.38.3-1

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

Most likely as both plugins end up requesting and getting screen data from the same code path under the hood from GNOME.

from obs-gnome-screencast.

goggle avatar goggle commented on May 23, 2024

I installed some older versions of pipewire to see at which version this issue is introduced.
The installed pipewire packages on my Arch Linux system are these:

alsa-card-profiles
pipewire
pipewire-alsa
pipewire-pulse
gst-plugin-pipewire

Everything works fine until version 0.3.20.
With version 0.3.21 it does not work anymore, so the issue is introduced in pipewire version 0.3.21.

from obs-gnome-screencast.

goggle avatar goggle commented on May 23, 2024

After some more digging I was able to identify the upstream commit in pipewire, which introduces the issue:
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/61dab51425533fd7594ebfc844e0acedce8c12b3

I hope this helps to resolve it.

from obs-gnome-screencast.

iwillspeak avatar iwillspeak commented on May 23, 2024

If it is the busy flag that might explain only getting six frames. I suspect the buffer pool only has six buffers in there and things get in a pickle when all of them are makes busy.

from obs-gnome-screencast.

fzwoch avatar fzwoch commented on May 23, 2024

Two things you can try:

gst_buffer_ref(
buffer); // what? need to ref here if we dont want always-copy=true for pipewiresrc

Try to remove that line. This has always been weird. This is not how GStreamer is supposed to work, but for some reason was required when used with pipewire. Perhaps they finally fixed that.

gchar *pipeline = g_strdup_printf(
"pipewiresrc client-name=obs-studio path=%u ! video/x-raw ! "
"appsink max-buffers=2 drop=true sync=false name=appsink",
node_id);

Try adding always-copy=true to the pipewiresrc element. It adds an additional copy which is not really wanted but if it helps, it helps. This behavior was also weird in the past.

Maybe a combonation of the two will make it work.

from obs-gnome-screencast.

goggle avatar goggle commented on May 23, 2024

Thanks @fzwoch!

I have tried all the three possible combinations:

  1. Removing gst_buffer_ref: Now screen-recording in obs-studio works again, but when trying to exit obs-studio or removing Gnome Mutter Screen Cast from Sources, the program obs-studio freezes and needs to be terminated with a SIGKILL.
  2. Adding always-copy=true to pipewiresrc: This only works for a short time (maybe 10 seconds) on my machine, after that, obs-studio suddenly crashes.
  3. The combination of both: This seems to work fine. I don't see any problems so far.

from obs-gnome-screencast.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.