Coder Social home page Coder Social logo

fzwoch / obs-gnome-screencast Goto Github PK

View Code? Open in Web Editor NEW
117.0 5.0 14.0 82 KB

GNOME Screen Cast OBS Studio plugin

License: GNU General Public License v2.0

C 91.60% Meson 7.04% Dockerfile 1.36%
obs studio gnome wayland linux plugin mutter obs-studio gnome-screen-cast

obs-gnome-screencast's Introduction

NOTE: GNOME has begun to restrict private APIs access for general user space. Expect this plugin to fail over time. (E.g. window selection is already broken with lasted GNOME release). Really use OBS's portal/pipewire based capture plugins.

GNOME Screen Cast OBS Studio plugin

Small source plugin to use GNOME Screen Cast functionality as a source for OBS Studio.

GNOME Screen Cast works for all GNOME sessions regardless of the compositor being used. Basically saying that the main purpose of this plugin is to capture screens under Wayland sessions where the X11 capture falls short.

You need to have GNOME Screen Cast application installed as well as the GStreamer pipewire elements. Make sure that in "GNOME Settings" you have "Sharing -> Desktop Sharing" enabled.

Note

OBS Studio v27 does come with it's own Wayland capable Desktop/Window capture via XDG-Desktop-Portal.

https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.ScreenCast.xml

So you probably just want to make use of that one. This is complementary, in case this fits your specific needs a little better.

Build

Refer to the Dockerfile and .gitlab-ci.yml files on how to get a development workspace and how to build the plugin.

Fedora build

requirements include gstreamer1-plugins-base-devel ghc-gi-gio-devel.x86_64 obs-studio-libs obs-studio-devel. Install with dnf install

obs-gnome-screencast's People

Contributors

bdaase avatar birdsarah avatar fzwoch avatar goggle avatar ilippert avatar itsmattkc avatar stripedmonkey avatar tingping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

obs-gnome-screencast's Issues

Not showing up as source

Hi,

I installed the plugin by copying gnome-screencast.so into /usr/local/lib/obs-plugins, but unfortunately it did not appear in OBS as a source option, even after a reboot.

What am I missing?

Mouse cursor doesn't draw even when "Draw mouse cursor" is selected.

After an update to GNOME 3.36.2 mouse cursor doesn't seem to be picked up by the plugin anymore. I also updated to a new OBS version, but I feel like this is more likely to be a GNOME-related issue rather than OBS-related. Apart from the missing mouse cursor the screen contents do get picked up without issue.

Relevant software versions:

  • GNOME 3.36.2
  • OBS 25.0.8

Can provide more details if needed.

obtaining window IDs

In my quest to do single-window recording on wayland I found this plugin, and noticed the new feature, but in trying to get it to work I can't actually figure out how to get the window-ID, it's not the PID, or any property I can seem to find in something like looking glass unless there's something I'm missing. I'm not really a mutter guru, so I'm probably missing something obvious.

Blackscreen only on Wayland Gnome 3.36.2

On Gnome Wayland 3.36.2, after installing the obs-gnome-screencast I having only a black screen. The screen sharing on Gnome settings is activated and gstreamer pipewire elements are installed, as suggested in the instructions. I am on Arch.

error: Error gst_parse_launch(): no element "pipewiresrc" on Fedora 32

It doesn't work on Fedora 32 with OBS 25.0.4 and outputs only black screen with error: Error gst_parse_launch(): no element "pipewiresrc"

info: Switched to scene 'Scene' info: ------------------------------------------------ info: Loaded scenes: info: - scene 'Scene': info: - source: 'GNOME Mutter Screen Cast' (gnome-mutter-screencast-source) info: ------------------------------------------------ Attempted path: share/obs/obs-studio/images/overflow.png Attempted path: /usr/share/obs/obs-studio/images/overflow.png error: Error gst_parse_launch(): no element "pipewiresrc"

How to install it on Fedora 31 ?

Hello,

I downloaded the ZIP archive, extracted it and copied the folder in /usr/share/obs/obs-plugins/ but I don't see "Desktop Screencast (Wayland/X11)" in the sources.

