Agent skill

Ffmpeg Mixing

by vargHQ in vargHQ/sdk

Mix, trim, and concatenate video clips with ffmpeg without audio/video desync.

MITAuto-check passedMedia & Creative

Install Ffmpeg Mixing

skills CLI
$ npx skills add vargHQ/sdk --skill ffmpeg-mixing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vargHQ/sdk ffmpeg-mixing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vargHQ/sdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ffmpeg-mixing .claude/skills/ffmpeg-mixing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ffmpeg-mixing
GitHub stars
341
Token cost
~676 tokens
SKILL.md length
151 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Mix, trim, and concatenate video clips with ffmpeg without audio/video desync.

  • Works in 5 steps: absolute timestamps: trim from full… → separate audio handling: use atrim on… → setpts reset: always use… → …
  • Stitching generated clips into an original video
  • Calls ffmpeg
  • Inserting scenes at timestamps

What it does

Ffmpeg Mixing is an agent skill from vargHQ/sdk. Mix, trim, and concatenate video clips with ffmpeg without audio/video desync. Use when stitching generated clips into an original video, inserting scenes at timestamps, or any ffmpeg filtercomplex work involving trim/concat with a continuous audio track.

Its SKILL.md is about 680 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires ffmpeg installed locally.

It sits in Media & Creative, covering Video production and AI video generation. It works with FFmpeg, Vercel AI SDK, ElevenLabs and Seedance. The repository describes itself as: AI video generation SDK — JSX for videos. One API for Kling, Flux, ElevenLabs, Veed. Built on Vercel AI SDK. The licence is MIT.

When your agent uses it

  • Stitching generated clips into an original video
  • Inserting scenes at timestamps
  • Any ffmpeg filtercomplex work involving trim/concat with a continuous audio track

Example prompts

  • “/ffmpeg-mixing”

Requirements

  • Compatibility (from SKILL.md): Requires ffmpeg installed locally.
  • Pre-approved tools (allowed-tools): Bash(ffmpeg:*), Bash(ffprobe:*), Read

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. absolute timestamps: trim from full input file, not pre-trimmed
  2. separate audio handling: use atrim on audio stream independently
  3. setpts reset: always use setpts=PTS-STARTPTS after trim to reset timestamps
  4. scale before trim: when mixing different resolutions, scale first then trim
  5. video duration = audio duration: ensure total video segments match audio segment length

What it can do on your machine

Read from SKILL.md and the folder at commit da4face. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(ffmpeg:*)
    • Bash(ffprobe:*)
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ffmpeg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires ffmpeg installed locally.

    From compatibility in the SKILL.md frontmatter.

Context cost

Ffmpeg Mixing loads about 676 tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 151 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~676

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vargHQ/sdk at commit da4face, republished under its MIT licence (© vargHQ). 151 words, ~676 tokens.

