Skip to content

Fix ffmpeg HTTPS streaming on Mac/Linux; keep Windows on Schannel#583

Merged
scottdraves merged 1 commit into
masterfrom
fix/ffmpeg-tls-backend
Apr 22, 2026
Merged

Fix ffmpeg HTTPS streaming on Mac/Linux; keep Windows on Schannel#583
scottdraves merged 1 commit into
masterfrom
fix/ffmpeg-tls-backend

Conversation

@scottdraves

@scottdraves scottdraves commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Re-enable TLS in the bundled ffmpeg by adding the openssl feature on !windows platforms. Mac uses Apple's /etc/ssl/cert.pem (Keychain-backed), Linux uses the distro CA bundle. OpenSSL 3.6.1 is already linked into the Mac/Linux builds for libcurl (since 823d072), so no new dependencies.
  • Windows keeps the ffmpeg port's default --enable-schannel, which reads the Windows cert store natively — matching what vcpkg's curl[ssl] already does on Windows.
  • Also documents the runtime log path in AGENTS.md.

Background

PR #541 bumped the vcpkg submodule past upstream commit b94ab47c99 ("[ffmpeg] Remove deprecated securetransport"), which removed the implicit --enable-securetransport on macOS/iOS. The Apr 16 rebuild produced libavformat.a with no TLS backend at all — no ff_openssl, ff_securetransport, or ff_gnutls symbols — which broke the uncached streaming path in Player::PlayDreamNow with:

FFmpeg warning: https or dtls protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.
Failed to open URL https://edream-worker-alpha.infinidream.ai/...
Failed to initialize decoder

Only reached in a Next keypress where the next dream isn't pre-cached. Shipped in 0.14.9 and 0.14.10 (Windows-only prereleases — neither the public Mac app nor the Linux port has shipped yet).

This is a tactical fix. #556 will eventually supersede it by removing ffmpeg's network stack entirely and routing all HTTPS through libcurl.

Test plan

  • Mac (arm64): rebuilt vcpkg ffmpeg, verified OpenSSL symbols present in libavformat.a (nm ... | grep ff_openssl).
  • Mac (arm64): runtime test — play_dream WebSocket against an uncached UUID opened https://edream-worker-alpha.infinidream.ai/… successfully, VideoToolbox HW decode engaged, playback started cleanly. Log at 13:13:47 onward in today's run.
  • Windows: vcpkg install should rebuild ffmpeg with --enable-schannel (no openssl feature in the Windows branch). Confirm exported symbols (no ff_openssl_*, Schannel linkage present) and an HTTPS stream end-to-end.
  • Linux: same feature set as Mac; distro CA bundle handles cert verification.

🤖 Generated with Claude Code

PR #541 bumped the vcpkg submodule past upstream commit b94ab47c99
("[ffmpeg] Remove deprecated securetransport"), which silently dropped
the implicit --enable-securetransport on macOS/iOS. The Apr 16 rebuild
produced libavformat.a with no TLS backend (no ff_openssl,
ff_securetransport, or ff_gnutls symbols), breaking the
Player::PlayDreamNow uncached-streaming path with:

  FFmpeg warning: https or dtls protocol not found
  Failed to open URL https://...

Enable the openssl feature for ffmpeg on !windows (Mac reads
/etc/ssl/cert.pem, Linux reads the distro bundle; OpenSSL 3.6.1 is
already linked for libcurl since 823d072). Leave Windows on the
portfile's default --enable-schannel, which reads the Windows cert
store natively; vcpkg's curl[ssl] port already defaults to sspi on
Windows for the same reason.

Also document the runtime log path (/Users/Shared/infinidream.ai/Logs/)
in AGENTS.md.

Related: #556 will eventually supersede this by removing ffmpeg's
TLS dependency entirely (use libcurl for all network).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@scottdraves scottdraves merged commit 1d998a4 into master Apr 22, 2026
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.

1 participant