SkillsGrove
SkillsGrove/Vidéo courte et créateurs/lxgicstudios/lxgic-clipper/lxgic-clipper

lxgic-clipper

Installation

$npx skills add https://github.com/lxgicstudios/lxgic-clipper --skill lxgic-clipper
$git clone --depth 1 https://github.com/lxgicstudios/lxgic-clipper.git /tmp/lxgic-clipper && mkdir -p ~/.claude/skills && cp -r /tmp/lxgic-clipper/. ~/.claude/skills/lxgic-clipper
Installe pour moi cette Agent Skill : https://github.com/lxgicstudios/lxgic-clipper/tree/bd9ec9b372af4a1e475139ca39d151e731828d9a/ — lis d’abord son SKILL.md et ses scripts, et ne l’installe dans mon dossier de compétences qu’après avoir vérifié qu’elle est sûre.

Résumé

Description d’origine · MITAutomated livestream clipping and social media posting agent. Monitors Kick/Twitch/YouTube streams, detects highlight moments via audio analysis and whisper transcription, clips them, and posts to TikTok, YouTube Shorts, X, and Instagram Reels — 24/7 on autopilot.
Le SKILL.md ci-dessous est reproduit depuis lxgicstudios/lxgic-clipper (commit bd9ec9b) sous licence MIT. Le texte est inchangé ; seules les métadonnées d’en-tête du fichier sont omises, les images sont affichées sous forme de liens et les fichiers très longs sont tronqués. Copyright 2026 LXGIC Studios. Licence : LICENSE. Seul le fichier d’instructions est affiché ; consultez le dépôt d’origine pour les éventuels scripts.

LXGIC Clipper — Automated Stream Clipping Agent

What This Does

Monitors livestreams 24/7 and automatically:

  1. Records stream segments (configurable 5-30 minute windows)
  2. Detects viral/highlight moments via audio peaks, scene changes, and whisper transcription
  3. Clips those moments (15-60 second clips)
  4. Formats for each platform (vertical 9:16 + horizontal 16:9, with optional burned-in captions)
  5. Posts to TikTok, YouTube Shorts, X, and Instagram Reels via Postiz API
  6. Tracks clip history to prevent duplicate posts

Requirements

API Keys (customer provides)

  • Postiz API key — for social media posting (get at postiz.com or self-host for free)

Tools (auto-installed)

  • ffmpeg — video processing, clipping, encoding, audio analysis
  • yt-dlp — stream recording and downloading

Optional (recommended)

  • whisper — OpenAI Whisper for transcription-based detection + auto-captions
    • Install: pip3 install openai-whisper
    • Without it, detection uses audio peaks + scene changes only

Environment Variables

Set via setup.sh wizard, config file, or env:

CLIPPER_STREAM_URL=https://kick.com/yourstreamer
CLIPPER_DURATION=10           # recording length in minutes
CLIPPER_THRESHOLD=70          # detection sensitivity (0-100)
CLIPPER_CLIP_LENGTH=30        # clip duration in seconds
CLIPPER_MAX_CLIPS=3           # max clips per run
CLIPPER_MAX_DAILY=15          # max clips per day
CLIPPER_PLATFORMS=tiktok,youtube,x,instagram
CLIPPER_DRY_RUN=false         # true to skip posting
POSTIZ_API_KEY=your_postiz_key

Setup

Quick Start

# 1. Install dependencies
brew install ffmpeg yt-dlp jq

# 2. Run interactive setup
./setup.sh

# 3. Test it
./clipper-agent.sh run

See SETUP-GUIDE.md for detailed walkthrough.

Step 1: Install the skill

openclaw skill install lxgic-clipper

Step 2: Run setup wizard

./setup.sh

This walks you through configuration interactively:

  • Stream URL
  • Postiz API key and platform connections
  • Detection settings
  • Test recording

Step 3: Start the agent

Set up an OpenClaw cron job using the templates in cron-template.json:

openclaw cron create --schedule "*/30 * * * *" --command "clipper-agent.sh run"

How Clip Detection Works

The skill uses local analysis (zero external API cost for detection):

  1. Audio peaks — FFmpeg RMS analysis detects sudden volume spikes (reactions, hype moments, crowd noise)
  2. Scene changes — FFmpeg scene detection flags rapid visual cuts (action, replays)
  3. Speech keywords (requires whisper) — Transcribes audio and flags excitement phrases ("oh my god", "no way", "let's go", "insane", etc.)
  4. Multi-signal scoring — Each moment is scored 0-100. Audio peaks near scene changes get boosted. Only moments above your threshold become clips.
  5. Deduplication — Nearby highlights (within 5 seconds) are merged to avoid redundant clips.
Stream → Record segment → FFmpeg audio analysis + scene detection
→ Whisper transcription (optional) → Score moments → Clip top N
→ Format (vertical + horizontal + captions) → Post via Postiz

Clip Processing Pipeline

  1. Record: yt-dlp captures stream in configurable segments
  2. Detect: Multi-signal scoring (audio + visual + speech)
  3. Clip: ffmpeg extracts highlight with configurable padding
  4. Format:
    • 9:16 vertical crop for TikTok/Reels/Shorts
    • 16:9 padded horizontal for X/Twitter
    • Burned-in captions via whisper transcription (optional)
  5. Post: Postiz API publishes to all connected platforms
  6. Log: History tracked in JSON to prevent duplicate posts

Scripts

Script Purpose
setup.sh Interactive configuration wizard
clipper-agent.sh Main orchestrator (run/check/status/history)
record-stream.sh Records stream segments via yt-dlp
detect-highlights.sh Analyzes video for highlight moments
clip-and-format.sh Clips and formats for social platforms
post-clip.sh Uploads and posts clips via Postiz API

Commands

clipper-agent.sh run          # Full pipeline: record → detect → clip → post
clipper-agent.sh check        # Check if stream is live
clipper-agent.sh status       # Show status, stats, stream availability
clipper-agent.sh history      # Show clip history
clipper-agent.sh clear-history # Reset clip history

Platform Formatting

Platform Aspect Max Length Captions
TikTok 9:16 60s Auto (burned in if whisper installed)
YouTube Shorts 9:16 60s Auto (SRT file)
X/Twitter 16:9 or 9:16 140s Optional
Instagram Reels 9:16 90s Auto (burned in if whisper installed)

File Structure

~/.lxgic-clipper/
  config.json           — Settings (created by setup.sh)
  clip-history.json     — Clip tracking (prevents duplicates)
  clips/                — Saved clip files
  logs/                 — Daily log files
  work/                 — Temporary recording files

Troubleshooting

Stream not recording

  • Check URL is correct and stream is live
  • Update yt-dlp: yt-dlp -U or brew upgrade yt-dlp
  • Some streams require cookies: export YT_DLP_COOKIES=/path/to/cookies.txt

No highlights detected

  • Lower threshold: CLIPPER_THRESHOLD=60
  • Install whisper for better detection: pip3 install openai-whisper
  • Check logs: cat ~/.lxgic-clipper/logs/clipper-$(date +%Y%m%d).log

Clips not posting

  • Verify Postiz API key and platform connections
  • Re-run setup.sh to refresh integration IDs
  • Check API base URL in config

Low quality clips

  • Lower CRF value: CLIPPER_QUALITY=18 (default 20, lower = better)
  • Ensure source stream is HD

Support

Built by LXGIC Studios Want more free tools? We have 100+ on our GitHub: github.com/lxgicstudios

Voir le texte intégral de la licence (MIT)
MIT License

Copyright (c) 2026 LXGIC Studios

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.