How langat2005/live-strean-clipping-tool works
This application monitors live chat and video, detects engagement spikes, and turns promising moments into vertical, captioned clips. Its main workflow runs through the pipeline: it waits for pre-roll footage, captures a spike window, scores the candidate, then transcribes, reframes, generates captions, and burns them into the export. Other branches include platform chat clients, stream resolution, metadata generation, and a live dashboard. The workflow is documented in the README and partly visible in sampled source; some subsystem links therefore rely on README evidence.
Main entry points: pipeline.py Clip Pipeline · main.py Application Entry · base.py Chat Messages · ffmpeg_utils.py FFmpeg Tools
Components 22
Stream Ingestion
- YouTube Chat
chat/youtube_client.py - Twitch Chat
chat/twitch_client.py - Mock Chat
chat/mock_client.py - Chat Messages
chat/base.py - Stream Resolver
stream_resolver.py - Rolling Buffer
buffer/ring_buffer.py
Spike Detection
- Spike Detector
chat/spike_detector.py
Clip Processing
- Clip Pipeline
pipeline.py - Virality Scorer
virality/scorer.py - Speech Transcriber
transcription/transcriber.py - Vertical Formatter
video/formatting.py - Caption Generator
transcription/ass_generator.py - Subtitle Burner
video/burn_in.py
Output and Monitoring
- Clip Metadata
metadata_generator.py - Pipeline Telemetry
pipeline_state.py - Live Dashboard
dashboard/app.py - Application Settings
config.py - FFmpeg Tools
ffmpeg_utils.py - Application Entry
main.py
Other components
- Stream Operator
- Live Video
- Final Clip
Connections 30
- Stream Operator → Application Entry: starts app
main.py - Application Entry → YouTube Chat: selects client
main.py - Application Entry → Twitch Chat: selects client
main.py - Application Entry → Mock Chat: selects client
main.py - YouTube Chat → Chat Messages: dispatches messages
chat/youtube_client.py - Twitch Chat → Chat Messages: dispatches messages
chat/twitch_client.py - Mock Chat → Chat Messages: dispatches messages
chat/mock_client.py - Application Entry → Stream Resolver: resolves stream
main.py - Live Video → Rolling Buffer: supplies footage
README.md - Application Entry → Clip Pipeline: starts pipeline
main.py - Clip Pipeline → Rolling Buffer: starts and extracts
pipeline.py - Clip Pipeline → Spike Detector: handles chat
pipeline.py - Chat Messages → Spike Detector: processes messages
README.md - Spike Detector → Clip Pipeline: triggers clip
README.md - Clip Pipeline → Speech Transcriber: transcribes candidate
pipeline.py - Clip Pipeline → Virality Scorer: scores candidate
pipeline.py - Clip Pipeline → Vertical Formatter: reframes accepted clip
README.md - Clip Pipeline → Caption Generator: generates captions
README.md - Clip Pipeline → Subtitle Burner: burns captions
README.md - Clip Pipeline → Clip Metadata: generates metadata
pipeline.py - Clip Pipeline → Pipeline Telemetry: updates telemetry
pipeline_state.py - Pipeline Telemetry → Live Dashboard: feeds status
pipeline_state.py - Vertical Formatter → Final Clip: produces video
README.md - Subtitle Burner → Final Clip: renders final clip
README.md - Stream Operator → Live Dashboard: monitors pipeline
README.md - Clip Pipeline → Application Settings: uses settings
pipeline.py - Rolling Buffer → FFmpeg Tools: resolves executable
buffer/ring_buffer.py - Speech Transcriber → FFmpeg Tools: extracts audio
transcription/transcriber.py - Vertical Formatter → FFmpeg Tools: encodes video
video/formatting.py - Subtitle Burner → FFmpeg Tools: burns subtitles
video/burn_in.py