Communitygithub.com

NirjharBhattacharjee/live-clips

Cut a long live-stream recording or VOD (screen plus webcam, Bangla and English or any mixed-language talk, possibly with background music) into horizontal long-form videos with the mockingbird MCP. Use when the user asks to cut clips, highlights or videos from a live stream, a stream recording, a VOD or a long screen recording with a webcam, or says "clip my stream". Long-form only for now; shorts are not yet covered.

What is live-clips?

live-clips is a Codex agent skill that cut a long live-stream recording or VOD (screen plus webcam, Bangla and English or any mixed-language talk, possibly with background music) into horizontal long-form videos with the mockingbird MCP. Use when the user asks to cut clips, highlights or videos from a live stream, a stream recording, a VOD or a long screen recording with a webcam, or says "clip my stream". Long-form only for now; shorts are not yet covered.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/NirjharBhattacharjee/live-clips/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does live-clips do?

Turn one long stream recording into finished videos that sound like the streamer telling a story, not like a clip farm. Every rule here came from a real editing session where the streamer rejected the opposite. When a rule seems too strict, read "What users hate" at the end before bending it.

Scope: long-form only. Of the first batch of videos the streamer approved exactly one. That video is the template ("The reference edit" below); the others are counter-examples. Shorts are not yet covered.

Needs: the mockingbird MCP, ffmpeg, and for Bangla or music the two one-time setups below. Paths below use <source> for the recording, <work> for a working folder and <out> for the delivery folder.

1. Brief: understand before cutting

Do this before choosing a single moment.

  1. Transcribe the whole recording in the language it's spoken in (step 2). Never edit from a translation: it hides the meaning, the emotion and the real sentence ends.
  2. Read the whole transcript. For each stretch write down three things: the message (what are they telling the viewer), the emotion (joking, angry, embarrassed, proud, tired) and where the thought starts and finishes.
  3. List the topics the streamer covered. Each long video is one topic. If two topics sit next to each other, make two videos; don't end one on the first half of the next.
  4. Ask the streamer which topics they want if they haven't said. If they named them, keep any moment they asked for by name.

If you can't say in one sentence what a video tells the viewer, you aren't ready to cut it.

2. Bangla transcription

Stock Whisper (large-v3 included) garbles Bangla, and language: auto silently translates it to English. Use a Bangla fine-tune.

One-time setup (about 1.5 GB, ask before downloading):

python3.12 -m venv ~/.local/share/demucs-venv   # shared with the music step
~/.local/share/demucs-venv/bin/pip install transformers huggingface_hub torch
mkdir -p ~/.local/share/bangla-whisper && cd ~/.local/share/bangla-whisper
~/.local/share/demucs-venv/bin/python -c "from huggingface_hub import snapshot_download; snapshot_download('bengaliAI/tugstugi_bengaliai-asr_whisper-medium', local_dir='hf-model')"
git clone --depth 1 https://github.com/openai/whisper.git openai-whisper
git clone --depth 1 https://github.com/ggml-org/whisper.cpp.git whisper-cpp
mkdir -p out && ~/.local/share/demucs-venv/bin/python whisper-cpp/models/convert-h5-to-ggml.py hf-model openai-whisper out
mv out/ggml-model.bin ~/.mockingbird/models/ggml-bn-tugstugi-medium.bin

Then call mockingbird transcribe with language: "bn" and model: "ggml-bn-tugstugi-medium.bin".

  • Chunk long files. A full hour times out. Transcribe in chunks of about 10 minutes and add each chunk's offset.
  • English words come out in Bangla script ("লেটস পুল আপ দ্য ডেটা"). That's readable; leave it.
  • Word times from long windows drift by up to 10 s. Use them to find a passage, never to place a cut (step 5).
  • For another language, the same shape applies: find a fine-tune for it, convert to ggml, set language.

3. Music

