NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.28k stars 13.54k forks source link

obs-studio: Temporal AQ not supported #265075

Closed musjj closed 5 months ago

musjj commented 10 months ago

Describe the bug

When trying to record a video, OBS crashes with this error message:

[h264_nvenc @ 0x3403480] Temporal AQ not supported
[h264_nvenc @ 0x3403480] No capable devices found

Steps To Reproduce

Steps to reproduce the behavior:

  1. rm -rf ~/.config/obs-studio
  2. nix run nixpkgs#obs-studio
  3. Pick Optimize just for recording on startup
  4. Add a Screen Capture (XSHM) source
  5. Press Start Recording

Expected behavior

Records normally.

Additional context

OBS studio worked fine like a month ago, so I suspect that there was a regression somewhere. Window Capture (Xcomposite) source also does not display anything on the preview. Probably related.

Notify maintainers

@jb55 @MP2E @deviant @materusPL

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.60, NixOS, 23.11 (Tapir), 23.11.20231029.0cbe9f6`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.1`
 - nixpkgs: `/nix/store/z6w242l49pbrdawkz5vdhfxh2mvsj36c-source`
materusPL commented 10 months ago

Could you provide full log? I've just checked on my PC with nvidia GPU but can't reproduce this error, recording for XSHM seems to work fine.

musjj commented 10 months ago

Here's the log:

Full log ``` debug: Attempted path: share/obs/obs-studio/locale/en-US.ini debug: Attempted path: /nix/store/bx77mxfbdrijmxdzv0xxsn172hwfgpgs-obs-studio-29.1.3/share/obs/obs-studio/locale/en-US.ini debug: Attempted path: share/obs/obs-studio/locale.ini debug: Attempted path: /nix/store/bx77mxfbdrijmxdzv0xxsn172hwfgpgs-obs-studio-29.1.3/share/obs/obs-studio/locale.ini debug: Attempted path: share/obs/obs-studio/themes/Yami.qss debug: Attempted path: /nix/store/bx77mxfbdrijmxdzv0xxsn172hwfgpgs-obs-studio-29.1.3/share/obs/obs-studio/themes/Yami.qss info: Using EGL/X11 info: CPU Name: Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz info: CPU Speed: 3178.890MHz info: Physical Cores: 4, Logical Cores: 4 info: Physical Memory: 15957MB Total, 536MB Free info: Kernel Version: Linux 6.1.60 info: Distribution: NixOS "23.11" info: Desktop Environment: none+dummy (none+dummy) info: Session Type: x11 info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1 info: Qt Version: 6.6.0 (runtime), 6.6.0 (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: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce GT 635/PCIe/SSE2 info: OpenGL loaded successfully, version 3.3.0 NVIDIA 470.199.02, shading language 3.30 NVIDIA via Cg compiler info: --------------------------------- info: video settings reset: base resolution: 1366x768 output resolution: 1280x720 downscale filter: Bicubic fps: 60/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 117.0.5938.150 (runtime), 117.2.4+g5053a95+chromium-117.0.5938.150 (compiled) info: NVENC supported error: VAAPI: Failed to initialize display in vaapi_device_h264_supported info: FFmpeg VAAPI H264 encoding not supported error: VAAPI: Failed to initialize display in vaapi_device_hevc_supported info: FFmpeg VAAPI HEVC encoding not 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.6.0 | Qt version (run-time): 6.6.0 info: [obs-websocket] [obs_module_load] Linked ASIO Version: 102400 info: [obs-websocket] [obs_module_load] Module loaded. info: [vlc-video]: VLC 3.0.18 Vetinari 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-websocket.so info: obs-vst.so info: obs-transitions.so info: obs-outputs.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: linux-alsa.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: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.80) 15.0.0' info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor' (default) info: [Loaded global audio device]: 'Desktop Audio' info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.80) 15.0.0' info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor' (default) info: [Loaded global audio device]: 'Mic/Aux' info: [window-capture: 'Window Capture (Xcomposite)'] update settings: title: TITLE class: CLASS error: xcb_composite_name_window_pixmap failed info: Switched to scene 'Scene' info: ------------------------------------------------ info: Loaded scenes: info: - scene 'Scene': info: - source: 'Window Capture (Xcomposite)' (xcomposite_input) info: ------------------------------------------------ info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio) info: adding 64 milliseconds of audio buffering, total audio buffering is now 85 milliseconds (source: Mic/Aux) info: --------------------------------- info: [FFmpeg NVENC encoder: 'simple_video_recording'] settings: encoder: NVIDIA NVENC H.264 (FFmpeg) rate_control: CQP bitrate: 0 cqp: 21 keyint: 250 preset: p5 tuning: hq multipass: qres profile: high width: 1280 height: 720 b-frames: 2 psycho-aq: 1 GPU: 0 [h264_nvenc @ 0x4a47100] Temporal AQ not supported [h264_nvenc @ 0x4a47100] No capable devices found zsh: segmentation fault (core dumped) nix run nixpkgs#obs-studio ```

I'm using a legacy nvidia card: NVIDIA GeForce GT 635. Strange thing is that OBS used to work just fine. Not sure if the regression is on OBS or the driver.

materusPL commented 10 months ago

looking at error

[h264_nvenc @ 0x4a47100] Temporal AQ not supported
[h264_nvenc @ 0x4a47100] No capable devices found

It looks to me it's nvenc / driver related. I don't have access to any legacy card so can't really check that. I guess you could check if it's nvenc problem by trying to encode something with ffmpeg. But since obs is using ffmpeg I guess it will give same error.

flexiondotorg commented 5 months ago

Temporal AQ is available in OBS Studio fir NVENC on NixOS since January 8th 2024 :+1:

Fixed via https://github.com/NixOS/nixpkgs/commit/a819be8645e74d68cd530ae42410e82597f0f077