FFmpeg Concat Demuxer (Lossless) — effect skill for cuts & pacing
For AI agents: find the right skill in one call —
curl -s "https://varg.ai/how-to/api/search?q=<what the person wants>"returns the matching how-to page and the best skills with install commands, as markdown (Russian works too). Full index: https://varg.ai/how-to/llms.txt. Every page has a markdown twin: add.mdto its path. Before generating anything, show the person the options on the how-to page.
Join files that share codec, resolution, fps and audio format without re-encoding, from a text list.
- Type: Effect · Cuts & pacing
- Slug:
ffmpeg-concat-demuxer - Status: live
- Publisher: varg (varg, verified)
- License: MIT
- Source: https://github.com/vargHQ/skills/blob/main/varg-video-edit-library/references/cuts.md#ffmpeg-concat-demuxer
- Works in: Claude Code, Claude.ai, Codex, Cursor, OpenClaw, Gemini CLI, Any MCP client, varg Studio
- Requires: ffmpeg
- Cost: Free — the take renders locally; generated footage, if any, bills by the model
What it does
Plain hard cuts; output quality identical to the inputs.
When: Joining segments rendered by the same pipeline (same encoder settings), chunked renders, camera files from one device.
Watch out: Mixed sources: different codecs, sizes, fps or audio sample rates give glitches, wrong durations or no audio.
Timing: Hard cuts only; inpoint/outpoint snap to packets
Also called: concat demuxer, -f concat, ffconcat, lossless join, stream copy join
In FFmpeg
cat > list.txt <<'EOF'
ffconcat version 1.0
file 'part1.mp4'
file 'part2.mp4'
inpoint 1.0
outpoint 3.0
EOF
ffmpeg -f concat -safe 0 -i list.txt -c copy out.mp4
inpoint/outpoint work best with intra-frame codecs; with H.264 the first packets before the in-point leak in (a 2 s outpoint test gave 2.09 s). For frame-accurate trims, re-encode with the concat filter. -safe 0 allows absolute/odd paths.
Where this comes from
Use when
- Joining segments rendered by the same pipeline (same encoder settings), chunked renders, camera files from one device.
Not for
- Mixed sources: different codecs, sizes, fps or audio sample rates give glitches, wrong durations or no audio.
Install
- Claude Code:
claude plugin marketplace add vargHQ/skills && claude plugin install varg@varg - Codex:
npx skills add vargHQ/skills --skill varg-video-edit-library -a codex -y - Cursor:
npx skills add vargHQ/skills --skill varg-video-edit-library -a cursor -y
Example output
https://s3.varg.ai/how-to/previews/90be7063a905/take-ffmpeg-concat-demuxer.mp4 — concat between two shots, with the timeline strip of the edit. Footage: Big Buck Bunny (2008), (c) copyright 2008, Blender Foundation | www.bigbuckbunny.org, CC BY 3.0; Cosmos Laundromat (2015), (CC) Blender Foundation | gooseberry.blender.org, CC BY 4.0. (credit: Rendered by varg · Big Buck Bunny (2008) + Cosmos Laundromat (2015))
More cuts & pacing skills
- SmartCut (capcut-ai-editor): MCP that reads CapCut auto-captions to cut silences and duplicate takes right inside your CapCut project.
- Auto-Editor: CLI that cuts dead space by loudness or motion and exports MP4 or editor timelines; now also an agent skill.
- AutoCut: Edit video in a text editor: Whisper transcribes, you delete lines in Markdown, AutoCut cuts the video.
- Cut Video: Claude Code skill that tightens long recordings with forced-aligned cuts, keeping laughs and comedic pauses.
- Videogrep: Search spoken words across videos and auto-build supercuts of every match.
- PySceneDetect: Find cuts, fades and scene changes in a video, then split it or export scene lists for the edit.