
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ffmpeg-simplified
Advanced tools
ffmpeg-simplified is a batteries-included toolkit that provides a simple, ergonomic Promise-based API for everyday audio and video automation tasks. It directly wraps your locally installed ffmpeg binary without any intermediate dependencies.
ffmpeg and ffprobe binariestsdown targeting Node ≥22 and Bun ≥1.0bun test with real media fixturesffmpeg installation available on your PATHThe package automatically detects system-installed ffmpeg and ffprobe binaries using the which utility. We intentionally avoid bundling ffmpeg-static so you can manage codecs and updates yourself.
The library includes a lightweight custom wrapper (src/vendor/ffmpeg.ts) tailored specifically for this package's use cases:
This approach eliminates dependency on external wrappers while providing a clean, maintainable implementation focused on our specific needs.
Install with your preferred package manager:
bun add ffmpeg-simplified
# or
npm install ffmpeg-simplified
# or
yarn add ffmpeg-simplified
import {
delayAudio,
detectSilences,
formatMedia,
getFrames,
getMediaDuration,
getVideoDimensions,
mergeSlices,
replaceAudio,
slice,
sliceAndMerge,
splitFileOnSilences,
type Logger,
} from "ffmpeg-simplified";
const duration = await getMediaDuration("./samples/interview.mp4");
const silences = await detectSilences("./samples/interview.wav", {
silenceThreshold: -45,
silenceDuration: 0.3,
});
await formatMedia("./samples/interview.wav", "./output/clean.wav", {
fast: true,
noiseReduction: { dialogueEnhance: true },
});
await delayAudio("./samples/video.mp4", "./output/synced.mp4", 0.5);
Most functions accept an optional logger parameter that conforms to the Logger interface (compatible with console and popular logging libraries):
import type { Logger } from "ffmpeg-simplified";
// Use the built-in console
await formatMedia(input, output, options, callbacks, console);
// Or your own logger (pino, winston, etc.)
import pino from "pino";
const logger = pino();
await sliceAndMerge(input, output, options, logger);
// Minimal custom logger
const customLogger: Logger = {
info: (msg) => console.log(`[INFO] ${msg}`),
error: (msg) => console.error(`[ERROR] ${msg}`),
};
await splitFileOnSilences(file, outputDir, options, callbacks, customLogger);
The Logger interface is simple and all methods are optional:
interface Logger {
info?: (message: string, ...args: any[]) => void;
debug?: (message: string, ...args: any[]) => void;
warn?: (message: string, ...args: any[]) => void;
error?: (message: string, ...args: any[]) => void;
}
delayAudio(inputFile, outputFile, delayInSeconds, logger?)Adjusts audio synchronization in a video by applying a delay (positive) or advance (negative) to the audio track.
detectSilences(filePath, options)Finds quiet sections in an audio file using silencedetect.
formatMedia(input, outputPath, options?, callbacks?, logger?)Preprocess audio streams (noise reduction, mono downmixing, fast mode, callback hooks).
getMediaDuration(filePath) / getVideoDimensions(filePath)Lightweight wrappers around ffprobe for duration and resolution metadata.
splitFileOnSilences(filePath, outputDir, options?, callbacks?, logger?)Chunk long-form audio into natural speaking segments and normalizes short clips.
slice(filePath, options, logger?) / sliceAndMerge(filePath, outputFile, options, logger?)Slice videos by absolute timestamps or human-friendly timecodes, then optionally merge back together.
mergeSlices(inputFiles, outputFile, options?, logger?)Concat arbitrary files using the efficient concat demuxer.
replaceAudio(videoFile, audioFile, outputFile, logger?)Swap a video's audio track without re-encoding the video stream.
getFrames(videoFile, options, logger?)Extract thumbnails at a fixed cadence with optional cropping and preprocessing presets.
Refer to the inline JSDoc comments for parameter details and return types—every exported function documents accepted options and callback hooks.
Install dependencies and run the toolchain with Bun:
bun install
bun run build
bun test
tsdown, producing ESM output and declaration files in dist/.setupTests.ts to expose fixture paths (testing/sample.*). The suite exercises real audio/video transformations, so ensure ffmpeg and ffprobe binaries are reachable.bun install.bun test and bun run build before submitting a pull request.MIT © Ragaeeb Haq
FAQs
A wrapper around ffmpeg to achieve tasks via simple APIs.
We found that ffmpeg-simplified demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.