Skip to content

Windows reads a phone's or a camera's video: raea fetches FFmpeg the first time one needs it - #191

Merged
shinyobjectz merged 1 commit into
mainfrom
windows-ffmpeg
Nov 19, 2026
Merged

shinyobjectz merged 1 commit into
mainfrom
windows-ffmpeg

Conversation

@shinyobjectz

Copy link
Copy Markdown
Owner

On Windows, raea's own decoders read H.264 without B-frames (openh264) and AV1. They can't read what phones and cameras write: H.264 with B-frames, HEVC, VP9. With no FFmpeg installed, as on nearly every Windows PC, raea media probe, raea check and a render's <Video> refused such a clip ("no picture or sound raea can read"). Found testing 0.1.8-rc6's raea.exe on Windows with a B-frame H.264 clip.

What changes

  • raea_io_assets::ffmpeg_tool. ffmpeg or ffprobe comes from the PATH, else from raea's own copy in $RAEA_TOOLS_CACHE/ffmpeg/bin.
    • On Windows, raea's own is fetched there once: GyanD's essentials build 9.0.2 (the build winget's Gyan.FFmpeg.Essentials installs).
    • It comes from GyanD's GitHub release: 114 MB, checked against GitHub's SHA-256 digest for the asset, and unpacked by Windows' tar.exe.
    • Only ffmpeg.exe, ffprobe.exe and the LICENSE are kept, about 210 MB. Nothing is bundled.
    • Off Windows, the error names the package-manager command to install FFmpeg.
  • One fetcher. The fetch shares uv's code (fetch_archive, formerly fetch_uv), which now resumes across curl's tries (-C - --retry-all-errors), as A local model's download resumes where it stopped, instead of starting over #189 does for the models.
  • Only video opens fetch. The ffmpeg backend runs the resolved binary everywhere, but only opening a file named as a video can fetch. Sound, encoding and capability queries never do, so a silent clip tried on every backend, or an mp3, never downloads 114 MB.
  • Every backend in order. raea-app-media opens a video through raea_io_media::preferred(), as renders already did, instead of the platform's backend alone. That covers media probe, the change and picture commands, and raea check's native reader. probe's refusal now says what each backend said.

Checked

  • On the Mac with no FFmpeg on PATH and the portable backend first:
    • B-frame H.264 and HEVC probe through VideoToolbox; they were refused before.
    • VP9 is refused with each backend's reason, ending in the install line.
    • VP9 probes once FFmpeg is on PATH.
  • The zip's SHA-256 matches GitHub's digest, and extracting the three files was checked with bsdtar.
  • Tests pass: raea-io-assets, raea-io-ffmpeg, raea-app-media, and raea-app-check-read (its parity test against FFmpeg).
  • Gates pass: size, dupes, layers, names, one-version, no-void, taxonomy, rask check and cargo shear.
  • The Windows fetch itself is proved on the release's raea.exe on Windows: probes of B-frame H.264, HEVC and VP9 with nothing on PATH, raea check, and a render playing the clips.

🤖 Generated with Claude Code

…first time one needs it

On Windows raea's own decoders read H.264 without B-frames (openh264) and AV1, not what phones and cameras write:
H.264 with B-frames, HEVC, VP9. With no FFmpeg installed (as on nearly every Windows PC), raea media probe, raea
check and a render's <Video> refused such a clip ("no picture or sound raea can read"). Found testing 0.1.8-rc6's
raea.exe on Windows with orbit.mp4 (H.264 High, B-frames).

- raea_io_assets::ffmpeg_tool: ffmpeg or ffprobe from the PATH, else raea's own in $RAEA_TOOLS_CACHE/ffmpeg/bin.
  On Windows raea's own is fetched there once: GyanD's essentials build 9.0.2 (the one winget's
  Gyan.FFmpeg.Essentials installs) from its GitHub release, 114 MB, checked against GitHub's SHA-256 digest
  for it, unpacked by Windows' tar (ffmpeg.exe, ffprobe.exe and the LICENSE, ~210 MB). Nothing is bundled.
  Off Windows the error names the package manager's command.
- The fetch shares uv's code (fetch_archive, from fetch_uv), which now resumes across curl's tries
  (-C - --retry-all-errors, as #189 does for the models).
- The ffmpeg backend runs that binary everywhere. Only opening a file named as a video fetches; sound,
  encoding and asking what FFmpeg can do never do, so a silent clip tried on every backend, or an mp3, never
  downloads 114 MB.
- raea-app-media opens a video through every backend in order (raea_io_media::preferred), as renders already
  did, instead of the platform's alone: media probe, the change and picture commands, and raea check's
  native reader. probe's refusal now says what each backend said.

Checked on the Mac with no FFmpeg on PATH and the portable backend first: B-frame H.264 and HEVC probe
through VideoToolbox (they were refused before), and VP9 is refused with each backend's reason, ending in the
install line; VP9 probes once FFmpeg is on PATH. The zip's layout and extraction were checked with bsdtar.
The Windows fetch itself is proved on the release's raea.exe on Windows. Tests: raea-io-assets, raea-io-ffmpeg,
raea-app-media and raea-app-check-read (parity against FFmpeg) pass.
@shinyobjectz
shinyobjectz merged commit fcc8fde into main Nov 19, 2026
4 checks passed
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