跳到正文
GitHub·· 8 天前AI 评分38

Goblin:面向 Claude 的媒体分析流水线,提取关键帧与带时间戳转录

hoyt-harness/goblin

AI 导读

Goblin 是一个面向 Claude 的媒体分析流水线,输入本地视频、音频文件或 YouTube URL,即可提取场景切换关键帧和带时间戳转录,并生成结构化的 MANIFEST 目录供 Claude 与剪辑工具直接消费。

正文

Goblin is a media analysis pipeline for Claude. Give it a local video or audio file, or a YouTube URL, and it extracts scene-change keyframes and a timestamped transcript, then writes a structured MANIFEST directory that Claude and editing tools can consume directly.

Prerequisites

  • ffprobe / ffmpeg — frame extraction and audio processing
  • whisper.cpp — speech-to-text (whisper-cli on PATH, or set GOBLIN_WHISPER_CMD)
  • yt-dlp (optional) — YouTube and URL input (yt-dlp on PATH, or set -ytdlp-path)
  • mkvextract (optional) — embedded subtitle extraction from MKV files

Install

make build
# or
go build -o bin/goblin ./cmd/goblin

Pre-built binaries for Windows, Linux, and macOS are attached to each GitHub release.

Cross-compile all platforms:

make build-all

Usage

# Full pipeline (frames + transcript)
goblin -model /path/to/ggml-large-v3-turbo.bin video.mp4

# YouTube URL (downloads via yt-dlp, then runs full pipeline)
goblin -model /path/to/ggml-large-v3-turbo.bin https://www.youtube.com/watch?v=...

# Probe only (metadata, no extraction)
goblin -probe-only video.mp4

# Skip transcription
goblin -no-transcript video.mp4

# Use custom whisper binary
GOBLIN_WHISPER_CMD=/usr/local/bin/main goblin -model /path/to/model.bin video.mp4

Output

video_goblin/
├── MANIFEST.json    — top-level index with scene list and cross-links
├── probe.json       — technical metadata (codec, resolution, duration)
├── transcript.json  — timestamped transcript segments
└── frames/
    ├── frame_00001.png
    └── ...

See USING.md for the full flag reference and worked examples, including a strategy guide for AI agents. The guide is also embedded in the binary:

goblin -guide

来源:GitHub · github.com