snapcrafters / obs-studio

This is a community-supported modified build of OBS Studio.
https://snapcraft.io/obs-studio
111 stars 37 forks source link

[Bug]: obs immediately closes after I screen sharing #175

Closed mehdiMj-ir closed 8 months ago

mehdiMj-ir commented 8 months ago

What happened?

I want to record my screen but it close after I select screen sharing.

What should have happened?

Work like a charm.

Output of snap info $snap_name

name:      obs-studio
summary:   Free and open source software for live streaming and screen recording
publisher: Snapcrafters✪
store-url: https://snapcraft.io/obs-studio
license:   GPL-2.0
description: |
  OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming
  video content, efficiently. _This is a community-supported modified build of OBS Studio; please
  file issues on the Snapcrafters GitHub:_ https://github.com/snapcrafters/obs-studio/issues

  **Batteries included**

  The snap of OBS studio comes pre-loaded with some extra features:

    * Supports **nvenc (NVIDIA) and VA-API (AMD & Intel) accelerated video encoding**.
    * **Advanced Scene Switcher** plugin; an automated scene switcher
    * **Browser** plugin; CEF-based OBS Studio browser plugin
    * **Directory Watch Media** plugin; filter you can add to a media source to load the oldest or
    newest file in a directory.
    * **Dynamic Delay** plugin; filter for dynamic delaying a video source.
    * **Freeze Filter** plugin; freeze a source using a filter.
    * **GStreamer** plugins; feed GStreamer launch pipelines into OBS Studio and use GStreamer
    encoder elements.
    * **Move Transition** plugin; move sources to a new position during a scene transition.
    * **NDI** plugin; Network A/V via NewTek's NDI.
    * **RGB Levels** plugin; simple filter to adjust RGB levels.
    * **Source Switcher** plugin; to switch between a list of sources.
    * **StreamFX** plugin; collection modern effects filters and transitions.
    * **Text Pango** plugin; Provides a text source rendered using Pango with multi-language
    support, emoji support, vertical rendering and RTL support.
    * **Transition Matrix** plugin; customize Any -> One or One -> One scene transitions.
    * **Waveform** plugin; audio visualization using fftw.
    * **Websockets** plugin; remote-control OBS Studio through WebSockets.

  **Connecting Interfaces**

  For the best experience, you'll want to connect the following interfaces.

     sudo snap connect obs-studio:alsa
     sudo snap connect obs-studio:audio-record
     sudo snap connect obs-studio:avahi-control
     sudo snap connect obs-studio:camera
     sudo snap connect obs-studio:jack1
     sudo snap connect obs-studio:kernel-module-observe

  **NDI**

  If you want to use the NDI plugin you'll need to connect the Avahi Control interface.

     snap connect obs-studio:avahi-control

  **Virtual Camera**

  Starting with OBS 26.1.0, Virtual Camera support is integrated. Here's how to install and
  configure `v4l2loopback`:

     sudo snap connect obs-studio:kernel-module-observe
     sudo apt -y install v4l2loopback-dkms v4l2loopback-utils
     echo "options v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera'   
     exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf
     echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
     sudo modprobe -r v4l2loopback
     sudo modprobe v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera'
     exclusive_caps=1

  **NOTE!** Using `video_nr` greater than 64 will not work.

  **Removable Storage**

  To access content on external storage, connect to the removable-media plug:

     snap connect obs-studio:removable-media

  **3rd Party plugins**

  To install pre-compiled plugins, download and extract the plugin to
  `~/snap/obs-studio/current/.config/obs-studio/plugins/`.

  This is how the Input Overlay plugin looks when correctly installed:

     /home/username/snap/obs-studio/current/.config/obs-studio/plugins/
     └── input-overlay
         ├── bin
         │   └── 64bit
         │       └── input-overlay.so
         └── data
             └── locale
                 ├── de-DE.ini
                 ├── en-US.ini
                 └── ru-RU.ini

  If you want to use the Input Overlay plugin, you'll also need to connect the joystick interface:

     snap connect obs-studio:joystick
commands:
  - obs-studio
snap-id:      6uLU2MJmBURfLNz4rmL4WT2CmtVULE2u
tracking:     latest/stable
refresh-date: today at 22:07 +0330
channels:
  latest/stable:    29.1.3 2023-10-13 (1289) 421MB -
  latest/candidate: ↑                              
  latest/beta:      ↑                              
  latest/edge:      29.1.3 2023-10-15 (1290) 421MB -
