Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

ffmpeg-staticffmpeg 静态

Agent Skill

ffmpeg-static 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,906

周安装

158

GitHub Stars

公开资料未说明

下载量

1,226
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ffmpeg-static(ffmpeg 静态)
来源仓库:https://github.com/fantox/ffmpeg-static
安装命令:
openclaw skills install ffmpeg-static
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install ffmpeg-static

简介

ffmpeg-static 通过 npm 包提供捆绑版 FFmpeg,自动回退系统安装。

  • 适合无需全局安装的本地视频/音频处理脚本集成。
  • 通过 clawhub 安装,使用 openclaw skills install ffmpeg-static 命令添加。
  • 需确保运行环境有足够磁盘空间存放二进制文件,注意版本兼容性。
  • 适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
ffmpeg-static-skill
description
FFmpeg operations via the ffmpeg-static npm package (bundled binary) with automatic fallback to a native system FFmpeg installation. Use for: video/audio transcoding, stream manipulation, thumbnail extraction, format conversion, and any FFmpeg pipeline from Node.js or shell scripts.
metadata
openclaw
requires
bins
env
[]
install
package
ffmpeg-static
global
false
primaryEnv
emoji
🎞️
homepage
https://github.com/eugeneware/ffmpeg-static
os

FFmpeg Static Skill

This skill wires ffmpeg-static — a self-contained FFmpeg binary distributed as an npm package — into every assistant interaction. When a native system FFmpeg is also installed, the skill prefers the system binary (usually newer and GPU-capable); otherwise it falls back to the bundled one. All FFmpeg capabilities are available in both paths.

No PATH manipulation needed. require('ffmpeg-static') returns the absolute path to the binary; scripts pass it directly to child_process.spawn.

Security Notice

  • ffmpeg-static downloads pre-built binaries from GitHub Releases during npm install. Verify the package on npmjs.com/package/ffmpeg-static.
  • Never pipe untrusted filenames or URLs into FFmpeg commands without validation — FFmpeg can read from URLs and arbitrary protocols.
  • The bundled binary does not include GPU-accelerated encoders (nvenc, vaapi, videotoolbox). For hardware acceleration, use the system FFmpeg.

Installation

Minimum install (bundled FFmpeg binary only)

npm install ffmpeg-static

Project install with ffprobe (recommended)

npm install ffmpeg-static ffprobe-static

Verify the binary path

node -e "console.log(require('ffmpeg-static'))"
# e.g. /path/to/node_modules/ffmpeg-static/ffmpeg

Check resolved binary (bundled vs. system)

node scripts/resolve_ffmpeg.js

Binary Resolution Logic

The skill resolves the FFmpeg binary in this priority order:

  1. FFMPEG_PATH env var — explicit override, always wins
  2. System FFmpeg — found by walking PATH directories with fs.accessSync; preferred when present (newer codecs, hardware acceleration)
  3. Bundled binaryrequire('ffmpeg-static') absolute path; guaranteed to exist after npm install
// Canonical resolution — use this pattern in all scripts
const { resolveFfmpeg } = require('./scripts/resolve_ffmpeg');
const ffmpegPath = resolveFfmpeg(); // throws if none found

Common Operations

Transcode video to H.264/AAC MP4

$(node -e "process.stdout.write(require('ffmpeg-static'))") \
  -i input.mkv -c:v libx264 -crf 23 -preset fast \
  -c:a aac -b:a 128k output.mp4

Extract thumbnail at timestamp

ffmpeg -ss 00:01:30 -i input.mp4 -frames:v 1 -q:v 2 thumb.jpg

Convert audio to MP3

ffmpeg -i input.flac -q:a 2 output.mp3

Extract audio stream only

ffmpeg -i input.mp4 -vn -c:a copy audio.aac

Trim without re-encoding

ffmpeg -ss 00:00:10 -to 00:01:00 -i input.mp4 -c copy trimmed.mp4

Concatenate files

ffmpeg -f concat -safe 0 -i filelist.txt -c copy output.mp4

filelist.txt format:

file '/abs/path/clip1.mp4'
file '/abs/path/clip2.mp4'

Scale video (maintain aspect ratio)

