agentleFS
swyxioswyxio/skills/multimodal-extraction/SKILL.md

multimodal-extraction

Skill171 starsChanged 8 months agoMITView on GitHub

Given a local video or video URL, downloads the media if needed, extracts slide frames and key moments, transcribes the audio, and writes a Markdown timeline that interleaves screenshots with the transcript at the associated timestamps. Use when asked to turn a video into a multimodal notes file, slide-synced transcript, screenshot-enhanced transcript, or talk recap with images.

  • Installs packages

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use local whisper JSON output for timestamped transcript segments

    line 22
  2. Distinctive:

    If the input is a local file, use it directly

    line 54
  3. Very specific:

    If the input starts with http:// or https://, download it first with yt-dlp

    line 55
  4. Distinctive:

    no VLM in the common path

    line 127
  5. Distinctive:

    only enough structure to make the Markdown artifact useful immediately

    line 128
  6. Very specific:

    add backend switching for transcribe-anything

    line 132
  7. Distinctive:

    add deck-aware slide labeling when a source deck exists

    line 133
  8. Distinctive:

    add speaker diarization sections

    line 134
  9. Distinctive:

    add chaptering or summary generation on top of the Markdown timeline

    line 135

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Multimodal Extraction

Overview

This skill composes the existing video workflows into one artifact:

  • download-video for URL inputs
  • thumbnail-extraction for slide frames and key screenshots
  • transcribe-anything for transcript strategy

The implementation is intentionally speed-first:

  1. Download only when the input is a URL
  2. Reuse the fast slide/key-frame heuristics from thumbnail-extraction
  3. Use local whisper JSON output for timestamped transcript segments
  4. Merge everything into one Markdown timeline with relative image links

When To Use

  • "Turn this talk into multimodal notes"
  • "Make me a markdown transcript with screenshots"
  • "Extract slides and transcript together"
  • "Build a recap doc from this video"
  • "Given this YouTube URL, produce a slide-synced transcript"

Requirements

brew install ffmpeg yt-dlp
pip3 install --break-system-packages openai-whisper

The following existing local script is reused:

  • ../thumbnail-extraction/thumbnail_extractor.py

Command

python3 multimodal_extract.py <video_or_url> [output_dir] [--language en] [--whisper-model turbo] [--top-n 4]

What It Does

Step 1: Resolve the Source

  • If the input is a local file, use it directly
  • If the input starts with http:// or https://, download it first with yt-dlp
  • For YouTube URLs, direct yt-dlp is usually enough
  • For trickier hosted pages, this skill follows the same practical intent as download-video: get a usable local file first

Step 2: Extract Visual Anchors

Run:

python3 ../thumbnail-extraction/thumbnail_extractor.py "$VIDEO" "$OUTPUT/visuals" 4 --extract-slides

This produces:

  • top thumbnail candidates in the root of visuals/
  • slide images in visuals/slides/
  • manifests with timestamps

Step 3: Transcribe

Extract normalized mono 16k audio:

ffmpeg -y -i "$VIDEO" -vn -ac 1 -ar 16000 -acodec pcm_s16le \
  -af "highpass=f=80,lowpass=f=8000,loudnorm=I=-16:TP=-1.5:LRA=11" \
  "$OUTPUT/audio/source_preprocessed.wav"

Then transcribe with Whisper:

whisper "$OUTPUT/audio/source_preprocessed.wav" \
  --model turbo \
  --language en \
  --word_timestamps True \
  --condition_on_previous_text False \
  --output_format json \
  --output_dir "$OUTPUT/transcript"

Step 4: Merge into Markdown

The script:

  • reads slide and thumbnail manifests
  • reads Whisper transcript segments
  • sorts all visual anchors by timestamp
  • groups transcript text between successive visual anchors
  • writes multimodal_timeline.md with:
    • section timestamp
    • associated image(s)
    • transcript span for that interval

Output

output_dir/
  source/
  visuals/
  audio/
  transcript/
  multimodal_timeline.md

Design Principle

The goal is total end-to-end extraction speed.

That means:

  • heuristics first
  • local transcript by default
  • no VLM in the common path
  • only enough structure to make the Markdown artifact useful immediately

Future Extensions

  • add backend switching for transcribe-anything
  • add deck-aware slide labeling when a source deck exists
  • add speaker diarization sections
  • add chaptering or summary generation on top of the Markdown timeline

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.