DistroAV / DistroAV

DistroAV (formerly OBS-NDI): NewTek NDI integration for OBS Studio
GNU General Public License v2.0
3.15k stars 357 forks source link

[Bug]: Crash while trying to start obs 29.0.2.1-1+b1 on Debian 12 #897

Closed Deksor closed 9 months ago

Deksor commented 1 year ago

Operating System Version

Debian 12 Bookworm

OBS Version

29.0.2.1-1+b1

NDI Tools Version

obs-ndi 4.11.1

Describe the bug

QT error while starting OBS and crash of OBS

Steps to reproduce

I installed obs-studio on debian 12 bookworm, then ndi and ndi5 runtime. I also had to install qt6-base-dev otherwise ndi wouldn't even try to start

Expected behavior

OBS starting with the NDI plugin

Screenshots

No response

Additional context

debug: Found portal inhibitor debug: Attempted path: share/obs/obs-studio/locale/en-US.ini debug: Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini debug: Attempted path: share/obs/obs-studio/themes/Yami.qss debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss info: Using EGL/X11 info: CPU Name: AMD Ryzen 9 5900X 12-Core Processor info: CPU Speed: 2200.000MHz info: Physical Cores: 12, Logical Cores: 24 info: Physical Memory: 32012MB Total, 18031MB Free info: Kernel Version: Linux 6.1.0-9-amd64 info: Distribution: "Debian GNU/Linux" "12" info: Session Type: x11 info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1 info: Qt Version: 5.15.8 (runtime), 5.15.8 (compiled) info: Portable mode: false QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int) info: OBS 29.0.2.1-1+b1 (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: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce RTX 3080/PCIe/SSE2 info: OpenGL loaded successfully, version 3.3.0 NVIDIA 525.105.17, shading language 3.30 NVIDIA via Cg compiler info: --------------------------------- info: video settings reset: base resolution: 640x400 output resolution: 640x400 downscale filter: Area fps: 70/1 format: BGRA YUV mode: None info: GPU conversion not available for format: 7 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-captions.so' warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so' libDeckLinkAPI.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type warning: A DeckLink iterator could not be created. The DeckLink drivers may not be installed warning: Failed to initialize module 'decklink.so' info: [pipewire] Available captures: info: [pipewire] - Desktop capture info: [pipewire] - Window capture warning: v4l2loopback not installed, virtual camera disabled info: NVENC supported info: VAAPI: API version 1.17 info: FFmpeg VAAPI H264 encoding not supported 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) QWidget: Must construct a QApplication before a QWidget Abandon (core dumped)

jasalt commented 1 year ago

Same problem here, obs-studio startup broken with error QWidget: Must construct a QApplication before a QWidget. Using MX Linux 23 beta (Debian 12, KDE 5.27.5), verbose system info:

