Video Subtitle Extractor Bot
A simple Telegram bot to extract hard-coded subtitle from videos using FFmpeg & Tesseract.
Note that the accuracy of recognition depends on the subtitle font and its visibility.
Deploy to Heroku
Local Deploying
-
Clone the repo
git clone https://github.com/samadii/VidSubExtract-Bot
-
Go to this line and add the PATH where Tesseract is installed.
-
Also fill this path with the path of the tessdata folder.
-
Enter the directory
cd VidSubExtract-Bot
-
Install all requirements using pip.
pip3 install -r requirements.txt
-
Run the file
python3 main.py
Environment Variables
API_ID
- Get this from my.telegram.orgAPI_HASH
- Get this from my.telegram.orgBOT_TOKEN
- Get this from @BotFatherSUBTITLE_LANG
- Get this from list of ISO 639-2 language codesUSE_CROP
- Set this to ANYTHING to enable crop mode(crop out subtitles area).