It's the first time I try to install a plugin in OBS so I'm probably missing something...

Sorry if my question seems dummy.

Thanks for your help.

Built and installed on Fedora 31, but does not work

Built and installed according to instructions, but does not work. OBS still fails to capture screen. Complete output from terminal:

QSocketNotifier: Can only be used with threads started with QThread
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
info: CPU Speed: 2700.026MHz
info: Physical Cores: 2, Logical Cores: 4
info: Physical Memory: 7858MB Total, 879MB Free
info: Kernel Version: Linux 5.3.7-301.fc31.x86_64
info: Distribution: Fedora 31
info: Window System: X11.0 - vendor string: Fedora Project - vendor release: 12005000
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_clicked()
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_destroyed()
QMetaObject::connectSlotsByName: No matching signal for on_program_customContextMenuRequested(QPoint)
info: OBS 24.0.3 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 44100
	speakers:        1
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Open Source Technology Center Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
info: OpenGL loaded successfully, version 4.5 (Core Profile) Mesa 19.2.1, shading language 4.50
info: ---------------------------------
info: video settings reset:
	base resolution:   1920x1080
	output resolution: 1920x1080
	downscale filter:  Bilinear
	fps:               30/1
	format:            NV12
	YUV mode:          601/Partial
info: NV12 texture support not available
info: Audio monitoring device:
	name: Default
	id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
info: No blackmagic support
error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: cannot open shared object file: No such file or directory

info: FFMPEG VAAPI supported
info: VLC found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-jack.so
info:     linux-decklink.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-ouput-ui.so
info: ---------------------------------
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 13.0-rebootstrapped'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.iec958-stereo'
info: xshm-input: Geometry 1920x1080 @ 0,0
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'Screen Capture (XSHM)' (xshm_input)
info: ------------------------------------------------
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
info: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds (source: Mic/Aux)

error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain

Disappearing cursor and freezing video on some fullscreen applications

For example recording alacritty or other terminals on fullscreen is fine, while games (like factorio or minecraft) on preview and recording are frozen and cursor disappears when playing

Focusing back on OBS window un-freezes recording

It only happens when game is on screen that is being captured

System: Fedora 33, Ryzen 2500U

Edit: Could it be issue with XWayland?

Fedora install via snap

How to install the obs-gnome-screencast via snap:
Fedora 33
Gnome 3.38.2 wayland

  • Install OBS, sudo snap install obs-studio --edge
  • Search the plugin directory, snap info obs-studio
    Usually: ~/snap/obs-studio/current/.config/obs-studio/plugins/
  • Download and install plugin to specific directory:
    • Create the special plugin directory
      mkdir -p ~/snap/obs-studio/current/.config/obs-studio/plugins/gnome-mutter-screencast/bin/64bit
    • Save the plugin to specific directory
      cd ~/snap/obs-studio/current/.config/obs-studio/plugins/gnome-mutter-screencast/bin/64bit
      wget -q -O tmp.zip https://github.com/fzwoch/obs-gnome-screencast/releases/download/v0.1.1/gnome-mutter-screencast.zip && unzip tmp.zip && rm -f tmp.zip

Screencast is not updating.

Running on Manjaro. OBS 26.1.2
I'm not sure what sort of logs you might need. Here's a video of the issue.

Screencast.from.11-02-21.13.16.10.mp4

Fix Gtk deprecated function use for Monitor plug names

../gnome-mutter-screencast.c: In function 'get_defaults':
 ../gnome-mutter-screencast.c:402:3: warning: 'gdk_screen_get_monitor_plug_name' is deprecated: Use 'gdk_monitor_get_model' instead [-Wdeprecated-declarations]
    plug_name = gdk_screen_get_monitor_plug_name(screen, 0);

These are deprecated and most likely will go away with Gtk 4. Unfortunately using gdk_monitor_get_model() as suggested does not give the same result, so it cannot be used.

Perhaps consider /sys to figure out Monitor plug names.

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.