Streams often have music playing. It ends up louder than the voice and it fills the pauses, which breaks pause detection.

  1. Run mockingbird audio_stats on the source, and on any stretch where a scene or overlay changes.
  2. Where there's music, separate it with Demucs (htdemucs, --two-stems=vocals) in a venv:
    ~/.local/share/demucs-venv/bin/pip install demucs soundfile
    scripts/demucs_mix.sh <render>.mp4 <out>.mp4
    
    The script mixes the music back about 24 dB under the voice (volume 0.063) and loudnorms to -14 LUFS, true peak -1.5. Removing the music completely sounds dead; keep it low.
  3. For pause detection inside a music stretch, run scripts/silences.sh on the Demucs vocals.wav of that stretch, with the stretch's start time as the offset.

A plain filter chain (EQ, gate, denoise) only gets about 5 dB of separation. Don't bother.

4. Story arc

Every video is planned as four steps before any cutting:

PROBLEM → BUILDUP → CONCLUSION → RESOLUTION

  • Problem: the tension or question, in the streamer's words.
  • Buildup: the story, the demo, the evidence.
  • Conclusion: the point it was all heading to.
  • Resolution: what they do about it, or what's next. The video ends on a finished thought.

Write the plan to <work>/arcs.md: for each step, the source range and the line that opens it, quoted in the original language. Show it to the streamer if they're around. Then cut.

Rules for the plan:

  • One topic per video, built from one or two continuous stretches where possible. Many small pieces feel like a collage.
  • Steps may come from different parts of the stream, but each step must make sense after the one before it. Read the joins aloud in your head: a clip that opens with "that's why…" needs its "that".
  • The arc is the plan, not always the playing order. When the problem is backstory ("why I'm doing this") and the video is about a thing they built or do, open on the thing itself in one line and play the backstory after the conclusion, just before the resolution. There it explains the promise the video ends on; at the start it holds everything up. Write the playing order in arcs.md.
  • A video that needs the previous video to make sense has the wrong opening line.

5. Cut rules

scripts/silences.sh <source> > <work>/silences.txt
scripts/snap.py <work>/silences.txt <work>/plans.json <source> > <work>/projects.json

plans.json holds rough ranges per video from your arc plan. snap.py applies the rules and writes one mockingbird project per video; save each as project.json and render it.

  • Cut only at sentence pauses of 0.9 s or more. Keep 0.25 s of the pause on each side of the cut.
  • Never cut mid-sentence or mid-thought. Every clip starts on a sentence start and ends after a finished sentence. No dangling "but that…", no stray "so" at the end.
  • Trim only dead air of 2 s or more inside a clip (down to 0.6 s). Shorter pauses are how the person talks; leave them.
  • Some silences are the content (a silent panic, a beat before a punchline). Mark those ranges "keep".
  • An edge with no real pause near it is a wrong edge. snap.py reports it; pick a different sentence.
  • Slice-test every edge. Transcribe 4–6 s on each side of every cut and every join, and read it. This is the only check that catches a clipped first word.
  • Whisper puts words up to 0.9 s early after a pause. The first word after a silence is the one that gets clipped. When a slice and the loudness disagree, trust the loudness (the first rise after the pause is the word).

6. Style

Plain clips. Normal speed. That's the whole style.

  • No zooms or punch-ins, no cards, no captions, no text, no motion graphics, no memes, no speed-up, no added music.
  • In mockingbird: "captions": null, "look": {"skipped": true}, empty texts and inserts.
  • Add any of these only when the streamer asks for that thing by name.

7. Length

A target such as 3:00 is a guide, not a cap. Content first. To get shorter, drop retakes, rambles and waiting; never drop substance or cut off a thought. If it's still long and still good, let it run and say so in the report.

8. Shorts

Not yet covered. If asked for shorts, say so and agree the layout with the streamer first; the one fixed rule so far is that the whole screen stays visible.

9. Packaging

