Skip to content

Instantly share code, notes, and snippets.

@Turupawn
Last active April 24, 2025 23:24
Show Gist options
  • Save Turupawn/ebbcb9419d8a287635c5f5d2f780e067 to your computer and use it in GitHub Desktop.
Save Turupawn/ebbcb9419d8a287635c5f5d2f780e067 to your computer and use it in GitHub Desktop.
AI subtitles
## Install
sudo dnf install ffmpeg
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg
sudo dnf install python3 python3-pip
pip install openai-whisper
pip install torch
sudo dnf install ffmpeg ffmpeg-devel
sudo dnf install aegisub # optional, for subtitle editing
## Usage
whisper input.mp4 --model small --language Spanish --output_format vtt --max_words_per_line 1 --word_timestamps True
ffmpeg -i input.vtt input.ass
ffmpeg -i input.mp4 -vf "ass=01_users_types.ass" output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment