Skip to content

npm Package

Phillippe Pelzer edited this page Nov 24, 2026 · 5 revisions

npm package

@nomercy-entertainment/ffmpeg-static gives you the NoMercy FFmpeg binary from Node.js or a shell script.

It downloads the archive for your platform from the GitHub releases on first use. It unpacks it, caches it in the OS temp directory and returns the absolute path. This is not stock FFmpeg, so output matches what the NoMercy MediaServer produces.

The package README is the source of truth: clients/npm/README.md. This page is a summary.

Install

npm install @nomercy-entertainment/ffmpeg-static

Use from code

import { ensureFfmpeg, ensureFfprobe } from '@nomercy-entertainment/ffmpeg-static';

const ffmpeg = await ensureFfmpeg(); // absolute path, downloaded on first call
const ffprobe = await ensureFfprobe();

Only the first call downloads. Later calls return the cached path.

Use from a shell

The package installs two commands that print the path.

FFMPEG=$(npx nomercy-ffmpeg-path)
FFPROBE=$(npx nomercy-ffprobe-path)

Environment variables

Variable Effect
NOMERCY_FFMPEG Path to an ffmpeg you supply. If it runs, it is used and nothing is downloaded.
NOMERCY_FFPROBE The same, for ffprobe.
NOMERCY_FFMPEG_VERSION Pins another release tag of this project.
NOMERCY_FFMPEG_FFVERSION Sets the FFmpeg version used in the archive name.

Each package version downloads the release with the same number: package 1.0.50 uses v1.0.50 and the 9.1 archives. The defaults shown in the package README on GitHub are placeholders.

Supported platforms

Windows x64 and ARM64, Linux x64 and ARM64, macOS x64 and ARM64. FreeBSD is not supported by the package. On another platform it throws an error and names NOMERCY_FFMPEG.

The Linux x64 archive needs glibc 2.35 or newer. See Platforms.

To get the archive by hand instead, see Installation.

Clone this wiki locally