Coder Social home page Coder Social logo

moi15moi / videosubocr Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 3.0 51 KB

OCR automation for VideoSubFinder

License: GNU General Public License v3.0

Python 100.00%
advanced-substation-alpha ass ocr ocr-python ocr-recognition subtitle videosubfinder

videosubocr's Introduction

VideoSubOCR

OCR automation for VideoSubFinder.

Installation and Update

pip install git+https://github.com/moi15moi/VideoSubOCR.git

Dependencies

You will need to have the same parameters has this image. To change your parameters, open ABBYY FineReader and go to Tools -> Options -> Format Settings -> TXT Alt text

Setup for Tesseract

To be able to select the language you want, you need to download tesseract tessdata.

I recommand you to use tessdata_best traineddata.

You will need to download the language you need and move it in the right folder. On Windows, it should be: C:\Users\YOUR_USERNAME\AppData\Local\Tesseract-OCR\tessdata

Usage

usage: VideoSubOCR [-h] --input INPUT [--generalSettings GENERALSETTINGS]
                   [--cropBoxDimension Width_or_Height Width_or_Height] [--cropBoxHeight Height]
                   [--videosubfinderwxw VIDEOSUBFINDERWXW] [--tesseract [TESSERACT]] [--finereader [FINEREADER]]
                   [--lang LANG]

Video OCR automation.

options:
  -h, --help            show this help message and exit
  --input INPUT, -i INPUT
                        Video file needed to be OCR.
  --generalSettings GENERALSETTINGS
                        Path to general settings (*.cfg file). By default, VideoSubFinder use the file
                        settings/general.cfg
  --cropBoxDimension Width_or_Height Width_or_Height, -cpdh Width_or_Height Width_or_Height
                        CropBox dimension Width x Height. Ex: --cropBoxDimension 1920 1080
  --cropBoxHeight Height, -cph Height
                        CropBox height. It is the height between the video bottom and the cropbox bottom.
  --videosubfinderwxw VIDEOSUBFINDERWXW, -vsf VIDEOSUBFINDERWXW
                        Path to VideoSubFinderWXW.exe if not in variable environments.
  --tesseract [TESSERACT], -t [TESSERACT]
                        If tesseract.exe is in your variable environments, simply use --tesseract. If not, path to
                        FineCmd.exe
  --finereader [FINEREADER], -f [FINEREADER]
                        If FineCmd.exe is in your variable environments, simply use --finereader. If not, path to
                        FineCmd.exe
  --lang LANG, -l LANG  Language in which the hardsubbed subtitle is. It will be use by the ocr engine you choose.
                        Warning, ABBYY FineReader and Tesseract doesn't have the exact same input for the same
                        language. Tesseract support ISO 639-2 (t version):
                        https://www.loc.gov/standards/iso639-2/php/code_list.php ABBYY FineReader support the
                        fullname: https://help.abbyy.com/en-us/finereader/15/user_guide/commandline_lang/

VideoSubFinder General Settings

I recommand you to always create a setting. This will allow to have a better ocr You can save the settings with File --> Save Settings As...

For more information about VideoSubFinder, see their website

Alternative to VideoSubFinder General Settings

If you don't want to create a setting, I recommand you to use the file named VideoPreview.vpy. To use it, you will need to install VapourSynth and VapourSynth-Editor.

  1. Open VideoPreview.vpy with VapourSynth-Editor.
  2. Change inputVideo, cropBoxDimension, cropBoxHeight to the value you think you need.
  3. Press F5
  4. See if the cropbox is good for you. If not, repeat the step 2 and 3.

videosubocr's People

Contributors

moi15moi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.