Skip to content

Latest commit

 

History

History
251 lines (173 loc) · 11.3 KB

README.md

File metadata and controls

251 lines (173 loc) · 11.3 KB

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

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

Automatic setup only works on Windows
The command below executes a PowerShell script which installs all the dependencies and places auto-subs.py in the Fusion scripts folder.

  1. Download Python 3.12 and run the installer. Make sure to tick "Add python.exe to PATH" during installation.

    Python Installer

  2. Open PowerShell in Administrator Mode.

  3. Copy this command into Powershell + Run it by hitting the enter key.

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

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

"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