System:
  Kernel: 6.1.0-9-amd64 [6.1.27-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/vmlinuz-6.1.0-9-amd64 root=UUID=<filter> ro quiet splash
    resume=UUID=<filter> resume_offset=56717312
  Desktop: KDE Plasma v: 5.27.5 wm: kwin_x11 vt: 7 dm: SDDM Distro: MX-23_x64 Libretto June 13
    2023 base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Laptop System: LENOVO product: 20L8S3M901 v: ThinkPad T480s serial: <superuser required>
    Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20L8S3M901 v: SDK0J40697 WIN serial: <superuser required> UEFI: LENOVO
    v: N22ET76W (1.53 ) date: 01/04/2023
Battery:
  ID-1: BAT0 charge: 47.0 Wh (100.0%) condition: 47.0/57.0 Wh (82.5%) volts: 12.9 min: 11.6
    model: LGC 01AV478 type: Li-poly serial: <filter> status: full cycles: 211
  ID-2: hidpp_battery_0 charge: 79% condition: N/A volts: 4.0 min: N/A model: Logitech Gaming
    Mouse G900 type: N/A serial: <filter> status: discharging
CPU:
  Info: model: Intel Core i5-8350U bits: 64 type: MT MCP arch: Coffee Lake gen: core 8 level: v3
    note: check built: 2017 process: Intel 14nm family: 6 model-id: 0x8E (142) stepping: 0xA (10)
    microcode: 0xF2
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 1170 high: 1289 min/max: 400/3600 scaling: driver: intel_pstate
    governor: powersave cores: 1: 991 2: 1269 3: 867 4: 1289 5: 1227 6: 1231 7: 1258 8: 1229
    bogomips: 30399
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel arch: Gen-9.5
    process: Intel 14nm built: 2016-20 ports: active: DP-2,eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2
    bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300
  Device-2: Chicony Integrated IR Camera type: USB driver: uvcvideo bus-ID: 1-5:4
    chip-ID: 04f2:b615 class-ID: 0e02
  Device-3: Chicony Integrated Camera type: USB driver: uvcvideo bus-ID: 1-8:9 chip-ID: 04f2:b614
    class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.7 compositor: kwin_x11 driver: X: loaded: modesetting
    unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 4480x1440 s-dpi: 96 s-size: 1185x381mm (46.65x15.00")
    s-diag: 1245mm (49.01")
  Monitor-1: DP-2 pos: primary,right model: Lenovo Q27h-20 serial: <filter> built: 2022
    res: 2560x1440 hz: 70 dpi: 109 gamma: 1.2 size: 597x336mm (23.5x13.23") diag: 685mm (27")
    ratio: 16:9 modes: max: 2560x1440 min: 720x400
  Monitor-2: eDP-1 pos: left model: InfoVision Optronics/Kunshan 0x057d built: 2017
    res: 1920x1080 hz: 60 dpi: 158 gamma: 1.2 size: 309x174mm (12.17x6.85") diag: 355mm (14")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel UHD Graphics 620 (KBL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel bus-ID: 1-4.2:13
    v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_skl chip-ID: 17a0:0304 bus-ID: 00:1f.3
    class-ID: 0300 chip-ID: 8086:9d71 class-ID: 0403
  Device-2: Samson Q2U handheld mic with XLR type: USB driver: hid-generic,snd-usb-audio,usbhid
  API: ALSA v: k6.1.0-9-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15d7 class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel modules: wl pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 3d:00.0 chip-ID: 8086:24fd class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  IF-ID-1: br-b710255e22d6 state: down mac: <filter>
  IF-ID-2: br-fc7751ca2413 state: down mac: <filter>
  IF-ID-3: docker0 state: down mac: <filter>
  IF-ID-4: wwan0 state: unknown mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-7:8
    chip-ID: 8087:0a2b class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 3 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2
    sub-v: 100 hci-v: 4.2 rev: 100
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch hold sniff
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 476.94 GiB used: 108.14 GiB (22.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN720 SDAQNTW-512G-1001
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD
    serial: <filter> rev: 10190101 temp: 44.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 350.71 GiB size: 344.14 GiB (98.13%) used: 108.03 GiB (31.4%) fs: ext4
    dev: /dev/dm-0 maj-min: 253:0 mapped: root.fsm
  ID-2: /boot raw-size: 500 MiB size: 458.3 MiB (91.67%) used: 88 MiB (19.2%) fs: ext4
    dev: /dev/nvme0n1p6 maj-min: 259:6
  ID-3: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 29.1 MiB (30.3%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 19.37 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
Sensors:
  System Temperatures: cpu: 41.0 C pch: 38.0 C mobo: N/A
  Fan Speeds (RPM): fan-1: 0
Repos:
  Packages: 3407 pm: dpkg pkgs: 3392 libs: 1632 tools: apt,apt-get,aptitude,nala pm: rpm pkgs: 0
    pm: flatpak pkgs: 15
  No active apt repos in: /etc/apt/sources.list
  No active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb-src http://deb.debian.org/debian bookworm main contrib non-free
  Active apt repos in: /etc/apt/sources.list.d/docker.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://ftp.acc.umu.se/mirror/mxlinux.org/packages/mx/repo/ bookworm main non-free
    2: deb http://ftp.acc.umu.se/mirror/mxlinux.org/packages/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/vscodium.list
    1: deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main
Info:
  Processes: 279 Uptime: 1h 46m wakeups: 15 Memory: 15.37 GiB used: 5.13 GiB (33.4%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI[/CODE]
jgruber commented 1 year ago

I have this problem as well... StreamFX had this same issue which they fixed by adding an hook to to obs_frontend_add_event_callback to delay the instantiation of the QWidget until the OBS UI was fully started. My C++ is really rusty and I know nothing about QT, so this would take me a bunch of time to figure out that I just don't have at the moment, but it seems to me that the obs-ndi check that the OBS window is defined is not sufficient. Where they do that simple check, they need to register a callback handler for the frontend to be completely defined before they try to create the output settings widget.

If anyone here more QT hip.. here is the link to the StreamFX pull request where they fix the same error in QT.

https://github.com/Xaymar/obs-StreamFX/pull/428

jasalt commented 1 year ago

Tried to work around this by building 28.1.2 and got it loading up with minor plugins path fixing but it seems to work only partially.

Testing sending/receiving video with a working Windows 10 (OBS 29.0.2, obs-ndi 4.11.0, ndi sdk 5.1.1.0) and NDI HX Camera and NDI Monitor apps on iOS, these are working ok sending feed front and back.

Works:

Kinda works:

Not working:

Tried to fix the "NDI® Video decoder not found. Please visit ndi.tv/formats for help and information." screen from HX Camera app as a source looking at earlier issue #842. Tried to install libavcodec-extra58 package's bookworm equivalent libavcodec-extra59 but didn't help. Looked at file differences between 58 and 59 packages and symlinked new paths to old but that didn't help.

Plugin menu texts were also bit off but I guess just cause of incorrect localization file paths.

Hope this could give some clues. Might be partially related to OBS 29 compatibility also.

Setup steps

System:
Kernel: 6.1.0-9-amd64 [6.1.27-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-9-amd64 root=UUID=<filter> ro quiet splash
resume=UUID=<filter> resume_offset=610304
Console: pty pts/0 DM: LightDM v: 1.26.0 Distro: MX-23_beta2_x64 Libretto June 15  2023
base: Debian GNU/Linux 12 (bookworm)

Build OBS 28

git clone --recursive --branch 28.1.2 https://github.com/obsproject/obs-studio.git
cd obs-studio
CI/build-linux.sh
cmake --build build --target package
sudo dpkg -i build/obs-studio-28.1.2-1-Linux.deb

Install obs-ndi and libndi

cd ..
wget https://github.com/obs-ndi/obs-ndi/releases/download/4.11.1/obs-ndi-4.11.1-linux-x86_64.deb
sudo dpkg -i obs-ndi-4.11.1-linux-x86_64.deb

# Noted that after building OBS, the plugin install path /usr/lib/x86_64-linux-gnu/obs-plugins/ was wrong. Fixed with:

sudo ln -s /usr/lib/x86_64-linux-gnu/obs-plugins/obs-ndi.so /usr/local/lib/obs-plugins/

wget https://github.com/obs-ndi/obs-ndi/releases/download/4.11.1/libndi5_5.5.3-1_amd64.deb
sudo dpkg -i libndi5_5.5.3-1_amd64.deb obs-ndi-4.11.1-linux-x86_64.deb

sudo apt install libavcodec-extra
DanceMore commented 1 year ago

OBS 29.0.2.1-1+b1 via Debian. same error about Must construct a QApplication before a QWidget.

I had been using flatpak OBS but didn't see a way to plugin install for flatpak'd OBS and you provided a .deb for Debian :)

If anyone here more QT hip.. here is the link to the StreamFX pull request where they fix the same error in QT.

Xaymar/obs-StreamFX#428

it looks like it's mostly a re-ordering of code. even the Qt error makes it sound like a simple "order of operations" issue. maybe the fix is quite simple ...?

johnthq commented 11 months ago

looks like i seem to be having this issue as well. OBS 29.0.2.1+b1 on debian 12.1 with plasma. Second i install OBS-NDI cant get it to start.

warning: Failed to load 'en-GB' text for module: 'obs-ndi.so'
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)
QWidget: Must construct a QApplication before a QWidget
Aborted (core dumped)
paulpv commented 9 months ago

I've seen this before myself, but thought it was fixed in recent releases.

Regardless, I will soon release a 4.12.0 version w/ updated NDI lib that might help/avoid this crash.

You can try out 4.12.0 Release Candidate if you want.

The Pull Request https://github.com/obs-ndi/obs-ndi/pull/919 has been labeled with "Seeking Testers" and the build generates installer packages that you can download try out.

Steps:

  1. Browse to https://github.com/obs-ndi/obs-ndi/pull/919
  2. Click on "Show all checks"
  3. Click on any of the "Details"
  4. Click on "Summary"
  5. Scroll down and see the "Artifacts"
  6. Download the relevant Linux/MacOS/Windows artifact for your platform
  7. Windows may complain that the download looks suspicious; you may safely ignore
  8. Unzip the download
  9. Run the installer
DanceMore commented 9 months ago

I think this error is new / different at least. it could have to do with NDI versions on my machine (Jul 26 2023 5.6.0') or differences between Debian and Ubuntu or even differences with OBS versions.

...
info: [obs-ndi] obs_module_load: hello ! (version 4.12.0)
info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Trying '/usr/local/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Found NDI library at '/usr/local/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 18:49:05 Jul 26 2023 5.6.0')
error: Tried to register obs_output_info with size 192 which is more than libobs currently supports (184)
info: [obs-ndi] preview_output_init('OBS Preview')
error: Output ID 'ndi_output' not found
error: Failed to create output 'NDI Preview Output'!
QWidget: Must construct a QApplication before a QWidget
zsh: IOT instruction  obs

% obs --version
OBS Studio - 29.0.2.1-1+b1 (linux)

the only hits for that string are Issues, not code => https://github.com/search?q=%22which+is+more+than+libobs+currently+supports%22&type=issues

at least one result implies it could be OBS version at build vs runtime.

profdecoy commented 9 months ago

I still get the OBS core dump with version 29.1.3.1-2 on Ubuntu 23.10 with the latest test build of obs-ndi 0.4.12 . During the pre-release development builds of 23.10, I was able to still run the OBS Project's build of OBS from their Ubuntu PPA with the prior 0.4.11 release of obs-ndi. However, they haven't performed a build for 23.10 yet and the 23.04 version can no longer be installed due to dependency conflicts.

info: [obs-ndi] obs_module_load: hello ! (version 4.12.0)
info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Trying '/usr/local/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Found NDI library at '/usr/local/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 18:49:05 Jul 26 2023 5.6.0')
info: [obs-ndi] preview_output_init('OBS Preview')
info: [obs-ndi] +ndi_output_create('OBS Preview'...)
info: [obs-ndi] ndi_output_update('OBS Preview'...)
info: [obs-ndi] -ndi_output_create(...)
QWidget: Must construct a QApplication before a QWidget
Aborted (core dumped)
jasalt commented 9 months ago

Quick test with Debian packaged OBS, got same what DanceMore noticed, error: Tried to register obs_output_info with size 192 which is more than libobs currently supports (184).

System and OBS related packages:

Desktop: KDE Plasma v: 5.27.5 wm: kwin_x11 vt: 7 dm: SDDM
Distro: MX-23.1_x64 Libretto June 13 2023 base: Debian GNU/Linux 12
(bookworm)

Package: obs-studio
Version: 29.0.2+dfsg-1+b1
Source: obs-studio (29.0.2+dfsg-1)
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>

Package: intel-media-va-driver-non-free
Version: 23.1.1+ds1-1
Source: intel-media-driver-non-free
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>

Having libndi.so, libndi.so.5 and libndi.so.5.5.4 in /usr/local/lib.

Log:

╭─user@mx-t480s ~/.building
╰─$ sudo dpkg -i obs-ndi-4.12.0-ubuntu-22.04-x86_64-852999ce7/obs-ndi-4.12.0-x86_64-linux-gnu.deb
[sudo] password for user:
Selecting previously unselected package obs-ndi.
(Reading database ... 511783 files and directories currently installed.)
Preparing to unpack .../obs-ndi-4.12.0-x86_64-linux-gnu.deb ...
Unpacking obs-ndi (4.12.0) ...
Setting up obs-ndi (4.12.0) ...
╭─user@mx-t480s ~/.building
╰─$ obs
debug: Found portal inhibitor
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes/System.qss
debug: Attempted path: /usr/share/obs/obs-studio/themes/System.qss
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
info: CPU Speed: 400.000MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 15739MB Total, 2423MB Free
info: Kernel Version: Linux 6.1.0-13-amd64
info: Distribution: "Debian GNU/Linux" "12"
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 5.15.8 (runtime), 5.15.8 (compiled)
info: Portable mode: false
QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
info: OBS 29.0.2.1-1+b1 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
samples per sec: 44100
speakers:        2
max buffering:   1044 milliseconds
buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Mesa Intel(R) UHD Graphics 620 (KBL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 23.1.2-1~mx23ahs, shading language 4.60
info: ---------------------------------
info: video settings reset:
base resolution:   1920x1080
output resolution: 1920x1080
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: ---------------------------------
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: [pipewire] No captures available
warning: v4l2loopback not installed, virtual camera disabled
info: VAAPI: API version 1.18
info: FFmpeg VAAPI H264 encoding supported
info: [obs-ndi] obs_module_load: hello ! (version 4.12.0)
info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Trying '/usr/local/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Found NDI library at '/usr/local/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 12:45:43 Apr 10 2023 5.5.4')
error: Tried to register obs_output_info with size 192 which is more than libobs currently supports (184)
info: [obs-ndi] preview_output_init('OBS Preview')
error: Output ID 'ndi_output' not found
error: Failed to create output 'NDI Preview Output'!
QWidget: Must construct a QApplication before a QWidget
[1]    125556 IOT instruction  obs

Removed with sudo dpkg -r obs-ndi and OBS starts again.

EDIT: added full log output as there was some reasoning about QT5 vs QT6..

paulpv commented 9 months ago

@jasalt

info: Qt Version: 5.15.8 (runtime), 5.15.8 (compiled)

The problem has got to be with that:

info: Qt Version: 5.15.8 (runtime), 5.15.8 (compiled)

Looks like you are running OBS 29.0.2.1-1+b1 (linux) and Qt5. Can you try OBS 29.1.3?

jasalt commented 9 months ago

@dancemore @paulpv got further with the Flatpak installation, plugin loads but it trips loading the /usr/local/lib/libndi.so.5.

Information about OBS Flatpak plugin installation path and folder structure was bit under a rock. This obs-multi-rtmp tutorial helped https://youtu.be/p4eoEoq438M, it is linked at https://github.com/sorayuki/obs-multi-rtmp/issues/281. Not sure if this persists between flatpak updates, guessing it would.

The flatpak expects folder structure under ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-ndi:

├── bin
│   └── 64bit
│       └── obs-ndi.so
└── data
   └── locale
       ├── ca-ES.ini
       ├── en-US.ini
       ├── es-ES.ini
       ├── fr-FR.ini
       ├── ko-KR.ini
       ├── ro-RO.ini
       ├── ru-RU.ini
       ├── uk-UA.ini
       └── zh-CN.ini

Log (on Debian 12):

# remove previous debian maintained version (old) and install flatpak (latest, official)
sudo apt remove obs-studio
flatpak install com.obsproject.Studio

# run flatpak once first so path ~/.var gets populated (maybe unnecessary)
flatpak run com.obsproject.Studio

# quit obs

# Extract plugin files from deb package (artefact in https://github.com/obs-ndi/obs-ndi/pull/919)
cd obs-ndi-4.12.0-ubuntu-22.04-x86_64-852999ce7pn
ar x obs-ndi-4.12.0-x86_64-linux-gnu.deb data.tar.gz
tar -xzf data.tar.gz

# create plugin path and folder structure for flatpak, copy plugin files there

mkdir -p ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-ndi/bin/64bit/
cp usr/lib/x86_64-linux-gnu/obs-plugins/obs-ndi.so ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-ndi/bin/64bit/

mkdir -p ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-ndi/data/locale/
cp usr/share/obs/obs-plugins/obs-ndi/locale/* ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-ndi/data/locale/

Starting up flatpak run com.obsproject.Studio, plugin loads (using QT6 now) and gives GUI error dialog "NDI™ Runtime not found ...".

╭─user@mx-t480s ~
╰─$ flatpak run com.obsproject.Studio
Qt: Session management error: Could not open network socket
debug: Found portal inhibitor
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /app/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /app/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes/System.qss
debug: Attempted path: /app/share/obs/obs-studio/themes/System.qss
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
info: CPU Speed: 3200.109MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 15739MB Total, 649MB Free
info: Kernel Version: Linux 6.1.0-13-amd64
info: Flatpak Branch: stable
info: Flatpak Arch: x86_64
info: Flatpak Runtime: runtime/org.kde.Platform/x86_64/6.4
info: App Extensions:
info:  - org.freedesktop.LinuxAudio.Plugins.TAP
info:  - org.freedesktop.LinuxAudio.Plugins.swh
info:  - com.obsproject.Studio.Locale
info: Runtime Extensions:
info:  - org.freedesktop.Platform.GL.default
info:  - org.freedesktop.Platform.VAAPI.Intel
info:  - org.freedesktop.Platform.openh264
info:  - org.gtk.Gtk3theme.Breeze
info:  - org.kde.Platform.Locale
info:  - org.freedesktop.Platform.GL.default
info: Flatpak Framework Version: 1.14.4
info: Desktop Environment: KDE (KDE)
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.4.3 (runtime), 6.4.3 (compiled)
info: Portable mode: false
info: OBS 29.1.3 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
samples per sec: 44100
speakers:        2
max buffering:   1044 milliseconds
buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Mesa Intel(R) UHD Graphics 620 (KBL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 23.1.9 (git-acb5ee278a), shading language 4.60
info: ---------------------------------
info: video settings reset:
base resolution:   2560x1440
output resolution: 2560x1440
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: ---------------------------------
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'
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: [pipewire] No captures available
warning: v4l2loopback not installed, virtual camera disabled
info: [obs-browser]: Version 2.21.1
info: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures_143.2591+g4204d54+chromium-103.0.5060.134 (compiled)
info: VAAPI: API version 1.18
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI HEVC encoding supported
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.4.3 | Qt version (run-time): 6.4.3
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 101201
info: [obs-websocket] [obs_module_load] Module loaded.
info: [obs-ndi] obs_module_load: hello ! (version 4.12.0)
info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Trying '/usr/local/lib/libndi.so.5'
error: [obs-ndi] load_ndilib: ERROR: Can't find the NDI library
error: [obs-ndi] obs_module_load: load_ndilib() failed; Module won't load.
warning: Failed to initialize module 'obs-ndi.so'
info: ---------------------------------
info:   Loaded Modules:
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-websocket.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     obs-browser.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-jack.so
info:     linux-capture.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: xshm-input: Geometry 1920x1080 @ 347,1440
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'Screen Capture (XSHM)' (xshm_input)
info: ------------------------------------------------

It should try loading /usr/local/lib/libndi.so.5 which is there, debian obs version did find and load it earlier. Does it trip because of Flatpak sandboxing related issue as it's owned by root? Should/could there be an additional loading path maybe under ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-ndi/data/?

ls /usr/local/lib/
libndi.so  libndi.so.5  libndi.so.5.6.0

Not sure how running flatpak as root would effect, tested it too but it gave same error loading libndi after:

sudo -i
cp -r /home/user/.var/app/com.obsproject.Studio/config/obs-studio/plugins /root/.var/app/com.obsproject.Studio/config/obs-studio/
flatpak run com.obsproject.Studio

Noted issue about obs-ndi flatpak support https://github.com/obs-ndi/obs-ndi/issues/724.

paulpv commented 9 months ago

Logs in general say:

...
info: Qt Version: 5.15.10 (runtime), 5.15.10 (compiled)
...
info: [obs-ndi] obs_module_load: Qt version (compile-time): 6.2.4 | Qt version (run-time): 6.4.2
...

The first line is from: https://github.com/obsproject/obs-studio/blob/c58e511813c33e93da7637d50aa431ae0cddda0c/UI/obs-app.cpp#L1720-L1721

The second line is from: https://github.com/obs-ndi/obs-ndi/blob/2843e2b28c93b821b66a0cee6b999642ed409ee9/src/plugin-main.cpp#L89-L91

OBS 29.1.3 is compiled and running under Qt5. obs-ndi is compiled and running under Qt6.

From OBS Discord support:

Qt6 is recommended and the default for 28 and later (it can fallback to Qt5 while building). For 30 Qt6 becomes required. ... until 30.0 gets released and the ppa updates, they should be able to grab the mantic beta package and run that ... Or a little better use the unstable PPA for OBS beta/rc.

I say try installing the official OBS .deb build from: https://github.com/obsproject/obs-studio/releases/tag/29.1.3 OBS says those compile w/ Qt6 and that Ubuntu's versions of OBS Ubuntu compiles themself with Qt5.

I will see what I can do to build a Qt5 supported version, but no promises, and OBS v30 is due out soon anyway.

paulpv commented 9 months ago

@jasalt I remember fighting flatpak loading problems before. If I recall correctly, yes, flatpack (or something similar) has no permission to read outside of its .var folder, so it cannot load anything from /usr/local/lib/. I thought I once was near a solution for this, but I probably just gave up after spending a few days fighting it.

jasalt commented 9 months ago

@paulpv Ubuntu Lunar .deb installed on Debian 12 and obs-ndi runs now. Tested capturing NDI output from OBS locally on NDI input of another OBS instance. Testing more later...

# Cleanup previous installs
sudo apt remove obs-studio libobs0
flatpak uninstall com.obsproject.Studio

# Obs lunar deb install
wget https://github.com/obsproject/obs-studio/releases/download/29.1.3/obs-studio_29.1.3-0obsproject1.lunar_amd64.deb
sudo apt install ./obs-studio_29.1.3-0obsproject1.lunar_amd64.deb

# Obs-ndi plugin from https://github.com/obs-ndi/obs-ndi/pull/919
sudo apt install ./obs-ndi-4.12.0-ubuntu-22.04-x86_64-852999ce7/obs-ndi-4.12.0-x86_64-linux-gnu.deb

Quite happy if it ends up working like this, eventhough it's bit scary to install Ubuntu branded .deb as it could break installation if they decided to add some non-debian dependency AFAIK.

Wondering, would it simply work for Flatpak too if NDI library files were just copied over to folder Flatpak had access to? Would it be hard to add such extra library search path to obs-ndi plugin code?

paulpv commented 9 months ago

All of this package management stuff is a bit over my head. If anyone can make sense of it and articulate a solution I'll give it a try, but this seems lower priority now.

profdecoy commented 9 months ago

The OBS project just published their release of OBS 30.0.0 to their Ubuntu PPA a few minutes ago, including a release for Ubuntu 23.10. With OBS 30 and the latest pre-release build of obs-ndi, it no longer crashes at startup for me. Will test that it works for Video output and receiving.

paulpv commented 9 months ago

I released obs-ndi 4.12.0 yesterday

DanceMore commented 9 months ago

@jasalt said:

Ubuntu Lunar .deb installed on Debian 12 and obs-ndi runs now ... Quite happy if it ends up working like this, eventhough it's bit scary to install Ubuntu branded .deb as it could break installation if they decided to add some non-debian dependency AFAIK.

Works for me too. I installed the Ubuntu Lunar .deb on my Debian box with minimal issues; I had to remove Debianobs-studio, obs-plugins, and libobs0 first.

I have successfully run "mixed" Debian systems for years. Upstream and Official IRC Channels don't like to talk about "apt pinning" very much, but that's the keyword you need to research if you want to learn the advanced tricks or safety nets available when running a "mixed" system. For example, I generally "pin" to Stable but can pull in packages from Testing if I manually force it.

@paulpv said:

All of this package management stuff is a bit over my head. If anyone can make sense of it and articulate a solution I'll give it a try, but this seems lower priority now.

I conceptually understand it; but Packaging in general is often "a complete mess" and I do not fault you for skipping it.

I'm generally a cranky old UNIX person and prefer system packages like .deb or .rpm; but for reasonably complex projects like Desktop software, flatpak has been really really effective for me as an Enduser, so that's where I'm casting my vote (however flatpak OBS is incomplete too right now, it's missing VLC as a source 🤦 )

that said; I couldn't make sense of how flatpak packaging worked. I think I read and attempted everything @jasalt did related to flatpak, with no success.

I have used this tool over the years to assist building .deb and .rpm packages, but I've been too busy in the Docker ecosystem to need to build my own system packages lately ...

paulpv commented 9 months ago

Closing this with the obs-ndi 4.12.0 release and OBS 30 release. Please comment here if this is still happening and we can reopen.

yiids commented 4 months ago

Having this exact problem on a fresh debian 12 install. installed obs from apt: 29.0.2+dfsg-1+b1 tried with obs-ndi 4.12.0 and 4.13.0 Using libndi5

on run: info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5' info: [obs-ndi] load_ndilib: Trying '/usr/local/lib/libndi.so.5' info: [obs-ndi] load_ndilib: Found NDI library at '/usr/local/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 10:26:04 Nov 17 2023 5.6.0') warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) error: Tried to register obs_output_info with size 192 which is more than libobs currently supports (184) warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) info: [obs-ndi] preview_output_init('OBS Preview') error: Output ID 'ndi_output' not found error: Failed to create output 'NDI Preview Output'! QWidget: Must construct a QApplication before a QWidget Aborted (core dumped)

RayneYoruka commented 4 months ago

Having this exact problem on a fresh debian 12 install. installed obs from apt: 29.0.2+dfsg-1+b1 tried with obs-ndi 4.12.0 and 4.13.0 Using libndi5

on run: info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5' info: [obs-ndi] load_ndilib: Trying '/usr/local/lib/libndi.so.5' info: [obs-ndi] load_ndilib: Found NDI library at '/usr/local/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

obs-ndi 4.13 requires obs 30 to run.

In case you have issue installing the runtime in Linux I'm leaving this: https://raw.githubusercontent.com/obs-ndi/obs-ndi/develop/CI/libndi-get.sh

paulpv commented 4 months ago

💯 @RayneYoruka !

image
yiids commented 4 months ago

and is there also a version of libndi that does work with obs 29?

paulpv commented 4 months ago

and is there also a version of libndi that does work with obs 29?

libndi is not the problem; libndi does and did work fine with obs 29. The problem is that obs-ndi is intended for obs 30 and obs 30 requires Qt6.

If you want the latest obs-ndi to run on obs 29 then you would have to compile a special version to that uses Qt5.

tubaman commented 4 months ago

Build for Debian Bookworm(12) that uses Qt5 to match obs: https://github.com/tubaman/obs-ndi/releases/tag/4.13.1-bookworm-20240405

RayneYoruka commented 4 months ago

Build for Debian Bookworm(12) that uses Qt5 to match obs: https://github.com/tubaman/obs-ndi/releases/tag/4.13.1-bookworm-20240405

Doesn't this go against the ToS of NDI? the part of "not allowed to redistrubute their runtime"?

paulpv commented 4 months ago

Build for Debian Bookworm(12) that uses Qt5 to match obs: https://github.com/tubaman/obs-ndi/releases/tag/4.13.1-bookworm-20240405

Doesn't this go against the ToS of NDI? the part of "not allowed to redistrubute their runtime"?

My understanding is a clear as mud maybe: https://docs.ndi.video/docs/sdk/software-distribution#redistributables-ndi_sdk_dir-redist-.exe

You can redist the latest runtime in your installer or provide a link to their latest installer. I prefer to play it safe and stay away from redisting and just let them install it on their own. We have a pop-up in the app with a link to the redist url if the runtime is not detected, but the url comes from the library, and we are using ndi 5 so it wouldn't point to latest into I update it... "soon".

yiids commented 4 months ago

libndi is not the problem; libndi does and did work fine with obs 29. The problem is that obs-ndi is intended for obs 30 and obs 30 requires Qt6.

that sounds pretty contradictionary :)

Build for Debian Bookworm(12) that uses Qt5 to match obs: https://github.com/tubaman/obs-ndi/releases/tag/4.13.1-bookworm-20240405

Thanks for the build, OBS doesnt crash on start anymore, but now it segfaults when I try to add an NDI source, anything I could try/provide to resolve this issue?

paulpv commented 4 months ago

that sounds pretty contradictionary :)

Not at all. libndi works fine on either obs-ndi < 4.13.x on obs < 30, or obs-ndi >= 4.13.x on obs >= 30. there is no direct conflict with libndi with either obs-ndi or obs or even Qt5 or Qt6.

The only conflict is obs 30 requiring Qt6. obs-ndi 4.13.x targets only obs 30, so obs-ndi 4.13.x requires systems that support Qt6.

None of this has anything to do with libndi being [in]compatibility with anything listed above...because libndi itself is not directly incompatible with any of this.

yiids commented 4 months ago

aah my bad, i was confusing libndi with obs-ndi.. so what I mean in my first comment was basically which version of obs-ndi I would need for obs 29.

paulpv commented 4 months ago

which version of obs-ndi I would need for obs 29.

obs-ndi < 4.13 (<= 4.12.x)

yiids commented 4 months ago

Okay but like I mentioned in my first comment, using obs-ndi 4.12.0 gives me an instant crash:

info: [obs-ndi] obs_module_load: NDI library initialized successfully ('NDI SDK LINUX 12:52:02 Feb 16 2024 5.6.1') warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) error: Tried to register obs_output_info with size 192 which is more than libobs currently supports (184) warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) warning: obs_register_source: Tried to register obs_source_info with size 408 which is more than libobs currently supports (400) info: [obs-ndi] preview_output_init('OBS Preview') error: Output ID 'ndi_output' not found error: Failed to create output 'NDI Preview Output'! QWidget: Must construct a QApplication before a QWidget Aborted (core dumped)

yiids commented 3 months ago

Can we re open this since its still an issue?

Trouffman commented 3 months ago

@yiids Please use the latest version of OBS & OBS-NDI. Please see the requirement page : https://github.com/obs-ndi/obs-ndi?tab=readme-ov-file#requirements

If all requirements & installation step are followed and still not work. please open a new bug report.