Download SKILL.mdSave it as .claude/skills/ffmpeg-mixing/SKILL.md (or your agent's skills folder).
name
ffmpeg-mixing
description
Mix, trim, and concatenate video clips with ffmpeg without audio/video desync. Use when stitching generated clips into an original video, inserting scenes at timestamps, or any ffmpeg filter_complex work involving trim/concat with a continuous audio track.
allowed-tools
Bash(ffmpeg:*), Bash(ffprobe:*), Read
compatibility
Requires ffmpeg installed locally.
license
MIT
metadata.author
vargHQ
metadata.version
1.0.0

ffmpeg video mixing

Lessons for mixing video clips with ffmpeg while keeping audio and video in sync.

problem: audio/video desync when mixing clips

what went wrong

using -ss X -t Y to pre-trim input, then applying relative trim filters caused timing drift:

bash
# BAD: relative timestamps after pre-trim
ffmpeg -ss 64 -t 36 -i original.mp4 ...
  -filter_complex "
    [0:v]split=5[orig1][orig2]...;
    [orig1]trim=0:4,setpts=PTS-STARTPTS[o1];
    [orig2]trim=4:11,setpts=PTS-STARTPTS[o2];
    ..."

this produced wrong duration (38s instead of 36s) with audio desync.

solution: use absolute timestamps from full input

trim directly from full original using absolute timestamps:

bash
# GOOD: absolute timestamps from full file
ffmpeg -i original.mp4 -i scene1.mp4 -i scene2.mp4 ...
  -filter_complex "
    [0:v]trim=64:68,setpts=PTS-STARTPTS[o1];
    [1:v]scale=1280:720,trim=4:6,setpts=PTS-STARTPTS[s1];
    [0:v]trim=70:75,setpts=PTS-STARTPTS[o2];
    ...
    [o1][s1][o2]...concat=n=N:v=1:a=0[outv];
    [0:a]atrim=64:100,asetpts=PTS-STARTPTS[outa]
  "
  -map "[outv]" -map "[outa]"
key points
  1. absolute timestamps: trim from full input file, not pre-trimmed
  2. separate audio handling: use atrim on audio stream independently
  3. setpts reset: always use setpts=PTS-STARTPTS after trim to reset timestamps
  4. scale before trim: when mixing different resolutions, scale first then trim
  5. video duration = audio duration: ensure total video segments match audio segment length
example: inserting clips into original

to insert generated clips at specific timestamps while keeping continuous audio:

bash
ffmpeg -y \
  -i original.mp4 \
  -i generated-scene.mp4 \
  -filter_complex "
    [0:v]trim=START1:END1,setpts=PTS-STARTPTS[o1];
    [1:v]scale=1280:720,trim=0:DURATION,setpts=PTS-STARTPTS[s1];
    [0:v]trim=START2:END2,setpts=PTS-STARTPTS[o2];
    [o1][s1][o2]concat=n=3:v=1:a=0[outv];
    [0:a]atrim=AUDIO_START:AUDIO_END,asetpts=PTS-STARTPTS[outa]
  " \
  -map "[outv]" -map "[outa]" \
  -c:v libx264 -preset fast -crf 18 \
  -c:a aac -b:a 192k \
  output.mp4

timestamps must add up: (END1-START1) + DURATION + (END2-START2) = AUDIO_END - AUDIO_START

© vargHQ, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/ffmpeg-mixing of vargHQ/sdk.

Open the folder on GitHubat commit da4face

Compare with similar skills

Ffmpeg Mixing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ffmpeg Mixing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ffmpeg Mixing this skillvargHQ/sdk341—~676Automated safety check: PassMIT
Super Video MakerBomx/super-video-maker-skill309—~11kAutomated safety check: NotesNone
Hearyourvoicekillernay/HearYourVOICE140—~10kAutomated safety check: NotesMIT
Editorial Collage MotionPluviobyte/rnskill1.6k—~1.2kAutomated safety check: PassCustom licence
Scenario Seedance Music Videoscenario-labs/skills931—~1.8kAutomated safety check: PassMIT
Render Hypermotiongooseworks-ai/goose-skills1.2k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Super Video Maker

    Bomx/super-video-maker-skill

    End-to-end AI video production skill for agentic frameworks.

    309 GitHub stars~11k tokensUpdated 2 mo ago
    Media & CreativeAuto-check: notes
  • Hearyourvoice

    killernay/HearYourVOICE

    The repeatable workflow for short Thai documentary/explainer videos — one topic in, one finished MP4 out.

    140 GitHub stars~10k tokensUpdated 2 mo ago
    Media & CreativeAuto-check: notes
  • Editorial Collage Motion

    Pluviobyte/rnskill

    将参考图或简要描述解码为可编辑的半色调纸张拼贴规范,默认使用 Codex 内置 imagegen 生成品牌一致的静帧和透明图层,再用本地 FFmpeg 或 HyperFrames 制作“从空背景逐件组装”的确定性动态视频。用户提到半色调拼贴、纸张拼贴、剪纸拼贴、编辑式拼贴、杂志拼贴、复古印刷拼贴、拼贴动效、拼贴动画、剪纸动画、纸片组装、逐层组装、从无到有、元素飞入拼装、定格拼贴、定格动画、Arc…

    1.6k GitHub stars~1.2k tokensUpdated 18 days ago
    Media & CreativeAuto-check passed
  • Scenario Seedance Music Video

    scenario-labs/skills

    A skill your agent uses when turning a song, track, or audio master into a finished music video with Scenario and Seedance: planning shots against beats and sections, transcribing lyrics, generating…

    931 GitHub stars~1.8k tokensUpdated today
    Media & CreativeAuto-check passed
  • Render Hypermotion

    gooseworks-ai/goose-skills

    Assemble the FREE steps of the product-hypermotion + kinetic-typography video format — dice ONE Seedance 2.0 hypermotion clip into 5-6 segments and intercut them with PIL kinetic-typography spec/CTA…

    1.2k GitHub stars~1.4k tokensUpdated today
    Media & CreativeAuto-check passed
  • Ugc Fixloop

    gooseworks-ai/goose-skills

    the UGC fix-loop toolkit — surgically re-render a bad window/beat of a single-take UGC master (stitchreplacement.py, pure FFmpeg) and GPT cross-model review a Seedance prompt before render…

    1.2k GitHub stars~865 tokensUpdated today
    Media & CreativeAuto-check passed

More from vargHQ/sdk

  • Generate AI videos using varg SDK React engine. An agent skill from vargHQ/sdk.

    341 GitHub stars~788 tokensUpdated 7 days ago
    Auto-check: notes

Questions about Ffmpeg Mixing

What does Ffmpeg Mixing do?

Mix, trim, and concatenate video clips with ffmpeg without audio/video desync. Ffmpeg Mixing is an agent skill from vargHQ/sdk. Mix, trim, and concatenate video clips with ffmpeg without audio/video desync.

When should I use Ffmpeg Mixing?

Ffmpeg Mixing fits situations like: stitching generated clips into an original video; inserting scenes at timestamps; any ffmpeg filtercomplex work involving trim/concat with a continuous audio track.

How do I install Ffmpeg Mixing in Claude Code?

Run `npx skills add vargHQ/sdk --skill ffmpeg-mixing -a claude-code`. Or copy the skill folder (.claude/skills/ffmpeg-mixing in vargHQ/sdk) into .claude/skills/ffmpeg-mixing in your project. Claude Code loads it when a task matches its description.

How do I install Ffmpeg Mixing in Codex?

Run `npx skills add vargHQ/sdk --skill ffmpeg-mixing -a codex`. Or copy the skill folder (.claude/skills/ffmpeg-mixing in vargHQ/sdk) into .agents/skills/ffmpeg-mixing in your project. Codex loads it when a task matches its description.

Can I use Ffmpeg Mixing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vargHQ/sdk --skill ffmpeg-mixing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ffmpeg-mixing, .gemini/skills/ffmpeg-mixing, .github/skills/ffmpeg-mixing and .opencode/skills/ffmpeg-mixing in your project.

What does Ffmpeg Mixing need to run?

Going by SKILL.md and its folder, Ffmpeg Mixing needs the command-line tools its instructions call (ffmpeg). Its frontmatter pre-approves these tools: Bash(ffmpeg:*), Bash(ffprobe:*), Read. Compatibility (from SKILL.md): Requires ffmpeg installed locally..

Does Ffmpeg Mixing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ffmpeg Mixing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ffmpeg Mixing use?

Ffmpeg Mixing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ffmpeg Mixing use?

About 676 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ffmpeg Mixing?

Skills that share tags, products or a category with Ffmpeg Mixing: Super Video Maker (Bomx/super-video-maker-skill, 309 stars), Hearyourvoice (killernay/HearYourVOICE, 140 stars), Editorial Collage Motion (Pluviobyte/rnskill, 1.6k stars) and Scenario Seedance Music Video (scenario-labs/skills, 931 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ffmpeg Mixing?

vargHQ (a GitHub organization) maintains it in vargHQ/sdk, which has 341 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 1, 2026.

Source: vargHQ/sdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.