flathub / com.obsproject.Studio

This repository is no longer used to build OBS. Issues should be reported at https://github.com/obsproject/obs-studio
https://github.com/obsproject/obs-studio
29 stars 19 forks source link

Desktop screencast always records a black screen #52

Closed bdaase closed 4 years ago

bdaase commented 4 years ago

On the current flatpak master with gnome-shell 3.35.91 wayland on Fedora 32, the video recorded is always black.
This is the terminal output when opening OBS, starting a desktop srceencast, stopping it and closing the window:

➜  com.obsproject.Studio flatpak run com.obsproject.Studio      
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.

(process:2): Gtk-WARNING **: 22:53:44.975: Locale not supported by C library.
    Using the fallback 'C' locale.
Gtk-Message: 22:53:45.044: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:53:45.044: Failed to load module "pk-gtk-module"
Gtk-Message: 22:53:45.044: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:53:45.044: Failed to load module "pk-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /app/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /app/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
info: CPU Speed: 1284.965MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 15701MB Total, 9899MB Free
info: Kernel Version: Linux 5.6.0-0.rc3.git0.1.fc32.x86_64
info: Distribution: Flatpak KDE Runtime 5.14
info: Window System: X11.0 - vendor string: Fedora Project - vendor release: 12006000
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /app/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.5-modified (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 44100
    speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Open Source Technology Center Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 19.3.3, 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:          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: ---------------------------------
info:   Loaded Modules:
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-xdg-portal.so
info:     obs-x264.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-decklink.so
info:     linux-capture.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-ouput-ui.so
info: ---------------------------------
info: ==== Startup complete ===============================================
error: Service '' not found
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 13.99.1-rebootstrapped'
info: pulse-input: Audio format: s16le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: pulse-input: Server name: 'pulseaudio 13.99.1-rebootstrapped'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.pci-0000_00_1f.3.analog-stereo'
info: OBS XDG initialized (sender name: 1_340)
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'Desktop Screencast (Wayland / X11)' (obs-xdg-source)
info: ------------------------------------------------
Attempted path: share/obs/obs-studio/images/overflow.png
Attempted path: /app/share/obs/obs-studio/images/overflow.png
info: [OBS XDG] Screencast session created
info: [OBS XDG] Asking for monitor…
info: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: Mic/Aux)

info: [OBS XDG] Monitor selected, setting up screencast
info: [OBS XDG] Starting monitor screencast…
info: ---------------------------------
info: [x264 encoder: 'simple_h264_recording'] preset: veryfast
info: [x264 encoder: 'simple_h264_recording'] profile: high
info: [x264 encoder: 'simple_h264_recording'] settings:
    rate_control: CRF
    bitrate:      0
    buffer size:  0
    crf:          21
    fps_num:      30
    fps_den:      1
    width:        1280
    height:       720
    keyint:       250