ffmpeg -i input.mp4 -vf "scale=1280:-2" -c:a copy scaled.mp4

Generate animated GIF

ffmpeg -i input.mp4 -vf "fps=10,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif

HLS stream packaging

ffmpeg -i input.mp4 -codec: copy -start_number 0 \
  -hls_time 10 -hls_list_size 0 -f hls output.m3u8

Using From Node.js

Copy-paste patterns are in templates/node_patterns.txt. Key steps:

  1. Resolve the binary using scripts/resolve_ffmpeg.js (pure fs, no shell calls)
  2. Spawn FFmpeg in your own project code using Node's child_process.spawn
  3. Or use fluent-ffmpeg — pass the resolved path via ffmpeg.setFfmpegPath()
// In YOUR project (not inside the skill)
const { resolveFfmpeg } = require('ffmpeg-static-skill/scripts/resolve_ffmpeg');
const ffmpegBin = resolveFfmpeg(); // absolute path, ready to pass to spawn or fluent-ffmpeg

See templates/node_patterns.txt for ready-to-copy spawn, progress, ffprobe, and fluent-ffmpeg snippets.


Environment Variables

VariableEffect
FFMPEG_PATHOverride binary path; takes precedence over system and bundled
FFPROBE_PATHOverride ffprobe binary path
FFMPEG_STATIC_SKIP_BINARY_DOWNLOADSet to 1 to skip download during npm install (use with system FFmpeg)

Best Practices

1. Always resolve the binary once at startup

Call resolveFfmpeg() once and cache the result — don't call require('ffmpeg-static') inline in hot paths.

2. Prefer -c copy when no re-encoding is needed

Stream copy (-c copy) is instantaneous and lossless. Only decode/encode when you actually need to change the codec or apply filters.

3. Use -ss before -i for fast seeking

-ss 00:01:00 -i input.mp4 (before -i) uses keyframe seeking (fast). -i input.mp4 -ss 00:01:00 (after -i) decodes from the start (accurate but slow for large files).

4. Always pass -y in non-interactive scripts

-y overwrites output without prompting. Without it, FFmpeg hangs waiting for stdin in CI or background processes.

5. Validate inputs before building command arrays

Never interpolate user-supplied strings directly into FFmpeg args. Always validate paths exist and are the expected media type using ffprobe first.

6. For hardware encoding, require system FFmpeg

Check ffmpeg -hwaccels at startup and gate hardware-accelerated paths on the system binary being active.

7. Set -loglevel error in production

Reduces stderr noise. Re-enable verbose logging (-loglevel verbose) when debugging a failed transcode.


Supported Formats (Bundled Binary)

The bundled ffmpeg-static binary is compiled with a broad but fixed set of codecs. Key inclusions:

Video: H.264 (libx264), H.265 (libx265), VP8/VP9 (libvpx), AV1 (libaom-av1), MPEG-2/4, ProRes, DNxHD, Theora Audio: AAC (native + libfdk-aac where licensed), MP3 (libmp3lame), Opus (libopus), Vorbis, FLAC, PCM Containers: MP4, MKV, MOV, WebM, AVI, TS, HLS (m3u8), DASH, FLV, GIF, APNG Images: MJPEG, PNG, WebP (via lavf)

Hardware encoders (nvenc, qsv, vaapi, videotoolbox) are not in the bundled binary. Use the system FFmpeg for GPU acceleration.

Troubleshooting

SymptomFix
Cannot find module 'ffmpeg-static'Run npm install ffmpeg-static in the project root
Binary not executable on Linux/macOSRun chmod +x $(node -e "process.stdout.write(require('ffmpeg-static'))")
Encoder libx264 not foundBundled binary may lack the codec; install system FFmpeg (apt install ffmpeg / brew install ffmpeg)
No such file or directory on outputEnsure the output directory exists before running FFmpeg
Transcode hangs in CIAdd -y flag to overwrite without prompting
Progress not reportedUse -progress pipe:1 to write progress data to stdout
Slow GIF generationUse the two-pass palettegen approach (see example above)
FFMPEG_STATIC_SKIP_BINARY_DOWNLOAD ignoredSet the env var before running npm install, not after

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

72.75%
按下载量换算892

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills