mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-08-31 02:41:44 +00:00
`ffmpeg-static` materializes a single platform-selected binary at install time. By default that follows the install host, so a default macOS/arm64 or linux/arm64 install can stage a binary that Lambda's x86-64 runtime cannot execute. Verify the ELF header (ELFCLASS64, EM_X86_64) before copying the binary into `bin/ffmpeg`. When the check fails, surface the canonical workarounds: run the build inside a linux/amd64 container, or pre-install with `npm_config_platform=linux npm_config_arch=x64`. In the distributed pipeline this mismatch can fail as early as Plan's `ffmpeg -version` probe after browser probing and before chunks are scheduled. Later encode/assemble spawns would fail for the same reason. ffprobe already goes through the platform-segmented `ffprobe-static/bin/linux/x64` path, so that side doesn't need the same check.