Git Product home page Git Product logo

auto-subs's Introduction

Davinci Resolve AI Subtitles

Automatically transcribes your editing timeline using OpenAI Whisper and Stable-TS for extreme accuracy.

  • Generate subtitles in your own custom style.
  • Completely free and runs locally within Davinci Resolve.
  • Works on Mac, Linux, and Windows.
  • Supported on both Free and Studio versions of Resolve.
  • Jump to positions on the timeline using the Subtitle Navigator.
  • NEW!! - Translate from any language to English.

Tip

Setup and Usage Guides: AutoSubs Video Tutorial or Spanish Tutorial

Support AutoSubs development:

"Buy Me A Coffee"

Table of Contents


Transcription Settings + Subtitle Navigator Subtitle Example
Subtitle Example Subtitle Example

auto subs (6)-modified

Supported Languages

Afrikaans, Arabic, Armenian, Azerbaijani, Belarusian, Bosnian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, Galician, German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Kannada, Kazakh, Korean, Latvian, Lithuanian, Macedonian, Malay, Marathi, Maori, Nepali, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swahili, Swedish, Tagalog, Tamil, Thai, Turkish, Ukrainian, Urdu, Vietnamese, and Welsh.

Usage Guide

Step 1: Open Auto-Subs

Click on Workspace in Resolve's top menu bar, then within Scripts select auto-subs from the list.

Workspace -> Scripts -> auto-subs

Step 2: Create your Template

Add a Text+ to the timeline, customise it to your liking, then drag it into the Media Pool. This will be used as the template for your subtitles.

Step 3: Select an area to add subtitles

Mark the beginning ("In") and end ("Out") of the area to subtitle using the I and O keys on your keyboard.

Step 4: Transcribe

Click "Generate Subtitles" to transcribe the selected timeline area.

Automatic Setup

Note

Temporarily removed until I have time to update it to work correctly

Manual Setup

Summary:

  1. Install Python 3.8 - 3.12
  2. Install OpenAI Whisper
  3. Install FFMPEG (used by Whisper for audio processing)
  4. Install Stable-TS (improves subtitles)
  5. Download + copy auto-subs.py to Fusion Scripts folder.

Setup Guides:

Windows Setup

Step 1: Install Python

Download Python 3.12 (or any version > 3.8) and run the installer. Make sure to tick "Add python.exe to PATH" during installation.

Python Installer

Step 2: Install Whisper

From the Whisper setup guide - Run the following command to install OpenAI Whisper for your OS.

pip install -U openai-whisper

Step 3: Install FFMPEG

Install FFMPEG (for audio processing). I recommend using a package manager as it makes the install process less confusing.

# on Windows using Chocolatey (https://chocolatey.org/install)
choco install ffmpeg

# on Windows using Scoop (https://scoop.sh/)
scoop install ffmpeg

Step 4: Install Stable-TS

Install Stable-TS by running this command in the terminal:

pip install -U stable-ts

Step 5: Download the Python Script

Run the following command in Powershell:

Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/tmoroney/auto-subs/main/update-script.ps1").Content

OR

Download auto-subs-light.py and place it in one of the following directories:

  • All users: %PROGRAMDATA%\Blackmagic Design\DaVinci Resolve\Fusion\Scripts
  • Specific user: %APPDATA%\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts

MacOS Setup

Open the terminal and run the following commands...

  1. Install Homebrew package manager:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install Python:

    brew install python
    

    โš ๏ธ Possible Error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)>
    โœ”๏ธ Solution: Run this command in the terminal /Applications/Python\ 3.11/Install\ Certificates.command (replace the Python directory with wherever Python is installed on your computer).

  3. Install FFMPEG (used by Whisper for audio processing):

    brew install ffmpeg
    
  4. Install OpenAI Whisper:

    pip install -U openai-whisper
    
    # if previous command does not work
    pip3 install -U openai-whisper
    
  5. Install Stable-TS:

    pip install -U stable-ts
    
    # if previous command does not work
    pip3 install -U stable-ts
    
  6. Download auto-subs-light.py and place it in one of the following directories:

    • All users: /Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility
    • Specific user: /Users/<UserName>/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility
