Skip to content

frontend: Say why a VA-API or QSV encoder from a profile is missing - #1841

Merged
zackees merged 2 commits into
obs-rust:masterfrom
rdoupe:fix/appimage-1720-encoder-missing-reasons
Oct 22, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
rdoupe:fix/appimage-1720-encoder-missing-reasons

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #1720

What and why

A profile imported into the AppImage uses ffmpeg_vaapi_tex (streaming) and obs_qsv11_v2 (recording). On start, the Missing Encoders dialog listed both as "Unknown (code: unknown)". The dialog (upstream's OBSBasic::CheckForMissingEncoders()) only explains x264 and NVENC; every other encoder falls through to "Unknown".

Both encoders have a known cause:

  • QSV: the AppImage is built without obs-qsv11. build.py --qsv defaults to false and appimage.yaml's qsv input is off until QSV is verified on real Intel hardware (README, "Left out of the AppImage"). The 0.1.0-beta.20261020 AppImage has no obs-qsv11.so; the .deb has it.
  • VA-API: obs-ffmpeg is in the AppImage, and its libavcodec is built with --enable-vaapi. libva and the VA drivers come from the host through the libobs-va* hostlib shims. obs-ffmpeg registers ffmpeg_vaapi_tex only when the default render node's VA driver initializes and can encode H.264. The released AppImage registers it on an AMD host (Arch, Mesa 26.2), and on the same GPU in a stock Ubuntu 24.04 container with mesa-va-drivers. In the issue, the reporter's vainfo shows both Intel VA drivers failing to initialize (va_openDriver() returns -1), so the VA-API part is the host's driver, not OBS. This PR therefore only refs the issue.

This change adds profile_missing_encoder_reason() (Qt-free, in profile-activate.h) and uses it in the dialog:

  • QSV ids, module not loaded: Module "obs-qsv11" not loaded (code plugin_not_loaded, upstream's string and KB anchor).
  • QSV ids, module loaded: "No Intel GPU that can encode this format with Quick Sync Video was found." (qsv_no_device)
  • VA-API ids, obs-ffmpeg loaded: "VA-API cannot encode this format on this system: no VA-API driver that can encode it was found. Run vainfo to check that your GPU's VA-API driver loads and lists VAEntrypointEncSlice for this format." (vaapi_not_supported). The wording covers every reason obs-ffmpeg skips the encoder: no driver, a driver that fails to initialize (the reporter's case), or one that cannot encode that format.
  • Everything else is unchanged ("Unknown").

Encoder fallback is unchanged and matches upstream. libobs creates a placeholder for the unregistered id ("Encoder ID 'obs_qsv11_v2' not found"), OBS keeps running, and the output fails when it starts. This PR does not turn QSV on in the AppImage, because that is a release packaging change. It needs libvpl in the glibc 2.28 build image and a run on Intel hardware.

RED → GREEN

  • RED commit: 017311f adds three tests to test_profile_activate and a stub that answers UNKNOWN. test_missing_qsv_names_the_module (0 != 1) and test_missing_vaapi_names_the_device (0 != 2) fail; 5 of 7 pass.
  • GREEN: ad7d5fc, 7 of 7 against hybrid libobs, in a full build with the frontend (Qt 6). The other tests that build profile code pass: test_encoder_fallback 6/6, test_profile_remove 4/4, test_frontend_api_call 4/4, test_scene_collection_migration 3/3. ci/test_plugin_locale.py: ok. uv run ci/local_gate.py --lane lint: ok.
  • Real app (UI, protocol output or logging changes): the frontend built from master and from this branch, run on a private Xvfb with a fresh HOME and an Advanced-output profile using ffmpeg_vaapi_tex and obs_qsv11_v2, on an AMD GPU (no Intel GPU). VA-API was made to fail with LIBVA_DRIVER_NAME=bogus, which makes vainfo fail with vaInitialize failed, like the reporter's.
    • master: both encoders show "Unknown (code: unknown)".
    • this branch, obs-qsv11 left out (as in the AppImage): obs_qsv11_v2: Module "obs-qsv11" not loaded (code: plugin_not_loaded); ffmpeg_vaapi_tex: the VA-API text above (vaapi_not_supported).
    • this branch, obs-qsv11 loaded: obs_qsv11_v2: the Quick Sync text (qsv_no_device); ffmpeg_vaapi_tex unchanged from the previous case.
    • this branch, working VA-API (no override): ffmpeg_vaapi_tex registers and is not listed; only obs_qsv11_v2 (qsv_no_device) is.

Checklist

  • Base is master (or the description starts with a Stacked: note)
  • I claimed the issue, or no one else has an open PR for it
  • Characterization test (if the unit had none), then RED, then GREEN commits (N/A for docs-only; a focused CI fix may push RED and GREEN together)
  • User-visible change: its line in docs/features.md is added or updated (not applicable: no user-visible change)
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Warning or flag changes (-W..., ratchets): built with scripting ON (PR CI builds no OBS app: run gh workflow run ci.yml --ref <branch> for the full builds) and cross-checked with clang and MSVC
  • Intentional differences from C listed in the parity test header and rust/README.md (ports)

A profile imported into the AppImage uses ffmpeg_vaapi_tex and
obs_qsv11_v2, and the Missing Encoders dialog lists both as
"Unknown (code: unknown)". The AppImage does not ship obs-qsv11, and
obs-ffmpeg registers the VA-API encoders only when it finds a VA-API
device that encodes the format, so each case has a reason to name.

Add profile_missing_encoder_reason() (a stub that answers UNKNOWN for
now) and tests: every QSV id reports a missing obs-qsv11 module, or no
Intel GPU when the module is loaded; every VA-API id reports no VA-API
device while obs-ffmpeg is loaded; x264, NVENC, AMF and near-miss ids
stay unknown.

Refs obs-rust#1720
@rdoupe
rdoupe requested a review from zackees as a code owner October 22, 2026 22:53
The Missing Encoders dialog explained only x264 and NVENC and listed
every other encoder as "Unknown (code: unknown)". A profile imported
into the AppImage with ffmpeg_vaapi_tex and obs_qsv11_v2 showed exactly
that, with nothing to act on.

profile_missing_encoder_reason() now maps the QSV and VA-API encoder
ids to their module. The dialog says "Module "obs-qsv11" not loaded"
when the build has no QSV plugin (the AppImage), and that no Intel GPU
can encode the format when it does. For VA-API, obs-ffmpeg registers an
encoder only when a VA-API driver on the system encodes that format, so
the dialog says VA-API cannot encode it here and points at vainfo,
which shows whether the driver loads and which formats it encodes.

Refs obs-rust#1720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants