AI Compare
​
​
ToolsArticlesServices
Best for
    All tools

    Sales

    AI tools for finding leads, qualifying them, preparing quotes, following up and keeping the CRM up to date.

    Marketing

    AI tools for content, social media, images, video, SEO and campaigns.

    Customer service

    AI tools for answering customer emails, chats and calls, handling requests and escalating the hard cases.

    Operations

    AI tools for running the daily work: workflows, scheduling, projects, purchasing and delivery.

    Finance

    AI tools for invoices, bookkeeping, reconciliation, spreadsheets and financial reporting.

    Management & Admin

    AI tools for owners, managers and office staff: planning, reports, documents, meetings, scheduling and everyday admin.

    HR

    AI tools for hiring, screening candidates, onboarding, training and answering employee questions.

    Legal & Compliance

    AI tools for reviewing contracts, tracking deadlines and preparing compliance work for a qualified person to check.

    IT & Development

    AI tools for developers and IT teams: coding, AI models, agents, infrastructure and integrations.

Find AI tools for your team
AllAssistantsWriting & DocsImagesVideoAudioAI AgentsAutomationCode
← Back to tools

•

2023-10-25

video-subtitle-remover logo

video-subtitle-remover

Not rated yet

12.1K GitHub stars

Type:

Tool

Platforms:

Github

Task:

Generate videosEdit videosGenerate images

Best for:

Marketing
View on GitHub

Pricing


Starting price

$0

Type

Freemium

Overview

Video-subtitle-remover (VSR) is an AI-based tool for removing hard-coded subtitles from videos. For example, if the source code is stored in a tools folder on the D: drive and the project folder is named video-subtitle-remover, that path can be used when configuring the application.

The README highlights lossless-resolution subtitle removal; AI-based inpainting of removed subtitle regions rather than simple neighboring-pixel filling or mosaic removal; extraction of original video subtitles for use with video-subtitle-extractor (VSE); and support for custom subtitle regions so only text in a specified area is removed.

README

VSR Logo
YaoFANGUK%2Fvideo-subtitle-remover | Trendshift

Project Introduction

License python version support os Docker

Video-subtitle-remover (VSR) is an AI-based software that removes hardcoded subtitles from videos. It mainly implements the following functionalities:

  • Lossless resolution: Removes hardcoded subtitles from videos and generates files without subtitles
  • Fills in the removed subtitle text area using a powerful AI algorithm model (non-adjacent pixel filling and mosaic removal)
  • Supports custom subtitle positions by only removing subtitles in the defined location (input position)
  • Supports automatic removal of all text throughout the entire video (without inputting a position)
  • Supports multi-selection of images for batch removal of watermark text

demo.png

Instructions:

  • If you have questions, please join the discussion group: QQ Group 210150985 (full), 806152575 (full), 816881808 (full), 295894827
  • Download the compressed package, extract and run it directly. If it cannot run, follow the tutorial below to try installing from source

Download: Release

Pre-built Package Comparison:

Pre-built Package NamePythonPaddleTorchEnvironmentSupported Compute Capability Range
vsr-windows-cpu.7z3.123.0.02.7.0UniversalUniversal
vsr-windows-directml.7z3.123.0.02.4.1Windows non-Nvidia GPUUniversal
vsr-windows-nvidia-cuda-11.8.7z3.123.0.02.7.0CUDA 11.83.5 – 8.9
vsr-windows-nvidia-cuda-12.6.7z3.123.0.02.7.0CUDA 12.65.0 – 8.9
vsr-windows-nvidia-cuda-12.8.7z3.123.0.02.7.0CUDA 12.85.0 – 9.0+

NVIDIA provides a list of compute capabilities for each GPU model. Refer to CUDA GPUs to check which CUDA version is compatible with your GPU.

Docker Versions:

# Nvidia 10, 20, 30 Series Graphics Cards
docker run -it --name vsr --gpus all eritpchy/video-subtitle-remover:1.4.0-cuda11.8 python backend/main.py -i test/test.mp4 -o test/test_no_sub.mp4