Linux Setup

Install the following:

  1. Python

    # on Ubuntu or Debian
    sudo apt-get install python3.11
    
    # on Arch Linux
    sudo pacman -S python3.11
    
  2. FFMPEG

    # on Ubuntu or Debian
    sudo apt update && sudo apt install ffmpeg
    
    # on Arch Linux
    sudo pacman -S ffmpeg
    
  3. OpenAI Whisper

    pip install -U openai-whisper
    
  4. Stable-TS

    pip install -U stable-ts
    
  5. Download auto-subs-light.py and place it in one of the following directories:

    • All users: /opt/resolve/Fusion/Scripts/Utility (or /home/resolve/Fusion/Scripts/Utility depending on installation)
    • Specific user: $HOME/.local/share/DaVinciResolve/Fusion/Scripts/Utility

Update AutoSubs

Automatic (Windows Only):

Open PowerShell and run the following command:

Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/tmoroney/auto-subs/main/update-script.ps1").Content

Manual (Windows, Mac, Linux)

Download the auto-subs.py file and add it to one of the following directories:

  1. Windows:

    • All users: %PROGRAMDATA%\Blackmagic Design\DaVinci Resolve\Fusion\Scripts
    • Specific user: %APPDATA%\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts
  2. Mac OS:

    • All users: /Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility
    • Specific user: /Users/<UserName>/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility
  3. Linux:

    • All users: /opt/resolve/Fusion/Scripts/Utility (or /home/resolve/Fusion/Scripts/Utility depending on installation)
    • Specific user: $HOME/.local/share/DaVinciResolve/Fusion/Scripts/Utility

Light Version

Note

Audio transcription has been removed on this version. This means less setup, but a subtitles (SRT) file is required as input. Use this if you already have a way of transcribing video (such as Davinci Resolve Studio's built-in subtitles feature, or CapCut subtitles) and you just want subtitles with a custom theme.

Creates themed subtitles from an SRT file.

Step 1

Install any version of Python (tick "Add python.exe to PATH" during installation)

Step 2

Download auto-subs-light.py and place it in the Utility folder of the Fusion Scripts folder.

...\Blackmagic Design\DaVinci Resolve\Fusion\Scripts\Utility

Contact and Support

  • Check out the Youtube Video Tutorial ๐Ÿ“บ
  • Thanks to everyone who has supported this project โค๏ธ
  • If you have any issues, get in touch on my Discord server for support ๐Ÿ“ฒ

"Buy Me A Coffee"

FAQ

1. Auto-Subs not opening

Verify that Resolve detects your Python installation by opening the Console from the top menu/toolbar in Resolve and clicking py3 at the top of the console. Ensure that Path in your system environment variables contains the following:

  • C:\Users\<your-user-name>\AppData\Local\Programs\Python\Python312
  • C:\Users\<your-user-name>\AppData\Local\Programs\Python\Python312\Scripts\

2. Can't find Fusion folder

Use Everything to quickly search your computer for it (Windows only).

3. MacOS Error

<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)>

Solution: Run this command in the terminal (replace the Python directory with wherever Python is installed on your computer).

/Applications/Python\ 3.11/Install\ Certificates.command

4. Check Python version being used by Resolve

import sys + print (sys.version) in the Resolve console.

5. Issues during Whisper setup

This video may help you (Only the first 6 minutes are necessary).

Future Features

  1. "Improve Timestamps" button to refine subtitle timing.
  2. Speaker Diarization (different coloured subtitles for different people speaking).
  3. Auto-translation (generate subtitles in a different language to the one being spoken).
  4. ChatGPT Integration


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.