Decord 编译依赖 FFmpeg 4.x 库,版本不符会构建失败;运行前须编辑 .env 选内容类型和 AI 提供方并填 API key,且把 DEBUG_SKIP_ANALYSIS 与 DEBUG_SKIP_RENDER 设为 false;Gemini 深度分析会上传完整源视频到云端并可能产生费用,用 Docker 还需装 NVIDIA Container Toolkit。
autoshorts
divyaprakash0426Apache-2.0活跃维护从长视频游戏录像里自动剪出适合竖屏短视频的精彩片段,靠 AI 场景分析挑高光、GPU 加速渲染,还能加 AI 配音。
Automatically generate viral-ready vertical short clips from long-form gameplay footage using AI-powered scene analysis, GPU-accelerated rendering, and optional AI voiceovers.
git clone https://github.com/divyaprakash0426/autoshorts.git
cd autoshorts
make install
cp .env.example .env需要 NVIDIA GPU 及驱动、含 nvcc 的 CUDA toolkit、支持 NVENC 的 FFmpeg 和 Python 3.10+;配音建议 6 GB 以上显存与 16 GB 系统内存。CUDA 不可用时渲染自动回退 CPU(libx264)。
把长视频自动切成竖屏短视频,AI 挑高光片段并加字幕配音
从长视频游戏录像里自动剪出适合竖屏短视频的精彩片段,靠 AI 场景分析挑高光、GPU 加速渲染,还能加 AI 配音。
核心能力
- 15 种内容预设,按类型匹配选段策略与字幕风格
- 支持 Gemini 全片深度分析、OpenAI 视觉或本地启发式选段
- Whisper 转写配合 AI 撰写字幕,PyCaps 样式失败回退 FFmpeg
- 可选本地 Qwen3-TTS 多语言配音,字幕时间对齐语音
- CUDA 解码与 NVENC 编码,支持裁剪、模糊背景与自定义比例
容易踩的坑
暂无 release 数据(可能没有发版,或尚未同步)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
AutoShorts
Turn long-form videos into short clips with AI-assisted moment selection, GPU rendering, styled captions, and optional voiceovers.
Showcase
Four clips generated from gameplay footage:
| Clip 1 | Clip 2 | Clip 3 | Clip 4 |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
What it does
- Content-aware clipping: 15 presets with their own moment categories, analysis prompts, caption styles, and voice presets. Gaming/esports use action heuristics plus AI ranking; other types use AI-first selection.
- Flexible analysis: Gemini, including full-video deep analysis; OpenAI vision; or local heuristic selection without API analysis.
- Captions and narration: Whisper transcription, AI-written captions, PyCaps styling with FFmpeg fallback, and cross-clip story narration.
- Optional voiceovers: Local Qwen3-TTS with multilingual voice design, adjustable source/voice volumes, and subtitle timing matched to speech.
- GPU rendering: CUDA decoding and analysis, cropping, blurred backgrounds, configurable aspect ratios, and NVENC encoding.
- Dashboard: Choose content and caption styles, manage the video queue, monitor jobs, and browse generated clips.
Supported content: gaming, esports, podcasts, interviews, news/commentary, entertainment, TV shows, comedy, music, vlogs, cooking/DIY, fitness, education, documentaries, and sports.
Examples: English roast / Japanese narration / Chinese news style.
Get started
You need an NVIDIA GPU and driver, a CUDA toolkit with nvcc, FFmpeg with
NVENC support, and Python 3.10+. For voiceovers, 6 GB+ VRAM and 16 GB system RAM
are recommended.
git clone https://github.com/divyaprakash0426/autoshorts.git
cd autoshorts
make install
cp .env.example .env
The Makefile creates a single .venv with the Python dependencies and
CUDA-enabled Decord. Decord's build requires FFmpeg 4.x libraries; see
environment.yml. PyTorch 2.10 pairs with TorchCodec 0.10.0.
An interactive installer and Docker setup are also
provided; Docker requires the NVIDIA Container Toolkit.
Edit .env before running: choose a content type and AI provider, add the
corresponding API key, and set DEBUG_SKIP_ANALYSIS=false and
DEBUG_SKIP_RENDER=false for normal processing.
Dashboard or CLI
# Dashboard: configure settings, add videos, and start processing
.venv/bin/python -m streamlit run src/dashboard/About.py
# CLI: read videos from gameplay/ and write clips to generated/
.venv/bin/python run.py
# Or choose a specific source file/directory and output directory
.venv/bin/python run.py --input /path/to/videos --output /path/to/clips
Use the dashboard's file picker or place source videos in gameplay/.
Output clips are saved in generated/. --input accepts either a single
supported video file or a directory; --output is created when needed.
Configuration
Settings live in .env and can also be changed through the dashboard.
| Setting | Purpose |
|---|---|
AI_PROVIDER | gemini, openai, or local |
VIDEO_TYPE | Content preset, such as gaming, podcasts, or educational |
ENABLE_SUBTITLES / SUBTITLE_MODE | Toggle captions; choose speech, ai_captions, or none |
CAPTION_STYLE | auto matches the detected moment; explicit styles are content-specific |
ENABLE_TTS / TTS_LANGUAGE | Toggle voiceovers and select their language |
SCENE_LIMIT | Maximum clips per source video |
MIN_SHORT_LENGTH / MAX_SHORT_LENGTH | Clip duration bounds; 0 selects automatic lengths |
TARGET_RATIO_W / TARGET_RATIO_H | Output aspect ratio, typically 9 / 16 |
See .env.example for all settings and voice design for advanced TTS options.
Privacy and cost: Cloud providers receive video content. Gemini deep analysis
uploads the full source video; API usage may incur charges. local uses heuristic
selection instead. Video rendering uses GPU hardware acceleration on NVIDIA machines
with automatic CPU fallback (libx264) when CUDA is unavailable.
Development
# Lightweight suite; real GPU/model checks are skipped
.venv/bin/python -m pytest tests/ -q
# Include actual CUDA decoding, rendering, and local model inference
.venv/bin/python -m pytest tests/ -q --run-gpu --run-models
See Contributing for test prerequisites and bounded footage checks, pipeline flow for architecture, and Roadmap for planned features.
License and credits
Apache 2.0; see NOTICE. Dependencies and model weights retain their own licenses.
Built on work from shorts-maker-gpu and Auto-YouTube-Shorts-Maker.
Support the project -- donations go to charity.