info: libfdk_aac encoder created
info: libfdk_aac bitrate: 192, channels: 2
info: ==== Recording Start ===============================================
info: [ffmpeg muxer: 'simple_file_output'] Writing file '/home/bjoern/2020-02-26 22-53-50.mkv'...
[matroska @ 0x55a85ad12040] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[matroska @ 0x55a85ad12040] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
info: [ffmpeg muxer: 'simple_file_output'] Output of file '/home/bjoern/2020-02-26 22-53-50.mkv' stopped
info: Output 'simple_file_output': stopping
info: Output 'simple_file_output': Total frames output: 87
info: Output 'simple_file_output': Total drawn frames: 113
info: ==== Recording Stop ================================================
info: libfdk_aac encoder destroyed
info: ==== Shutting down ==================================================
info: Switched to scene '(null)'
info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: pulse-input: Got 1688 packets with 471368 frames
info: pulse-input: Stopped recording from 'alsa_input.pci-0000_00_1f.3.analog-stereo'
info: pulse-input: Got 1191 packets with 520760 frames
info: All scene data cleared
info: ------------------------------------------------
error: Failed to fetch parent window geometry!
error: Failed to fetch parent window geometry!
error: Failed to fetch parent window geometry!
error: Failed to fetch parent window geometry!
info: Freeing OBS context data
info: [Scripting] Total detached callbacks: 0
info: == Profiler Results =============================
info: run_program_init: 715.324 ms
info:  ┣OBSApp::AppInit: 5.762 ms
info:  ┃ ┗OBSApp::InitLocale: 3.3 ms
info:  ┗OBSApp::OBSInit: 524.046 ms
info:    ┣obs_startup: 17.279 ms
info:    ┗OBSBasic::OBSInit: 431.378 ms
info:      ┣OBSBasic::InitBasicConfig: 0.142 ms
info:      ┣OBSBasic::ResetAudio: 0.305 ms
info:      ┣OBSBasic::ResetVideo: 96.802 ms
info:      ┣OBSBasic::InitOBSCallbacks: 0.005 ms
info:      ┣OBSBasic::InitHotkeys: 0.066 ms
info:      ┣obs_load_all_modules: 174.098 ms
info:      ┃ ┣obs_init_module(decklink-ouput-ui.so): 0.794 ms
info:      ┃ ┣obs_init_module(frontend-tools.so): 126.422 ms
info:      ┃ ┣obs_init_module(image-source.so): 0.003 ms
info:      ┃ ┣obs_init_module(linux-capture.so): 0.71 ms
info:      ┃ ┣obs_init_module(linux-decklink.so): 0.136 ms
info:      ┃ ┣obs_init_module(linux-pulseaudio.so): 0.001 ms
info:      ┃ ┣obs_init_module(linux-v4l2.so): 0.001 ms
info:      ┃ ┣obs_init_module(obs-ffmpeg.so): 0.2 ms
info:      ┃ ┃ ┗nvenc_check: 0.159 ms
info:      ┃ ┣obs_init_module(obs-filters.so): 0.007 ms
info:      ┃ ┣obs_init_module(obs-libfdk.so): 0 ms
info:      ┃ ┣obs_init_module(obs-outputs.so): 0.001 ms
info:      ┃ ┣obs_init_module(obs-transitions.so): 0.004 ms
info:      ┃ ┣obs_init_module(obs-x264.so): 0.001 ms
info:      ┃ ┣obs_init_module(obs-xdg-portal.so): 16.953 ms
info:      ┃ ┣obs_init_module(rtmp-services.so): 0.875 ms
info:      ┃ ┗obs_init_module(text-freetype2.so): 0.012 ms
info:      ┣OBSBasic::ResetOutputs: 0.195 ms
info:      ┣OBSBasic::CreateHotkeys: 0.038 ms
info:      ┣OBSBasic::InitService: 1.77 ms
info:      ┣OBSBasic::InitPrimitives: 0.275 ms
info:      ┗OBSBasic::Load: 16.356 ms
info: obs_hotkey_thread(25 ms): min=0.141 ms, median=0.623 ms, max=9.118 ms, 99th percentile=1.505 ms, 100% below 25 ms
info: audio_thread(Audio): min=0.015 ms, median=0.116 ms, max=5.526 ms, 99th percentile=3.703 ms
info:  ┗receive_audio: min=0.005 ms, median=1.665 ms, max=5.046 ms, 99th percentile=4.019 ms, 0.319608 calls per parent call
info:    ┣buffer_audio: min=0 ms, median=0.002 ms, max=0.05 ms, 99th percentile=0.012 ms
info:    ┗do_encode: min=0.156 ms, median=1.664 ms, max=5.038 ms, 99th percentile=4.012 ms
info:      ┗encode(simple_aac_recording): min=0.149 ms, median=1.65 ms, max=4.001 ms, 99th percentile=3.385 ms
info: obs_graphics_thread(33.3333 ms): min=0.053 ms, median=1.716 ms, max=7.815 ms, 99th percentile=6.261 ms, 100% below 33.333 ms
info:  ┣tick_sources: min=0.001 ms, median=0.02 ms, max=0.186 ms, 99th percentile=0.078 ms
info:  ┣output_frame: min=0.047 ms, median=0.209 ms, max=6.159 ms, 99th percentile=4.582 ms
info:  ┃ ┣gs_context(video->graphics): min=0.047 ms, median=0.208 ms, max=6.159 ms, 99th percentile=1.849 ms
info:  ┃ ┃ ┣render_video: min=0.024 ms, median=0.142 ms, max=1.892 ms, 99th percentile=1.246 ms
info:  ┃ ┃ ┃ ┣render_main_texture: min=0.02 ms, median=0.12 ms, max=0.54 ms, 99th percentile=0.408 ms
info:  ┃ ┃ ┃ ┣render_output_texture: min=0.111 ms, median=0.322 ms, max=0.75 ms, 99th percentile=0.66 ms, 0.315789 calls per parent call
info:  ┃ ┃ ┃ ┣render_convert_texture: min=0.06 ms, median=0.143 ms, max=0.945 ms, 99th percentile=0.74 ms, 0.315789 calls per parent call
info:  ┃ ┃ ┃ ┗stage_output_texture: min=0.035 ms, median=0.104 ms, max=0.249 ms, 99th percentile=0.211 ms, 0.315789 calls per parent call
info:  ┃ ┃ ┣gs_flush: min=0.001 ms, median=0.003 ms, max=4.221 ms, 99th percentile=0.579 ms
info:  ┃ ┃ ┗download_frame: min=0 ms, median=0.023 ms, max=0.103 ms, 99th percentile=0.074 ms, 0.315789 calls per parent call
info:  ┃ ┗output_video_data: min=0.348 ms, median=0.734 ms, max=3.953 ms, 99th percentile=3.843 ms, 0.313019 calls per parent call
info:  ┗render_displays: min=0.003 ms, median=1.353 ms, max=5.457 ms, 99th percentile=2.58 ms
info: video_thread(video): min=1.73 ms, median=2.705 ms, max=7.325 ms, 99th percentile=6.401 ms
info:  ┗receive_video: min=1.727 ms, median=2.701 ms, max=7.32 ms, 99th percentile=6.396 ms
info:    ┗do_encode: min=1.726 ms, median=2.698 ms, max=7.317 ms, 99th percentile=6.393 ms
info:      ┗encode(simple_h264_recording): min=1.695 ms, median=2.679 ms, max=6.389 ms, 99th percentile=5.629 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.25 ms, median=25.762 ms, max=34.276 ms, 12.0763% within ±2% of 25 ms (0% lower, 87.9237% higher)
info: obs_graphics_thread(33.3333 ms): min=33.06 ms, median=33.334 ms, max=33.638 ms, 100% within ±2% of 33.333 ms (0% lower, 0% higher)
info: =================================================
info: Number of memory leaks: 0
TingPing commented 4 years ago

CC @GeorgesStavracas

GeorgesStavracas commented 4 years ago

You need xdg-desktop-portal and xdg-desktop-portal-gtk from their respective master branches.

bdaase commented 4 years ago

You need xdg-desktop-portal and xdg-desktop-portal-gtk from their respective master branches.

Because of the pipewire changes in there, right?

@TingPing So do you want me to close this issue here as it seems not to be a problem with the flatpak itself?

TingPing commented 4 years ago

We can leave it until they land in a stable release so people coming to report it will see it.

fastoslinux commented 4 years ago

working, now just need pipewire update on flatpak runtime ..

https://bugzilla.redhat.com/show_bug.cgi?id=1806721

bdaase commented 4 years ago

xdg-desktop-portal and xdg-desktop-portal-gtk 1.6.0-4.fc32 both landed in the F32 updates-testing repository (the updates repository does not exist yet) and everything works perfect :smile:
Therefore I am going to close this now.