2021-04-14 20:31:58 +08:00
2021-04-08 09:13:15 +08:00
2021-04-14 17:02:16 +08:00
2021-04-14 17:02:16 +08:00
2021-04-13 15:12:14 +08:00
2021-04-01 15:29:23 +08:00
2021-04-09 16:38:06 +08:00
2021-03-31 17:29:21 +08:00
2021-04-13 15:12:14 +08:00
2021-04-14 17:06:29 +08:00
2021-04-14 20:31:58 +08:00
2021-04-09 19:25:44 +08:00

简体中文 | English

Introduction

License python version support os

video-subtitle-extractor is used to extract hard-coded subtitles and generate srt file. It includes the following implementations:

  • detect and extract subtitle frames (and keyframes using traditional graphic method)
  • detect the position (i.e. coordinates) of subtitles (as well as scene text if you want) (using deep learning method)
  • recognise the content of subtitles (i.e. converting graphic text into plain-text) (using deep learning method)
  • filter non-subtitle text
  • remove duplicated subtitle line
  • generate srt file

Download:

Features

  • You don't need to do any preprocessing to get an ideal result.
  • This is an offline project. You don't need to make any API call from Internet service provider in order to get results.
  • For Command Line Interface(CLI) version, you don't need to manually set the location of subtitle. This program will automatically detect the subtitle area for you.
  • GPU support is available. You can install CUDA and cuDNN to speed up the detection and recognition process and even get more accurate results.

Demo

  • Graphic User Interface:
  • Command Line Interface:

Demo Video

Getting Started

1. (Optional) Download and Install Anaconda

https://www.anaconda.com/products/individual#Downloads

2. (Optional) create and activate a conda virtual environment

conda create --name videoEnv python=3.7
conda activate videoEnv  

3. Install dependencies via pip

make sure you have python 3.7 installed

  • for macOS users and users who have CPU only:
pip install -r requirements.txt
  • for users who have Nvidia graphic card:
pip install -r requirements_gpu.txt

4. Running the program

  • Run GUI version
python gui.py
  • Run CLI version
python main.py

Run on Google Colab

  • Google Colab Notebook with free GPU: Open In Colab

Debug

  • For Windows users, if you encounter errors related to "geos_c.dll"
    _lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll'))
  File "C:\Users\Flavi\anaconda3\envs\subEnv\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found。

Solution:

  1. Uninstall Shapely
pip uninstall Shapely -y
  1. Reinstall Shapely via conda (make sure you have anaconda or miniconda installed)
conda install Shapely             
S
Description
No description provided
Readme
1.2 GiB
0 Stars 1 Watchers 0 Forks
Languages
Python 99.3%
Jupyter Notebook 0.5%
Cython 0.2%