# Nvidia 40 Series Graphics Cards
docker run -it --name vsr --gpus all eritpchy/video-subtitle-remover:1.4.0-cuda12.6 python backend/main.py -i test/test.mp4 -o test/test_no_sub.mp4

# Nvidia 50 Series Graphics Cards
docker run -it --name vsr --gpus all eritpchy/video-subtitle-remover:1.4.0-cuda12.8 python backend/main.py -i test/test.mp4 -o test/test_no_sub.mp4

# AMD / Intel Dedicated or Integrated Graphics
docker run -it --name vsr --gpus all eritpchy/video-subtitle-remover:1.4.0-directml python backend/main.py -i test/test.mp4 -o test/test_no_sub.mp4

# CPU
docker run -it --name vsr --gpus all eritpchy/video-subtitle-remover:1.4.0-cpu python backend/main.py -i test/test.mp4 -o test/test_no_sub.mp4

# Export video
docker cp vsr:/vsr/test/test_no_sub.mp4 ./

Command Line:

Video Subtitle Remover Command Line Tool

options:
  -h, --help            show this help message and exit
  --input INPUT, -i INPUT
                        Input video file path
  --output OUTPUT, -o OUTPUT
                        Output video file path (optional)
  --subtitle-area-coords YMIN YMAX XMIN XMAX, -c YMIN YMAX XMIN XMAX
                        Subtitle area coordinates (ymin ymax xmin xmax). Can be specified multiple times for multiple areas.
  --inpaint-mode {sttn-auto,sttn-det,lama,propainter,opencv}
                        Inpaint mode, default is sttn-auto

Demonstration

  • GUI:

demo2.gif

demo.gif

Source Code Usage Instructions

1. Install Python

Please ensure that you have installed Python 3.12+.

  • Windows users can go to the Python official website to download and install Python.
  • MacOS users can install using Homebrew:
    brew install python@3.12
    
  • Linux users can install via the package manager, such as on Ubuntu/Debian:
    sudo apt update && sudo apt install python3.12 python3.12-venv python3.12-dev
    

2. Install Dependencies

It is recommended to use a virtual environment to manage project dependencies to avoid conflicts with the system environment.

(1) Create and activate the virtual environment:

python -m venv videoEnv
  • Windows:
videoEnv\\Scripts\\activate
  • MacOS/Linux:
source videoEnv/bin/activate

3. Create and Activate Project Directory

Change to the directory where your source code is located:

cd <source_code_directory>

For example, if your source code is in the tools folder on the D drive and the folder name is video-subtitle-remover, use:

cd D:/tools/video-subtitle-remover-main

4. Install the Appropriate Runtime Environment

This project supports four running modes: CUDA (NVIDIA GPU acceleration), CPU (no GPU), DirectML (AMD, Intel and other GPU/APU acceleration), and macOS (Apple Silicon).

(1) CUDA (For NVIDIA GPU users)

Make sure your NVIDIA GPU driver supports the selected CUDA version.

  • Recommended CUDA 11.8, corresponding to cuDNN 8.6.0.

  • Install CUDA:

    • Windows: Download CUDA 11.8
    • Linux:
      wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
      sudo sh cuda_11.8.0_520.61.05_linux.run
      
    • CUDA is not supported on MacOS.
  • Install cuDNN (CUDA 11.8 corresponds to cuDNN 8.6.0):

    • Windows cuDNN 8.6.0 Download
    • Linux cuDNN 8.6.0 Download
    • Follow the installation guide in the NVIDIA official documentation.
  • Install PaddlePaddle GPU version (CUDA 11.8):

    pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
    
  • Install Torch GPU version (CUDA 11.8):

    pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu118
    
  • Install other dependencies:

    pip install -r requirements.txt
    
  • For Linux systems, you also need to install:

    # for cuda 12.x
    pip install onnxruntime-gpu==1.22.0
    # for cuda 11.x
    pip install onnxruntime-gpu==1.20.1 --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-11/pypi/simple/
    

    For more details, see: Install ONNX Runtime

(2) DirectML (For AMD, Intel, and other GPU/APU users)
  • Suitable for Windows devices with AMD/NVIDIA/Intel GPUs.
  • Install ONNX Runtime DirectML version:
    pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
    pip install -r requirements.txt
    pip install torch_directml==0.2.5.dev240914
    
