Skip to content
Projects

About

Mediakit 官方 CLI —— 兼容 FFmpeg 的命令面,同一条命令既能在本地跑 FFmpeg 完成裁剪 / 拼接 / 加字幕 / 混音 / 提取音频等剪辑操作,也能一键切到云端调用画质增强、字幕擦除、ASR、OCR、剧情线分析等 FFmpeg 做不到的 AI 能力。目前已覆盖视频、图像、音频等多模态原子能力和 5 个 AI Agent Skills,未来预计提供 100+ 音视频原子能力。

Design & Media

How these counts are measured

Measured star growth

in 24h
0
in 7 days
+3
in 15 days
+6
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

AI MediaKit CLI

License: MIT Go Version npm version

中文版 | English

The official Mediakit CLI — an FFmpeg-compatible command surface. The same command can run FFmpeg locally for editing operations such as trimming, concatenation, subtitling, mixing, and audio extraction, or switch to the cloud with a single flag to invoke AI capabilities that FFmpeg cannot deliver — quality enhancement, subtitle erasure, ASR, OCR, storyline analysis, and more. It already covers atomic capabilities across video, image, and audio modalities plus 5 AI Agent Skills, with 100+ audio/video atomic capabilities planned.

Installation · AI Agent Skills · Authentication · Command Structure · Advanced Usage · License

Why choose mediakit-cli?

  • Comprehensive capability matrix: spans video, image, and audio modalities, from low-level processing such as trimming / concatenation / subtitling to high-level understanding such as quality enhancement, subtitle erasure, ASR, OCR, and storyline analysis — a single command covers the full pipeline from preprocessing to final output.
  • FFmpeg-compatible, seamless migration: local mode is built on ffmpeg / ffprobe, covering common capabilities such as trimming, concatenation, image overlay, subtitle overlay, speed adjustment, volume adjustment, flipping, fade in/out, mixing, audio/video composition, audio extraction, green-screen keying, and metadata probing — aligned with FFmpeg command intuition. Complex / AI capabilities such as filters, image-to-video, and concatenation transitions are handled in the cloud.
  • Cloud is faster and more powerful: append --cloud to the same command to unlock capabilities FFmpeg cannot deliver — quality enhancement / generative quality restoration, subtitle erasure (standard / fine-grained), ASR, video OCR, highlight clipping (short drama / mini-game), storyline analysis, scene segmentation, green-screen / portrait keying, and other AI atomic capabilities. Cloud elastic compute provides second-level concurrency.
  • One command, two modes: --local / --cloud can be switched per command; local mode is zero-cost and cloud provides elastic compute, complementing each other. They share the same parameters and --schema, so Agents / scripts can switch with zero modification.
  • Cost-effective processing: leverages cloud elastic resource scheduling and off-peak batch processing strategies to provide highly competitive pricing for large batches of media tasks, significantly reducing overall token consumption and operational cost for AI applications.

Features

Domain Capabilities Runtime
🎬 Editing (23) Video image overlay · Video subtitle overlay · Audio speed · Video speed · Video volume adjustment · Camera motion · Video filter · Audio concatenation · Video concatenation · Video crop · Animated image extraction · Audio extraction · Audio fade · Video audio fade · Video flip · Image to video · Audio mixing · Audio/video muxing · Video rotation · Video stitching · Text-to-scrolling video · Audio trim · Video trim Cloud or Local
🎚️ Audio (4) Voice activity detection · Audio metadata · Voice/background separation · Audio transcoding Cloud
🖼️ Image AI (21) Image watermark · Color adjustment · Compression · Crop · Quality enhancement · Erase and inpaint · Quality assessment · Face blur · Flip · Gaussian blur · OCR · Invert · Mosaic · Metadata · Background removal · Resize · Rotate · Rounded corners · Sharpen · Slim image · Smart crop Cloud
🎥 Video AI (30) Invisible watermark · Highlight analysis · Storyline analysis · ASR subtitles · Quality assessment · Drama recap · Vertical drama recap · Drama script · Quality enhancement · Fast enhancement · Generative enhancement · Subtitle erasure · Fine-grained subtitle erasure · Frame extraction · Invisible watermark extraction · Face blur · Face swap · Microdrama highlights · Mini-game highlights · Movie highlights · Martencode · Green-screen matting · Portrait matting · Metadata · Remux · Scene segmentation · Semantic segmentation · Transcoding · Video OCR · Video understanding router Cloud
🔧 Common (2) Async task query · Remote file fetch Local / Cloud
🚧 Coming soon Video translation · Narration generation · Manga-to-animation (rolling out) Cloud

Installation & Quick Start

Requirements

Before you begin, make sure you have:

  • Node.js >=18 (npm / npx)

  • Local mode: ffmpeg 5.1.x and ffprobe

Quick Start (Human Users)

Installation

Choose one of the following methods:

Option 1 — one-click install:

npx @volcengine/mediakit-cli install -y

Option 2 — build from source:

Requires Go v1.22+.

git clone https://github.com/volcengine/mediakit-cli.git
cd mediakit-cli
make build          # Artifact: .mediakit/build/dev/mediakit-cli