installed:          29.1.3            (1289) 421MB -

Output of snap connections $snap_name

Interface                 Plug                                 Slot                            Notes
alsa                      obs-studio:alsa                      -                               -
audio-playback            obs-studio:audio-playback            :audio-playback                 -
audio-record              obs-studio:audio-record              :audio-record                   -
avahi-control             obs-studio:avahi-control             -                               -
browser-support           obs-studio:browser-support           :browser-support                -
camera                    obs-studio:camera                    :camera                         -
content[gnome-42-2204]    obs-studio:gnome-42-2204             gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]     obs-studio:gtk-3-themes              gtk-common-themes:gtk-3-themes  -
content[icon-themes]      obs-studio:icon-themes               gtk-common-themes:icon-themes   -
content[sound-themes]     obs-studio:sound-themes              gtk-common-themes:sound-themes  -
desktop                   obs-studio:desktop                   :desktop                        -
desktop-legacy            obs-studio:desktop-legacy            :desktop-legacy                 -
gsettings                 obs-studio:gsettings                 :gsettings                      -
hardware-observe          obs-studio:hardware-observe          -                               -
home                      obs-studio:home                      :home                           -
jack1                     obs-studio:jack1                     -                               -
joystick                  obs-studio:joystick                  -                               -
kernel-module-observe     obs-studio:kernel-module-observe     -                               -
network                   obs-studio:network                   :network                        -
network-bind              obs-studio:network-bind              :network-bind                   -
opengl                    obs-studio:opengl                    :opengl                         -
password-manager-service  obs-studio:password-manager-service  -                               -
process-control           obs-studio:process-control           -                               -
pulseaudio                obs-studio:pulseaudio                :pulseaudio                     -
raw-usb                   obs-studio:raw-usb                   -                               -
removable-media           obs-studio:removable-media           -                               -
screen-inhibit-control    obs-studio:screen-inhibit-control    :screen-inhibit-control         -
screencast-legacy         obs-studio:screencast-legacy         -                               -
system-observe            obs-studio:system-observe            -                               -
unity7                    obs-studio:unity7                    :unity7                         -
upower-observe            obs-studio:upower-observe            :upower-observe                 -
wayland                   obs-studio:wayland                   :wayland                        -
x11                       obs-studio:x11                       :x11                            -

Output of snap version

snap    2.60.4+23.10
snapd   2.60.4+23.10
series  16
ubuntu  23.10
kernel  6.5.0-9-generic

Relevant log output

No response

Teminal output of app

debug: Found portal inhibitor
debug: Attempted path: ../../data/obs-studio/locale/en-US.ini
debug: Attempted path: ../../data/obs-studio/locale.ini
debug: Attempted path: ../../data/obs-studio/themes/Yami.qss
info: User enabled --multi flag and is now running multiple instances of OBS.
info: Command Line Arguments: --multi
info: Platform: Wayland
info: CPU Name: AMD Ryzen 3 4300GE with Radeon Graphics
info: CPU Speed: 4085.366MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 15276MB Total, 4528MB Free
info: Kernel Version: Linux 6.5.0-9-generic
info: Distribution: "Ubuntu Core" "22"
info: Desktop Environment: KDE (KDE)
info: Session Type: wayland
info: Qt Version: 6.2.4 (runtime), 6.2.4 (compiled)
info: Portable mode: false
info: OBS 29.1.3 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Using EGL/Wayland
/usr/share/libdrm/amdgpu.ids: No such file or directory
info: Initialized EGL 1.5
info: Loading up OpenGL on adapter AMD RENOIR (renoir, LLVM 15.0.7, DRM 3.54, 6.5.0-9-generic)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1, shading language 4.60
info: ---------------------------------
info: video settings reset:
        base resolution:   1920x1080
        output resolution: 1280x720
        downscale filter:  Bicubic
        fps:               30/1
        format:            NV12
        YUV mode:          Rec. 709/Partial
info: NV12 texture support not available
info: P010 texture support not available
info: Audio monitoring device:
        name: Default
        id: default
info: ---------------------------------
info: [3D Effect] loaded version 0.0.2
info: [StreamFX] Loading Version 0.12.0b299-g8b97c2b2
info: [StreamFX] <gfx::opengl> Version 4.6 initialized.
info: [StreamFX] Loaded Version 0.12.0b299-g8b97c2b2
info: [adv-ss] version: 1.23.1
info: [adv-ss] version: 68c6492c3f4e5507a343bd821f7112610d32e430
info: [adv-ss] curl loaded successfully
info: [adv-ss] found curl library
info: [adv-ss] attempting to load "/snap/obs-studio/1289/obs-plugins/64bit/adv-ss-plugins/advanced-scene-switcher-midi.so"
info: [adv-ss] successfully loaded "/snap/obs-studio/1289/obs-plugins/64bit/adv-ss-plugins/advanced-scene-switcher-midi.so"
info: [adv-ss] attempting to load "/snap/obs-studio/1289/obs-plugins/64bit/adv-ss-plugins/advanced-scene-switcher-opencv.so"
info: [adv-ss] successfully loaded "/snap/obs-studio/1289/obs-plugins/64bit/adv-ss-plugins/advanced-scene-switcher-opencv.so"
QCssParser::parseColorValue: Specified color without alpha value but alpha given: 'rgb 0,0,0,0'
QCssParser::parseColorValue: Specified color without alpha value but alpha given: 'rgb 0,0,0,0'
QCssParser::parseColorValue: Specified color without alpha value but alpha given: 'rgb 0,0,0,0'
QCssParser::parseColorValue: Specified color without alpha value but alpha given: 'rgb 0,0,0,0'
warning: No AJA devices found, skipping loading AJA UI plugin
warning: Failed to initialize module 'aja-output-ui.so'
warning: No AJA devices found, skipping loading AJA plugin
warning: Failed to initialize module 'aja.so'
info: [Browser Transition] loaded version 0.1.2
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [Device Switcher] loaded version 0.1.3
QLayout: Attempting to add QLayout "" to DeviceSwitcherDock "", which already has a layout
info: [Directory watch media] loaded version 0.6.2
info: [Downstream Keyer] loaded version 0.2.7
info: [Dynamic Delay] loaded version 0.1.4
info: [Freeze Filter] loaded version 0.3.3
info: [Gradient Source] loaded version 0.3.2
info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture
warning: v4l2loopback not installed, virtual camera disabled
info: [linux-vkcapture] plugin loaded successfully (version 1.4.3)
error: [linux-vkcapture] Cannot bind unix socket to : 13
info: [markdown] loaded version 0.2.1
info: [Media Controls] loaded version 0.3.7
info: [Move Transition] loaded version 2.9.6
warning: Failed to load 'en-US' text for module: 'obs-audio-pan-filter.so'
info: [obs-audio-pan-filter] plugin loaded successfully (version 0.2.3)
info: [obs-browser]: Version 2.21.1
info: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures.2594+g17f8588+chromium-103.0.5060.134 (compiled)
info: [Composite Blur] loaded version 1.0.5
info: [obs-face-tracker] registering face_tracker_filter_info (version 0.7.1)
info: [obs-face-tracker] ft_docks_init: Adding face tracker dock menu action=0x56061fdc57d0
info: VAAPI: API version 1.20
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI HEVC encoding supported
info: [obs-gstreamer] build: 7dd3e69, gst-runtime: 1.20.3
info: plugin loaded successfully (version 0.0.3)
warning: Failed to load 'en-US' text for module: 'obs-multisource-effect.so'
info: [obs-multisource-effect] plugin loaded successfully (version 0.2.1)
warning: Failed to load 'en-US' text for module: 'obs-mute-filter.so'
info: [obs-mute-filter] plugin loaded successfully (version 0.2.2)
info: [obs-ndi] obs_module_load: hello ! (version 4.11.1)
info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Found NDI library at '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: NDI runtime loaded successfully
info: [obs-ndi] load_ndilib: NDIlib_v5_load found
info: [obs-ndi] obs_module_load: NDI library initialized successfully (NDI SDK LINUX 09:57:02 Feb  2 2023 5.5.3)
info: [obs-shaderfilter] loaded version 2.1.1
info: [obs-soundboard] Soundboard plugin version 1.1.0 is loaded
info: [Stroke Glow Shadow] loaded version 0.3.0
info: [obs-teleport] version: 0.6.6
warning: Failed to load 'en-US' text for module: 'obs-text-pthread.so'
info: [obs-text-pthread] plugin loaded successfully (version 2.0.2)
warning: Failed to load 'en-US' text for module: 'obs-urlsource.so'
info: [obs-urlsource] plugin loaded successfully (version 0.1.1)
info: [obs-vaapi] version: 0.4.0, gst-runtime: 1.20.3
info: [obs-websocket 4.9.1-compat] you can haz websockets (version 4.9.1-compat)
info: [obs-websocket 4.9.1-compat] qt version (compile-time): 6.2.4 ; qt version (run-time): 6.2.4
info: [obs-websocket 4.9.1-compat] [obs_module_load] Linked ASIO Version: 101201
info: [obs-websocket 4.9.1-compat] module loaded!
info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.2.3 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.2.4 | Qt version (run-time): 6.2.4
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 101801
info: [obs-websocket] [obs_module_load] Module loaded.
info: [pixel-art] plugin loaded successfully (version 0.0.4)
info: [Recursion Effect] loaded version 0.0.6
info: [Replay Source] loaded version 1.6.12
info: [Scene As Transition] loaded version 1.1.0
info: [Scene Notes Dock] loaded version 0.1.1
QLayout: Attempting to add QLayout "" to SceneNotesDock "SceneNotesDock", which already has a layout
info: [Source Clone] loaded version 0.1.4
info: [Source Copy] loaded version 0.2.2
info: [Source Dock] loaded version 0.3.6
info: [Source Record] loaded version 0.3.2
info: [Source Switcher] loaded version 0.4.2
info: [TimeWarpScan] loaded version 0.1.7
info: [Transition Table] loaded version 0.2.7
info: [Vertical Canvas] loaded version 1.2.5
info: [vlc-video]: VLC 3.0.16 Vetinari found, VLC video source enabled
info: [phandasm_waveform]: Registered v1.7.0 x64
info: [phandasm_waveform]: Using CPU capabilities: AVX2 AVX FMA3 SSE2
info: ---------------------------------
info:   Loaded Modules:
info:     waveform.so
info:     vlc-video.so
info:     vertical-canvas.so
info:     transition-table.so
info:     time-warp-scan.so
info:     text-freetype2.so
info:     source-switcher.so
info:     source-record.so
info:     source-dock.so
info:     source-copy.so
info:     source-clone.so
info:     scene-notes-dock.so
info:     scene-as-transition.so
info:     scale-to-sound.so
info:     rtmp-services.so
info:     replay-source.so
info:     recursion-effect.so
info:     pixel-art.so
info:     obs-x264.so
info:     obs-websocket.so
info:     obs-websocket-compat.so
info:     obs-vst.so
info:     obs-vintage-filter.so
info:     obs-vaapi.so
info:     obs-urlsource.so
info:     obs-transitions.so
info:     obs-text-pthread.so
info:     obs-teleport.so
info:     obs-stroke-glow-shadow.so
info:     obs-soundboard.so
info:     obs-shaderfilter.so
info:     obs-rgb-levels-filter.so
info:     obs-outputs.so
info:     obs-ndi.so
info:     obs-mute-filter.so
info:     obs-multisource-effect.so
info:     obs-localvocal.so
info:     obs-libfdk.so
info:     obs-gstreamer.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     obs-face-tracker.so
info:     obs-composite-blur.so
info:     obs-command-source.so
info:     obs-browser.so
info:     obs-audio-pan-filter.so
info:     move-transition.so
info:     media-controls.so
info:     markdown.so
info:     linux-vkcapture.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-pipewire-audio.so
info:     linux-jack.so
info:     linux-capture.so
info:     image-source.so
info:     gradient-source.so
info:     frontend-tools.so
info:     freeze-filter.so
info:     dynamic-delay.so
info:     dvd-screensaver.so
info:     downstream-keyer.so
info:     dir-watch-media.so
info:     device-switcher.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info:     browser-transition.so
info:     advanced-scene-switcher.so
info:     StreamFX.so
info:     3d-effect.so
info: ---------------------------------
info: [Vertical Canvas] Loaded configuration file
QLayout: Attempting to add QLayout "" to CanvasDock "", which already has a layout
QLayout: Attempting to add QLayout "" to CanvasScenesDock "CanvasDock1080x1920Scenes", which already has a layout
QLayout: Attempting to add QLayout "" to CanvasSourcesDock "CanvasDock1080x1920Sources", which already has a layout
QLayout: Attempting to add QLayout "" to CanvasDock "CanvasDock1080x1920", which already has a layout
info: NV12 texture support not available
info: P010 texture support not available
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_nextButton_clicked()
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_previousButton_clicked()
info: ==== Startup complete ===============================================
info: [adv-ss] trying to reconnect to  in 10 seconds.
info: [adv-ss] reset transition behaviour to adjust active transition type
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.79) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_07_00.6.7.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.79) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_07_00.6.7.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Mic/Aux'
info: PipeWire initialized
info: Switched to scene 'Scene'
info: [Media Source 'Soundboard']: settings:
        input:                   
        input_format:            (null)
        speed:                   100
        is_looping:              no
        is_linear_alpha:         no
        is_hw_decoding:          no
        is_clear_on_media_end:   yes
        restart_on_activate:     yes
        close_when_inactive:     no
        full_decode:             no
        ffmpeg_options:          
