Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:0xsline OpenChatCut FFprobe

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Media_Processing
Last Updated 2026-10-22 14:00 GMT

Overview

FFprobe binary required for media metadata probing, quality risk detection, and format normalization decisions across the import and export pipelines.

Description

FFprobe is the metadata inspection tool that accompanies FFmpeg. OpenChatCut uses it to extract codec, resolution, frame rate, pixel format, and alpha channel information from media files. This data drives normalization admission decisions (whether a file needs transcoding), quality risk detection (black/freeze/silence frames in export QA), and transparent MOV detection. The binary is resolved through the same priority chain as FFmpeg: explicit env override, `@ffprobe-installer/ffprobe` npm package, then system PATH.

Usage

Use this environment for media probing, normalization admission control, export quality assurance, and transparent MOV detection. Any implementation that inspects media metadata before processing requires this environment.

System Requirements

Category Requirement Notes
OS macOS, Windows, Linux Cross-platform
Hardware Any CPU-only metadata extraction
Disk Minimal Only reads file headers

Dependencies

System Packages

  • `ffprobe` (via `@ffprobe-installer/ffprobe` >= 2.1.2, system PATH, or env override)

Environment Variables

  • `OPENCHATCUT_FFPROBE` — Override FFprobe binary path (highest priority)
  • `FFPROBE_PATH` — Fallback override path

Quick Install

# FFprobe is installed automatically via npm:
npm install @ffprobe-installer/ffprobe

# Or install system FFprobe (bundled with ffmpeg):
# macOS: brew install ffmpeg
# Ubuntu: sudo apt install ffmpeg
# Windows: choco install ffmpeg

# Override path if needed:
export OPENCHATCUT_FFPROBE=/usr/local/bin/ffprobe

Code Evidence

Binary resolution from `server/media-binaries.ts:40-45`:

export function ffprobeBin(): string {
  return process.env.OPENCHATCUT_FFPROBE
    ?? process.env.FFPROBE_PATH
    ?? (ffprobeInstaller.path ? unpackedPath(ffprobeInstaller.path) : null)
    ?? 'ffprobe';
}

Probe usage in local media import from `server/local-media-import.ts:138-142`:

const probe = JSON.parse(await run(ffprobeBin(), [
  '-v', 'error', '-select_streams', 'v:0',
  '-show_entries', 'stream=codec_name,profile,pix_fmt:stream_tags=alpha_mode',
  '-of', 'json', source,
], 10_000, signal)) as { streams?: ProbeStream[] };

Common Errors

Error Message Cause Solution
`ffprobe exited 1` Corrupt media or unsupported format Validate source file integrity
`Binary not found` in packaged app asar unpacking failed for ffprobe-installer Verify electron-builder asarUnpack config
Empty probe JSON No video stream in source Check that the source file contains a video track

Compatibility Notes

  • Packaged desktop (asar): FFprobe binary is unpacked from `app.asar` via `unpackedPath()` since `spawn` cannot execute from inside an asar archive.
  • Timeout: Probe commands use a 10-second timeout in local media import to prevent hangs on slow network-mounted volumes.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment