A comprehensive toolkit for video processing, clipping, transcribing, downloading, and uploading.
- Python 3.9+
- uv (Fast Python package installer and resolver)
- FFmpeg (Must be installed and strictly in your system PATH)
- Ollama (Optional, for local AI translation)
This project uses uv for dependency management.
- Install dependencies:
uv sync
Automatically monitors a Twitch channel for new VODs and triggers the download pipeline.
# Run manually
uv run monitor.py
# Setup Cron (e.g., check every hour)
0 * * * * cd /path/to/repo && uv run monitor.py >> monitor.log 2>&1- Smart Tracking: Uses
memory.txtto track the last processed VOD timestamp. - Auto-Trigger: Calls
twitch_download.pyimmediately when a new VOD is found. - Configurable:
--channel_url: Defaulthttps://www.twitch.tv/zackrawrr.--memory_file: File to store state.
Download VODs from Twitch using yt-dlp (optimized for archiving).
uv run twitch_download.py "TWITCH_VOD_URL"- Optimized Video: Downloads
480p(or best ≤ 480p) tooriginal.mp4(small size for processing). - Direct Audio: Downloads
Audio Onlystream directly toaudio.mp4(no re-encoding if possible). - High Speed: Uses 10 concurrent threads for downloading.
- Auto-Pipeline:
- Downloads Video & Audio.
- Transcribes Audio (generating
transcript.srt). - Splits SRT by hour.
- Triggers N8N workflow (
analyze).
--root_dir: Base directory.--audio/--no-audio: Toggle audio download.
Download videos from YouTube.
uv run yt_download.py "YOUTUBE_URL"- Auto-Folder: Creates a folder named after the video title (
safe_title/). - Metadata: Generates
metadata.md. - Audio Extraction: Automatically extracts audio to
audio.mp4. - Auto-Transcribe: Automatically transcribes Shorts (< 180s).
Generate SRT subtitles using AssemblyAI (default) or faster-whisper, with translation support using Google Translate (default) or Ollama.
uv run transcript.py /path/to/video.mp4 --zh_output "zh.srt"- Engines:
assemblyai(Default): RequiresASSEMBLYAI_API_KEY.faster_whisper: Local, GPU/CPU supported.
- Translation:
google(Default): Usesdeep-translator(Google Translate).ollama: Uses local LLM (e.g., Llama 3).
- Splitting: Can split long SRTs into hourly chunks (
--split-by-hour).
--engine:assemblyai(default) orfaster_whisper.--translation_engine:google(default) orollama.--zh_output: Path for translated Chinese SRT.--split-by-hour: Enable splittingtranscript.srtintotranscript-chunked/.
Simple CLI tool to translate text/files using Google Translate.
# Translate text string
uv run translate.py "Hello World" -t zh-TW
# Translate file content
uv run translate.py path/to/file.txtProcess a long video into multiple clips based on a list.
uv run crop.py /path/to/RootFolder- Formats: Generates Vertical Stacked (9:16), Cam, Screen, Raw, and Audio.
- Watermark: Adds
@StreamFlashwatermark. - Auto-Transcribe/Translate: Generates
transcript.srtandzh.srtfor clips. - Input: Reads
crop_info.csv(Shorts No, Start, End, Summary, Title, Hook).
Visual tool to determine FFmpeg crop parameters.
uv run main.py