For each video:

  • Thumbnail:
    • Size: 1280×720 by default, 3840×2160 when asked for 4K. Always deliver a JPG under 2 MB for upload (YouTube's limit) next to the full-size PNG.
    • Background: the subject of the video and nothing else. If the streamer has a graphic for the thing they built (a title screen, a logo card), put it behind them as it is. Don't add tiles, mock-ups or panels.
    • Text: none unless asked. "Keep it clean" means no text.
    • The person: a modest pose: seated, calm, looking at the camera, mouth closed, eyes visible. Never an open-mouth, mid-word or flailing frame. Use the streamer's own photos or frames only. A short phone clip they hand over is a good source: sample one frame a second, pick a calm one, then take the sharpest frame near it (Laplacian variance on the face crop). Their mic in shot is fine.
    • Cutout: no white sticker border. Smooth the alpha (erode about 1 px and blur about 1.5 px per 1280 px of width) and fade any straight edge where the frame cut them off. A very faint glow in the background's accent colour (about 25% opacity) separates them from the background.
    • Colours: take the palette from the background graphic, not a generic style.
  • Title: what happens, in their voice and in the Bangla-English mix they actually speak. A form they chose: a question hook plus the plain subject, " কী?? My ", with the question word in Bangla. Bangla words in Bangla script, English words in English ("কিভাবে আমি কোটি টাকার Project Ideas Discover করি"), never English transliterated into Bangla script. "Title" means the YouTube title, never thumbnail text.
  • Description: short. One or two lines on what the video shows, then a first-person bio paragraph (who they are, where they live, what they're building), a link to their GitHub profile, and three or four hashtags. Fix spelling, soften claims about unfinished work ("set to disrupt", not "will disrupt"), and say what you changed. Chapters only on long walkthroughs, from the arc, with times measured on the finished file. Get the GitHub URL with gh api user -q .html_url; never guess it.
  • Write them to <out>/titles-descriptions.md, and copy arcs.md next to the videos.
  • Upload folder: when they're ready to post a video, make a folder next to the batch called Upload - <short title> with a copy of the video, thumbnail.jpg and title and description.txt (title, then description, ready to paste). Copy, don't move, so the batch stays whole.

10. Review

Before reporting anything as done:

  1. Technical pass on every file: loudness (about -14 LUFS), size, black frames, frozen frames. A freeze that is real footage (a still page, a privacy scene) is fine; say so.
  2. Run the mockingbird:reviewer agent per batch of videos. Give it the file, the source, arcs.md and these rules. It checks every edge and join with slice transcripts and loudness, and the arc.
  3. Fix everything it flags in one pass, re-render each video once.
  4. Report honestly. If nobody listened to the result, say the checks were transcripts and audio levels, and ask the streamer to play the start and end of each video.

The reference edit

The one approved video is a walkthrough of a tool the streamer built, about five and a half minutes from a one-hour stream. Its shape, generalised:

PartLengthWhat it is
Opening~20 s, one clip"This is my X, I built it a few days ago": the thing itself, said in one go
Doing~40 s, seven clips of 3–9 sSilent jump cuts of the shell work that sets it up: changing folder, cloning, creating the file, opening the editor, typing two key lines, launching the tool. All marked "keep"
Running it~15 s, one clipThey run the thing and say what will happen
Explaining~2:40, five clips of 18–55 sOne continuous explanation, part by part. Only the waiting between sentences is removed (gaps of 3–12 s)
Backstory~1 min, two clipsWhy they're doing this, and how they feel about it
What's next~25 s, one clipThe promise for the next video

How the clips were selected:

  • Kept: the streamer's own explanation in full, in the order they gave it; the on-screen actions that show the work really being done; the feeling (tired, bored, still building).
  • Dropped: permission prompts and waiting; a live mishap that sat inside the waiting; retakes; everything between the setup and the run that wasn't the story.
  • Cuts fall only in real pauses in speech. Talking clips are long: half of the runtime is clips over 20 s. Short clips are only ever silent action.
  • "Using the terminal" means shell commands (changing folder, cloning, creating files), not just typing in an editor. Find those moments with mockingbird screen_changes or frames and show each as it completes.
  • Pacing comes from the material, quick silent actions against long unbroken talk, never from speed-ups or zooms.
  • Audio: the Demucs voice-forward mix (step 3), stream music about 24 dB under the voice.
  • One piece of text, because they asked: they misspoke a number, and asked for a small on-screen correction ("8 instances*") over that sentence. A factual correction they request is the only graphic in the video.

Use this shape for build, demo and workflow videos. For other kinds of video there is no approved example yet: follow the rules above, and don't copy the rejected videos' choices (short clips stitched from many places, an opening on context, a tight length).

What the streamer liked

Add to this list every time something is approved.

  • Showing the work as jump cuts. A run of short silent clips of shell commands, opening the file, starting the tool, then the result. Silent stretches where they are doing something on screen are good material.
  • Cutting the waiting. Permission prompts, installs, loading: remove the whole stretch, even if it also removes a live mishap.
  • Finishing the sentence before a requested cut point. When they name a time, start at the next sentence boundary after it, not on the exact second.
  • Backstory at the end. Open on the thing, explain why afterwards.
  • An on-screen correction when they misspoke a fact and asked for it.
  • A clean thumbnail: their own project graphic behind them and nothing else, a calm seated frame, no text, smooth edges, a very faint accent-coloured glow.
  • A Bangla-English question title (" কী?? …") and a short description that ends with their bio and GitHub link.
  • One folder per upload with the video, the thumbnail and paste-ready text.

What users hate

Each of these was tried and rejected. Don't try them again without being asked.

TriedWhat they saidDo instead
Meme cards, text overlays, motion graphics"ew dont put any cards… just clips"Plain clips
Punch-ins and alternating zoom on cuts"what is this zoom zoom effect"No zoom, hard cuts at pauses
Speech sped up (1.15×)"dont do 1.5"Normal speed
Tight pause cutting (0.3 s gaps)"let me finish a sentence properly then cut"Cut at ≥0.9 s pauses only, trim only ≥2 s dead air
Editing from an English translation of Bangla"are you having trouble understanding bangla?"Bangla fine-tune, read the original
Best-of bits in shuffled order"no story line just random clips", "random collage of words"One topic, story arc, continuous stretches
Picking moments by keywords or energy"understand the video, what information I am trying to convey, understand the emotions"Brief first: message and emotion per stretch
Cropping the screen or the face"i want to see the entire computer screen"Never crop the recording
Music louder than the voice"background music too loud… make my voice higher"Demucs, music 24 dB under, -14 LUFS
Ending on the start of the next topic"again abruptly cut in end"End on the resolution; split topics into separate videos
Dropping substance to hit 3:00"3 mins is not a hard and fast rule, the content needs to be good"Length is a guide
Opening on backstory"it is giving the backstory, why dont we take it to the end"Open on the thing itself, backstory before the resolution
Showing editor typing as "using the terminal""i did not mean using vim"Show the shell commands: folder, clone, files, then the editor
Leaving in permission prompts and waiting"get rid of that part"Cut waiting; jump-cut the doing
Thumbnail frame with mouth open or arm up"a modest sitting position where my mouth is not open"Calm seated frame, mouth closed, eyes visible
Thumbnail with invented agent tiles and a headline"i need dev team behind nothing else"Their own project graphic behind them, nothing added
White sticker outline round the cutout"can you not put white border please"No border
Hard cutout edges"smooth the edges"Erode and blur the alpha, fade straight crop edges
A strong glow"a suble green halo on very subtle"About 25% opacity, in the background's accent colour
Putting the title on the thumbnail"No, keep it clean"The title goes in YouTube, not on the image

Keeping this skill current

When the streamer rejects or approves something new, add a row to the table or a line to "What the streamer liked", change the rule it touches, and commit. Quote their words. No names, paths or per-video timestamps in this file.

Related Skills