AGENT SKILL

kdenlive-video-editing

Edit video in Kdenlive; build/validate .kdenlive projects.

License 许可
MIT
最近更新
2026-08-16
Stars
★ 0
Forks
0

01 前言 Front Matter

name
kdenlive-video-editing
author
Hermes curator
license
MIT
version
1.0.0
metadata
{ "hermes": { "tags": [ "video", "kdenlive", "editing", "youtube", "media" ], "related_skills": [ "coding-demo-recorder", "video-clips" ] } }
platforms
[ "linux" ]
description
Edit video in Kdenlive; build/validate .kdenlive projects.

02 资源文件 3

03 SKILL.md 正文

Kdenlive Video Editing (AI-YouTuber style)

Edit video in Kdenlive (snap build on this machine) and produce the Tech With Tim / Jeff Su / codebasics "AI agent YouTuber" look. Ibrahim's learning project lives at ~/Projects/kdenlive-mastery/ (style-guide.md, 6-track template, references/, raw/, exports/, lessons 1–5 → Maarifu YouTube build-logs).

When to use

  • Any Kdenlive editing, rendering, or project-file work
  • Building or validating .kdenlive project XML
  • The AI-YouTuber / coding-tutorial edit style (jump cuts, punch-ins, callouts, ducking)

The style in one line

Jump cuts + punch-ins + callouts + music ducking. Rhythm beats effects; the hard cut IS the aesthetic. ~70% of the look is removing pauses.

Working with .kdenlive project files

CRITICAL — Kdenlive timeline tracks are NOT bare playlists. Each track is a NESTED TRACTOR containing exactly TWO playlists (video + audio), matching Kdenlive's createEmptyDocument() (src/doc/kdenlivedoc.cpp):

  • <tractor id="tractorN"> carrying kdenlive:track_name, kdenlive:timeline_active=1, kdenlive:trackheight, and kdenlive:audio_track=1 for audio tracks
  • Inside: two empty <playlist> children
  • Outer tractor0: track 0 = black producer (kdenlive:playlistid=black_track), then one track-tractor per timeline track, audio ones with hide="video"
  • Transitions on tractor0: qtblend between video tracks, mix (with sum=1, accepts_blanks=1) between audio tracks, all a_track=0, always_active=1, internal_added=237
  • <profile> block first (width/height/frame_rate_num/frame_rate_den, colorspace 709)
  • A known-good 6-track template (V3 Text / V2 B-Roll / V1 Main / A1 Voice / A2 Music / A3 SFX, 1080p30) lives at templates/AI_YouTuber_Template.kdenlive — copy and rename rather than writing from scratch.

Validate with scripts/validate_kdenlive_xml.py <file> (checks every producer/playlist/track reference resolves, verifies 2 playlists per track-tractor, dumps track order).

Snap pitfalls (kdenlive installed as snap)

  • melt inside the snap cannot load ANY XML project — [producer_xml] failed to load producer "(null)" even for a textbook-valid minimal.mlt. Do NOT use melt to validate .kdenlive files; validate structurally (script above) or in the GUI.
  • snap run kdenlive --render hangs: the wrapper's login shell sources ~/.bashrc → conda init crashes → render child dies (process sits near 0% CPU). Smoke-test a project headlessly with QT_QPA_PLATFORM=offscreen snap run kdenlive --no-welcome --config /tmp/kdenlive-test.rc <file> — exit 0 with no XML errors = loads OK (VDPAU warning is noise). Always use a throwaway --config so the user's real settings stay untouched.
  • kdenlive_render cannot render a bare project file: the GUI injects render params into a temp XML first. Direct invocation needs delivery <melt-path> <project> per src/render/renderrequest.cpp but still fails without those params — not a validation path.
  • Access snap internals via snap run --shell kdenlive -c '<cmd>' (clean env, no .bashrc).

Editing recipes (condensed — full guide in references/ai-youtuber-style.md)

  1. Jump cuts: play, razor (X) at each sentence end, delete pauses, close gaps. Target 2–4s shots.
  2. Punch-in: Transform effect, keyframe 100% → 112% → 100% over ~6 frames each side of the emphasized word.
  3. Callouts: Title clips, ALL CAPS bold, Inter or JetBrains Mono, one gold (#E8A745) word max, keyframed opacity/y-offset pop-in.
  4. Screen recording: OBS 1080p60 CBR 20Mbps with cursor highlight; Transform-zoom 110% to reframe when needed.
  5. Audio: voice A1 (−6 dB peak), music A2 (−25 to −30 dB) with Ducking effect keyed to voice, SFX A3 (−18 dB).
  6. Transitions: hard cuts by default; 6–8 frame crossfades on b-roll; one Glitch per video max.
  7. Grade: Color Correction — contrast +8–12, saturation 100–105, brightness −2, applied as a group effect.
  8. Export: MP4 H.264/AAC, 1080p30, quality 9 (~16–20 Mbps), AAC 192k, Faststart on.

Verification

  • Template edits: python3 scripts/validate_kdenlive_xml.py <file> — all references must resolve.
  • App loads: offscreen GUI smoke test (above).
  • Renders: export in the GUI, sanity-check with ffprobe (codec/size).

Support files

  • references/ai-youtuber-style.md — full deconstruction: 10 ingredients, story skeleton, free asset sources, 5-lesson curriculum, brand rules
  • templates/AI_YouTuber_Template.kdenlive — known-good 6-track 1080p30 template
  • scripts/validate_kdenlive_xml.py — structural validator for .kdenlive files

04 同仓库更多 Skills