# Install AI Agent Skills from local skills directory (required)
npx -y skills add ./skills -g -y

Configuration & Usage

# 1. Initialize configuration (interactive wizard)
mediakit-cli init

# 2. Environment self-check (cloud connectivity, local dependencies, install suggestions)
mediakit-cli doctor

# 3. Local editing (synchronous, no API Key needed): run FFmpeg locally to trim
mediakit-cli --local editing trim-video --video-url ./in.mp4 --start-time 3 --end-time 8

# 4. Cloud AI (async): enhance a video to 1080p, then poll for the final result
mediakit-cli --cloud video enhance-video --video-url <url> --resolution 1080p
mediakit-cli shared query-task --task-id <task_id> --poll-complete

Quick Start (AI Agent)

The following steps are designed for AI Agents and support fully unattended workflows.

Step 1 — Install

npx @volcengine/mediakit-cli install -y

Step 2 — Non-interactive initialization (--yes mode)

# Get an API Key at: https://console.volcengine.com/imp/ai-mediakit/settings
mediakit-cli init \
  --mode cloud-first \
  --api-key <your-api-key> \
  --yes

Step 3 — Verify

mediakit-cli doctor
mediakit-cli version

Agent Skills

Skill Description
byted-mediakit-shared Common capabilities: task query — required by all other skills
byted-mediakit-editing Editing: video image overlay, video subtitle overlay, audio speed, video speed, video volume adjust, camera motion, video filter, audio concat, video concat, video crop, animated image extract, extract audio, audio fade in/out, video audio fade in/out, video flip, image to video, audio mix, mux audio/video, video rotate, video stitch, text to scrolling video, audio trim, video trim
byted-mediakit-audio Audio: voice activity detection, audio metadata, voice / background separation, audio transcode
byted-mediakit-image Image AI: image watermark, image color adjust, image compress, image crop, image quality enhancement, image erase & inpaint, image quality assessment, face blur, image flip, gaussian blur, image OCR, image invert, image mosaic, image metadata, background removal, image resize, image rotate, round corner, image sharpen, slim image, smart crop
byted-mediakit-video Video AI: invisible watermark add/extract, highlight extraction, storyline analysis, ASR subtitles, video quality assessment, drama recap, drama recap (vertical), drama script, quality enhancement, fast enhancement, generative enhancement, subtitle erasure, fine-grained subtitle erasure, frame extract, face blur, face swap, highlight clipping (microdrama / minigame / movie), martencode, green-screen keying, portrait keying, video metadata, remux, scene segmentation, semantic segment, transcode, video OCR, video understand router

Authentication

mediakit-cli uses minimal authentication: just an API Key — no OAuth / STS / IAM role configuration required.

# Option A: choose a storage method during init (config / shell / export)
mediakit-cli init --api-key <your-api-key> --credential-store config --yes

# Option B: inject temporarily via environment variables
export MEDIAKIT_API_KEY=<your-api-key>
export MEDIAKIT_OUTPUT_PATH=<optional-custom-endpoint>
Environment variable Description
MEDIAKIT_API_KEY Cloud API Key (get it from the console)
MEDIAKIT_OUTPUT_PATH Local mode output directory, defaults to ~/.mediakit/temp

Command Structure

mediakit-cli [--cloud|--local] <domain> <tool> [flags]
  • Two modes, one command surface: --cloud uses cloud elastic compute (asynchronously returns a task_id); --local uses local FFmpeg (synchronous, zero cost). Default is cloud-first, and it can be overridden per command with --cloud / --local.
  • Output: cloud results are returned as URLs; local results land in ~/.mediakit/temp (override with --output-path or MEDIAKIT_OUTPUT_PATH).

System commands:

Command Description
mediakit-cli init [--yes] Initialize configuration, interactive or non-interactive (Agent-friendly)
mediakit-cli doctor Check cloud connectivity, local dependencies, and install suggestions
mediakit-cli config View / modify configuration
mediakit-cli version [--check] Show version; --check compares against the latest npm release
mediakit-cli update [--check] Update the CLI and Skills via npm install -g; --check only checks without installing
mediakit-cli --domains List all domains
mediakit-cli --help-full List the full capability index
mediakit-cli <domain> <tool> --schema Output the JSON Schema for the capability (Mode / Async / polling command metadata)
mediakit-cli shared query-task --task-id X Query an async task; add --poll-complete to poll until terminal state

Advanced Usage

Schema Introspection

Every capability command supports --schema, which outputs the input / output schema plus Mode and Async information for Agents to discover tool capabilities dynamically:

mediakit-cli video enhance-video --schema
mediakit-cli --local editing trim-video --schema

Local Mode Output Naming

Local mode output files are named by the following priority:

  1. Explicit --output-path with a complete file path (including extension) → used directly
  2. Input filename available → {original_filename}_{tool_name}.{ext}; if a file with the same name already exists, a 6-digit random number is appended
  3. No input filename → {tool_name}-{timestamp}.{ext}

License

This project is open-sourced under the MIT License.

At runtime this software calls MediaKit cloud APIs. Using those APIs is subject to the following agreements:

Explore related projects

Loading…