ffprobe-static

Prebuilt ffprobe binaries for macOS, Linux, and Windows, resolved to a single path constant for Node.js.

Library
npm
v3.1.0
60stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
28/100Needs Attention
Development Activity0
Maintenance0
Community40
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
58/100Fair
Architecture40
Code Quality45
Innovation55
Learning Curve90

ffprobe-static removes the need to install ffmpeg’s ffprobe binary separately when a Node.js project just needs to inspect media files. It vendors prebuilt ffprobe executables for macOS (x64, arm64), Linux (32-bit and 64-bit), and Windows (32-bit and 64-bit) directly inside the npm package, and exposes the correct path for the current platform through a single path export.

Instead of asking end users to install ffmpeg system-wide or shelling out to package managers across operating systems, tools built on top of ffprobe-static can require('ffprobe-static').path, hand that path to child_process.spawn or a wrapper like fluent-ffmpeg, and get consistent media-probing behavior without a manual dependency step.

What You Get

  • Prebuilt ffprobe binaries for macOS (x64, arm64), Linux (ia32, x64), and Windows (ia32, x64) bundled directly in the npm package
  • A single path export that resolves to the correct binary for the current platform and architecture at require-time
  • No system-wide ffmpeg/ffprobe installation required for consumers, since the binary ships inside node_modules
  • A small, dependency-free surface area (only tape as a dev dependency) that’s easy to vendor or fork

Common Use Cases

  • Extracting media metadata (duration, codec, resolution, bitrate) from uploaded video or audio files in a Node.js backend
  • Powering higher-level wrappers such as fluent-ffmpeg that need a guaranteed ffprobe binary path without asking the host to install ffmpeg manually
  • Validating media files during a build or CI pipeline before further transcoding steps run
  • Shipping a self-contained CLI or Electron app that needs to probe media files without relying on a system ffmpeg install

Under The Hood

Architecture — The entire runtime is index.js (roughly 20 lines): it reads os.platform() and os.arch(), validates them against a small allowlist (darwin, linux, win32; x64/arm64 on macOS), and joins them with __dirname and bin/ to build a path to the matching pre-committed binary under bin/<platform>/<arch>/ffprobe[.exe]. There is no runtime download, compilation, or network call — every binary for every supported platform ships inside the published package, and exports.path is the package’s entire public API.

Tech Stack — Plain CommonJS JavaScript with zero runtime dependencies; the only listed dependency is tape for tests. The binaries themselves are static ffprobe builds sourced from third-party build providers (evermeet.cx for macOS, johnvansickle.com for Linux, zeranoe.com for Windows), credited to the sibling project ffmpeg-static this package is modeled on.

Code Quality — The single test in tests/index.js only asserts that ffprobe.path resolves to a file that exists on disk (fs.statSync(...).isFile()); there’s no assertion on binary version, output correctness, or invocation behavior. Error handling for unsupported platforms is a console.error plus process.exit(1), which is appropriate for a require-time guard but means the package cannot be safely required and caught inside a try/catch on an unsupported platform. Naming is minimal and consistent, and the small surface area limits how much can go wrong.

API Design — The API is as small as it gets: one property, path, pointing at a binary. Zero configuration, zero boilerplate. The tradeoff is a lack of flexibility — no override for a custom binary location, no async binary-presence check, and no version reporting — but for the narrow job of “give me a working ffprobe path,” it requires no learning curve at all.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search