ffmpeg-mixing

ffmpeg-mixing is a skill for Claude Code from vargHQ/sdk. It costs 54 tokens per session (825 once invoked), scanned A, original, Apache-2.0.

Guidance for using ffmpeg to trim, mix, and join video clips while keeping their sound and picture synchronized. ffmpeg is a command-line tool for processing media files.

In plain words
What is it for?
Stitching generated clips into a video, inserting scenes at exact times, and building ffmpeg filter graphs with continuous audio.
Why use it?
It avoids timing drift caused by trimming an input twice with conflicting timestamp systems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/varghq/sdk/ffmpeg-mixing
Any agent
npx skills add vargHQ/sdk --skill ffmpeg-mixing
Clone the repo
git clone --depth 1 https://github.com/vargHQ/sdk

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ffmpeg-mixing

README.md
[![agentmods](https://agentmods.dev/badge/skills/varghq/sdk/ffmpeg-mixing.svg)](https://agentmods.dev/skills/varghq/sdk/ffmpeg-mixing)
Your own site
<a href="https://agentmods.dev/skills/varghq/sdk/ffmpeg-mixing"><img src="https://agentmods.dev/badge/skills/varghq/sdk/ffmpeg-mixing.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 825 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.00825
Opus 5 $0.00027 $0.00413
Sonnet 5 $0.00011 $0.00165
Haiku 4.5 $0.00005 $0.00082

Measured 6d ago against content hash 03f742a522a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

ffmpeg-mixing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/ffmpeg-mixing/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

# 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:

# 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:

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

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 82 lines · 54 tokens per session scan A 03f742a522a5

Subscribe to this mod's changes

ffmpeg-mixing is a skill published in the GitHub repository vargHQ/sdk (336 stars, last pushed 4d ago), licensed Apache-2.0. It adds 54 tokens to every session and 825 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

kling-ai

Write and improve prompts for Kling AI video generation, and pick the right Kling model for the job. Covers image-to-video, text-to-video, multi-shot storyboards, talking avatars from one photo plus audio, motion transfer, video editing of an existing clip, Element Reference for character consistency, Voice Control…

maciejdzierzek/kling-ai-prompt-generator · 89 tokens

stage-compose

Authoring knowledge for Orkas/OVS HTML video compositions -- write an index.html, drive animation from a paused timeline, declare canvas + duration, then run the VideoStudio draft gate to render an mp4. Trigger for explainer / animation / motion-graphics / caption / lower-third / title-card work, or to build a compose…

Orkas-AI/Orkas-VideoStudio · 96 tokens

frontend-design

Aesthetic direction for OrkasVideoStudio HTML and motion-graphics compositions. Use before stage-compose writes composition-manifest.json artdirection and index.html to choose a subject-specific visual point of view, type, palette, layout signature, restrained motion, and anti-template checks.

Orkas-AI/Orkas-VideoStudio · 57 tokens

stage-edit

Intelligent editing of real user-supplied footage—understand it with transcript/OCR/scene/silence/quality/vision evidence, then choose deterministic timeline operations or a constrained semantic AI edit. Trigger for repurpose, montage, cleanup, localization, narration, or local content changes.

Orkas-AI/Orkas-VideoStudio · 62 tokens

stage-plan

The "ingest + plan" half of end-to-end video orchestration — ingest the user's material from evidence, then decompose intent into ONE cross-modal EDL (plan.json: edit/generate/compose/provided segments + narration/music/caption tracks + a delivery promise), validate it with ovs plan validate. Trigger when the…

Orkas-AI/Orkas-VideoStudio · 0 tokens

gate-control

Canonical VideoStudio review authorization and state-transition policy. Use after any Gate B/C/Preview/D decision, post-gate revision, resumed approval, or exhausted visual-QA result across COMPOSE/AUTO/GENERATE/EDIT; maps explicit user authority and durable artifact state to one next action with ovs gate transition.…

Orkas-AI/Orkas-VideoStudio · 81 tokens