info: [obs-face-tracker] save_load_ft_docks saving=0
info: [adv-ss] trying to reconnect to  in 10 seconds.
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'firefox' (pipewire-window-capture-source)
info: - scene 'Vertical Scene':
info: ------------------------------------------------
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
info: [obs-websocket 4.9.1-compat] WSServer::start: Not locked to IPv4 bindings
info: [obs-websocket 4.9.1-compat] server started successfully on port 4444
info: [obs-websocket 4.9.1-compat] IO thread started.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QLayout: Attempting to add QLayout "" to DeviceWidget "Desktop Audio", which already has a layout
QLayout: Attempting to add QLayout "" to DeviceWidget "Mic/Aux", which already has a layout
info: [pipewire] Screencast session created
info: [pipewire] Asking for window
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio)

info: [pipewire] window selected, setting up screencast
[E] pw.loop [loop.c:86 pw_loop_new()] 0x56062075ae90: can't make support.system handle: No such file or directory
Segmentation fault (core dumped)
mehdiMj-ir commented 8 months ago

I recently install Ubuntu 23.10 and I even remove and reinstall it but it didn't work.

alexmurray commented 8 months ago

I can reproduce this - occurs when trying to use the Window Capture (Pipewire) source and selecting any window under a Wayland session.

FHenry commented 8 months ago

