Bug Report Xcomposite doesn't capture all windows.

ShadWolf

New Member
I can't seem to find any workable solutions to this problem after searching around but with OBS Studio Xcomposite doesn't work for capturing every window. It can capture specific types of windows, but not others. Like for example; Xcomposite will capture just about all Qt4 windows no problem, but trying to capture a window that is in GTK? It's a no-go. Instead I'm just left with a blank input when I try to capture GTK windows.

I have carefully ensured I have every package possible required for OBS Studio to capture Xcomposite, but it's not helping at all. For as long as I've used OBS on Linux it's never been able to capture all window types with Xcomposite. In past versions of OBS it would just give me a red box, but in these later versions it's just blank, I have tested to run OBS from Terminal just to capture vital information as to what is going on when I try to capture certain window types and this is what I got from testing OBS from running it in Terminal;


Code:
$ obs
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
Attempted path: share/obs/obs-studio/license/gplv2.txt
Attempted path: /usr/share/obs/obs-studio/license/gplv2.txt
info: Processor: 8 logical cores
info: Processor: Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
info: Physical Memory: 7428MB Total
info: Kernel Version: Linux 4.4.0-34-generic
info: Distribution: "Linux Mint" "18"
QObject::connect: invalid null parameter
info: OBS 0.16.2 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 48000
    speakers:        2
info: OpenGL version: 3.2.0 NVIDIA 367.57

info: ---------------------------------
info: video settings reset:
    base resolution:   1366x768
    output resolution: 1280x720
    downscale filter:  Bicubic
    fps:               30/1
    format:            NV12
info: ---------------------------------
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
info: No blackmagic support
info: ---------------------------------
info:   Loaded Modules:
info:     qtwebkit-browser.so
info:     text-freetype2.so
info:     rtmp-services.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-jack.so
info:     linux-decklink.so
info:     linux-capture.so
info:     image-source.so
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 8.0'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Logitech_Logitech_G633_Gaming_Headset_00000000-00.analog-stereo.monitor'
info: pulse-input: Server name: 'pulseaudio 8.0'
info: pulse-input: Audio format: s16le, 44100 Hz, 1 channels
info: pulse-input: Started recording from 'alsa_input.usb-Logitech_Logitech_G633_Gaming_Headset_00000000-00.analog-mono'
info: xshm-input: Geometry 1366x768 @ 0,0
info: v4l2-input: Start capture from /dev/video1
error: v4l2-input: Unable to open device
error: v4l2-input: Initialization failed
info: Switched to scene 'Art'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Game':
info:     - source: 'GAME' (xcomposite_input)
info:     - source: 'CAM' (v4l2_input)
info:         - filter: 'Crop/Pad' (crop_filter)
info:         - filter: 'Video Delay (Async)' (async_delay_filter)
info:     - source: 'Image' (image_source)
info: - scene 'Art':
info:     - source: 'ART' (xcomposite_input)
info:     - source: 'desktop' (xshm_input)
info: ------------------------------------------------
info: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds
info: Update check: last known remote version is 0.4.0
info: adding 21 milliseconds of audio buffering, total audio buffering is now 64 milliseconds
info: adding 21 milliseconds of audio buffering, total audio buffering is now 85 milliseconds
info: xshm-input: Geometry 1366x768 @ 0,0
info: User added source 'Window Capture (Xcomposite)' (xcomposite_input) to scene 'Art'
error: glCopyImageSubData failed, glGetError returned 0x502
error: device_copy_texture (GL) failed
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
info: adding 21 milliseconds of audio buffering, total audio buffering is now 106 milliseconds
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: glCopyImageSubData failed, glGetError returned 0x502
error: device_copy_texture (GL) failed
error: glCopyImageSubData failed, glGetError returned 0x502
error: device_copy_texture (GL) failed
error: glCopyImageSubData failed, glGetError returned 0x502
error: device_copy_texture (GL) failed
...
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
error: xcompcap: glXCreatePixmap failed: BadAlloc (insufficient resources for operation)
info: User Removed source 'Window Capture (Xcomposite)' (xcomposite_input) from scene 'Art'

OBS just simply spams that it failed to copy device texture, and that there isn't enough resources for the operation. I will state to correct it that, this computer is more than capable of running OBS and HAS the sufficient resources for capturing all window types.

Code:
Graphics:  Card-1: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
           Card-2: NVIDIA GF108M [GeForce GT 630M] bus-ID: 01:00.0
           Display Server: X.Org 1.18.4 driver: nvidia Resolution: 1366x768@60.03hz
           GLX Renderer: GeForce GT 630M/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 367.57 Direct Rendering: Yes


Here's for example of what I'm trying to capture using the Xcomposite plugin that comes with OBS Studio;

1 window I have for an art program captures just fine. Now I also want to capture window for a Web Browser that I currently have open, that is Google Chrome (great). I add a new source into OBS and select that window to capture, except it's blank and begins throwing errors that it can't. i test to see if I get the same issue with Firefox instead (it doesn't). Now that becomes an issue here. Why will it capture Firefox, but not Google Chrome? Reason: Firefox uses Qt4, Google Chrome uses GTK. Now what can be done about it? I don't know exactly, but perhaps OBS could use something else in addition to having Xcomposite when it's capturing a window to record as a source input. Oh and btw, even if I do checkbox the source for "Use alpha-less texture format (Mesa workaround)" it does nothing for me. I even checked out over on the Manti Bug reporting for OBS Studio, and checked to see what effect that would. Some reported that it worked for them, but for me it doesn't work at all.
 
Top