必须提供 OPENAI_API_KEY,否则无法调用转写和摘要接口;容器内监听 8080,需映射到宿主端口(示例映射到 80);默认上传上限 256M、内存上限 512M,大视频需用 UPLOAD_MAX_FILESIZE 和 MEMORY_LIMIT 调大;项目自述为 work-in-progress,可能遇到 bug
subvert
aschmelyunMIT更新放缓用 Whisper 和 ChatGPT 几秒内从视频自动生成字幕、摘要和章节,省去手动转写和剪辑整理的时间。
Generate subtitles, summaries, and chapters from videos in seconds
docker run -it -p 80:8080 -e OPENAI_API_KEY=sk-123abc aschmelyun/subvertREADME 未说明硬件要求,只要求本机安装 Docker 并准备 OpenAI API key,转写与摘要均在 OpenAI 云端完成
用 OpenAI 从视频快速生成字幕、章节和摘要的自托管 Web 工具
用 Whisper 和 ChatGPT 几秒内从视频自动生成字幕、摘要和章节,省去手动转写和剪辑整理的时间。
核心能力
- 用 FFMpeg 抽取音频后交给 Whisper 转写成 vtt 字幕
- 可选把转写文本交给 ChatGPT 生成章节和摘要
- 通过环境变量调整上传大小和 PHP 内存上限
- 打包成单个 Docker 镜像,一条命令即可启动
容易踩的坑
- v1.0.91.0.9最新正式版2023-04-16 · 2023-04-16 19:23 UTC
- Fixes #6, adds volume support for uploaded audio and video files
- v1.0.81.0.82023-04-16 · 2023-04-16 07:58 UTC
查看更新说明
- Fixes #17, prevents additional OPENAI_API_KEY lines from being written to the .env file
- v1.0.71.0.72023-04-16 · 2023-04-16 06:59 UTC
查看更新说明
- Fixes #13 by adding max upload filesize to footer and blocking uploads larger than it on the frontend
- v1.0.61.0.62023-04-15 · 2023-04-15 23:30 UTC
查看更新说明
- Adds better error reporting on the frontend instead of a random "Step 99"...
- v1.0.51.0.52023-04-15 · 2023-04-15 23:06 UTC
查看更新说明
- Adds the ability to upload audio files, which skips the need to perform extraction from video.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Subvert
Generate subtitles, chapters, and summaries of videos in seconds with the help of OpenAI.
🚧 This is very much a work-in-progress, please create issues for bugs if they appear 🚧

Getting started
You'll need:
- Docker installed on your local machine
- An OpenAI API key
Subvert is self-contained in a single Docker image and can be started with a one-line command:
docker run -it -p 80:8080 -e OPENAI_API_KEY=sk-123abc aschmelyun/subvert
This will boot up a server running the application and make it available to your machine at http://localhost.
How it works
After selecting a video file to process, you have the option of choosing whether you also want to generate chapters and a summary.
Your video is sent to an API where the audio is extracted from it using FFMpeg, and then sent to OpenAI's Whisper model for transcription into the common vtt format.
If you chose to select chapters or a summary, that transcript is then sent to a ChatGPT model for processing into concise chapters of the length you wanted, and a brief summary that would fit in something like a YouTube description.
Configuration
You can adjust a few parameters in the container by passing in environment variables with your command using additional -e flags. Here are the current ones you can add:
OPENAI_API_KEY(required) - Sets the key responsible for communication with OpenAI's APIs. No default.UPLOAD_MAX_FILESIZE- Changes PHP's UPLOAD_MAX_FILESIZE setting. Default:256MMEMORY_LIMIT- Changes PHP's MEMORY_LIMIT setting. Default:512M
Starting from source
Alternative, if you have PHP 8.1+ and npm installed on your local machine, you can boot the application up directly from the source code instead.
First, check out this repo to your desired location. Then, navigate to the src directory and run:
./startup.sh
Alternatively, you can run the commands inside of the startup.sh script individually for the same result.
Deploying
Because this project is contained in a single Dockerfile, it can be deployed immediately to any server provisioned with Docker. Alternatively, the Subvert Docker image can be ran on cloud instances via AWS, Azure, GCP, Fly.io, etc.
Note: This image currently only exposes the insecure :80 http port.
License
The MIT License (MIT). Please see License File