Same crash here

info: [obs-websocket 4.9.1-compat] WSServer::start: Not locked to IPv4 bindings
info: [obs-websocket 4.9.1-compat] server started successfully on port 4444
info: [obs-websocket 4.9.1-compat] IO thread started.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QLayout: Attempting to add QLayout "" to DeviceWidget "Desktop Audio", which already has a layout
QLayout: Attempting to add QLayout "" to DeviceWidget "Mic/Aux", which already has a layout
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
info: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Mic/Aux)

info: [pipewire] desktop selected, setting up screencast
[E] pw.loop [loop.c:86 pw_loop_new()] 0x5613af5b0320: can't make support.system handle: No such file or directory
fish: Job 1, 'obs-studio' terminated by signal SIGSEGV (Erreur de frontière d'adresse)
popey commented 8 months ago

I sincerely apologise for this. I believe I have fixed this and have uploaded it to the candidate channel.

Could one of you affected, please confirm that the build in the candidate channel works?

mehdiMj-ir commented 8 months ago

Thank you very much. The bug has been fixed but I have no permission to save file:

Unable to write to /home/mehdi/snap/obs-studio/1289/2023-10-18 13-38-09.mkv. Make sure you're using a recording path which your user account is allowed to write to and that there is sufficient disk space.
popey commented 8 months ago

@mehdiMj-ir thanks.

To change the output path go to settings -> output -> Recording -> recording path. Change that to some other path or even /home/mehdi/snap/obs-studio/current or /home/mehdi/snap/obs-studio/common would be fine.

mehdiMj-ir commented 8 months ago

Silly me didn't pay attention to the path. Thank you very much, It works again.

popey commented 8 months ago

Thanks. I have pushed the fixed build to the stable channel.

alexmurray commented 8 months ago

Thanks for the quick fix @popey - works for me too - muchly appreciated!

FHenry commented 8 months ago

Same, it's fix thank's @popey

Quetzacoalt91 commented 7 months ago

Thanks for the fix @popey.

Can you double check it was released on the stable channel? I was getting the issue today and got only rid of it with your command snap refresh obs-studio --candidate.