Skip to content

Drop browser codec preloads from yt-dlp host - #10513

Open
Drecullith wants to merge 1 commit into
omacom:quattrofrom
Drecullith:fix/chromium-ytdlp-preload
Open

Drop browser codec preloads from yt-dlp host#10513
Drecullith wants to merge 1 commit into
omacom:quattrofrom
Drecullith:fix/chromium-ytdlp-preload

Conversation

@Drecullith

Copy link
Copy Markdown

Summary

Chromium-family browsers can inject browser-specific codec libraries into native messaging hosts through environment variables such as LD_PRELOAD and VIVALDI_PRELOADS.

When omarchy-chromium-ytdlp-host inherits those variables, child processes such as yt-dlp and ffmpeg inherit them too. With Vivaldi's proprietary codec setup, this can make the system ffmpeg load Vivaldi's bundled libffmpeg.so, causing ffmpeg to crash and preventing yt-dlp from merging downloaded streams.

This change clears the browser-only preload variables immediately when the native messaging host starts:

  • unset LD_PRELOAD
  • unset VIVALDI_PRELOADS

This keeps browser codec injection from leaking into yt-dlp, ffmpeg, or other helper processes spawned by the host.

Fixes #10469.

Testing

Added test/shell.d/chromium-ytdlp-preload-test.sh which starts the native host with fake values for both preload variables and verifies that neither remains in the host environment.

Also verified the final change is limited to the native host and its focused regression test.

@Drecullith
Drecullith force-pushed the fix/chromium-ytdlp-preload branch from 47efdaa to 7805e5d Compare September 6, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-chromium-ytdlp-host does not unset LD_PRELOAD from Chromium/Vivaldi, crashing ffmpeg

1 participant