(3) CPU Only (For systems without GPU or those not wanting to use GPU acceleration)
  • Suitable for systems without GPU or those that do not wish to use GPU.
    pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
    pip install torch==2.7.0 torchvision==0.22.0
    pip install -r requirements.txt
    
(4) Running on macOS (Apple Silicon)
  • Suitable for macOS (Apple Silicon) devices
  • For macOS (Intel), please use the CPU mode. Forcing GPU usage will only be slower.
  • On macOS (Apple Silicon), the accuracy of the PP-OCRv4-Server model for subtitle detection seems suboptimal. We recommend using an alternative model.
    pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
    pip install torch==2.7.0 torchvision==0.22.0
    pip install -r requirements.txt
    

    Tested with Python 3.13

4. Run the program

  • Run the graphical interface
python gui.py
  • Run the command line version (CLI)
python ./backend/main.py

Common Issues

  1. How to deal with slow removal speed

You can greatly increase the removal speed by modifying the parameters in backend/config.py:

MODE = InpaintMode.STTN  # Set to STTN algorithm
STTN_SKIP_DETECTION = True # Skip subtitle detection, skipping may cause missed subtitles or damage to frames without subtitles
  1. What to do if the video removal results are not satisfactory

Modify the values in backend/config.py and try different removal algorithms. Here is an introduction to the algorithms:

  • InpaintMode.STTN algorithm: Good for live-action videos and fast in speed, capable of skipping subtitle detection
  • InpaintMode.LAMA algorithm: Best for images and effective for animated videos, moderate speed, unable to skip subtitle detection
  • InpaintMode.PROPAINTER algorithm: Consumes a significant amount of VRAM, slower in speed, works better for videos with very intense movement
  • Using the STTN algorithm
MODE = InpaintMode.STTN  # Set to STTN algorithm
# Number of neighboring frames, increasing this will increase memory usage and improve the result
STTN_NEIGHBOR_STRIDE = 10
# Length of reference frames, increasing this will increase memory usage and improve the result
STTN_REFERENCE_LENGTH = 10
# Set the maximum number of frames processed simultaneously by the STTN algorithm, a larger value leads to slower processing but better results
# Ensure that STTN_MAX_LOAD_NUM is greater than STTN_NEIGHBOR_STRIDE and STTN_REFERENCE_LENGTH
STTN_MAX_LOAD_NUM = 30
  • Using the LAMA algorithm
MODE = InpaintMode.LAMA  # Set to LAMA algorithm
LAMA_SUPER_FAST = False  # Ensure quality

If you are not satisfied with the subtitle removal results, you can check the training methods in the design folder, use the code in backend/tools/train to train, and then replace the old model with the trained model.

  1. 7z file extraction error

Solution: Upgrade the 7-zip extraction program to the latest version.

Sponsor

Releases

Release information has not been added yet.

Related articles

Guides and news that mention this tool.

n8n logo

Automate AI Videos for TikTok and Instagram

Use cases
Complete your AI stack

Turn generated images into videos, articles, books, voiceovers, and automated content workflows.

Runway logo
Runway
Create videos

AI video generation and creative production platform

View tool
ChatGPT logo
ChatGPT
Write articles

General-purpose AI assistant for research, writing, coding, data analysis, image creation, and everyday productivity

View tool
AIWriteBook logo
AIWriteBook
Create books

End-to-end AI platform for writing and publishing books.

View tool
ElevenLabs logo
ElevenLabs
Add voice

AI voice, music, audio, video, and conversational agent platform

View tool
n8n logo
n8n
Automate publishing

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

View tool
Best alternatives

Compare similar tools in the same category.

Adobe Firefly logo

Adobe Firefly

AI image generation integrated with Adobe tools

ElevenLabs logo

ElevenLabs

AI voice, music, audio, video, and conversational agent platform

Runway logo

Runway

AI video generation and creative production platform

Canva AI logo

Canva AI

AI-powered design and content creation integrated with Canva

View all in this category
Help
Pick an answer below
Hi! I can point you to the right tool or guide. What are you looking for?
Browse all articles