简体中文 | English
SubErase-Translate-Embed is a powerful open-source tool that simplifies multilingual video content creation. Using advanced AI technology, it automates the entire process of subtitle detection, removal, translation, and embedding.
- 🚀 Fully Automated: One-click solution from subtitle extraction to embedding
- 🎯 High Accuracy: Precise subtitle recognition powered by PaddleOCR
- ✨ Perfect Removal: Natural subtitle removal using STTN technology
- 🌍 Multilingual: Support for multiple language translations
- 🛠️ User-Friendly: Easy-to-use command-line interface
-
Intelligent Subtitle Recognition:
- High-precision text recognition with PaddleOCR
- Support for various fonts and complex backgrounds
- Automatic subtitle position and timestamp detection
-
Professional Subtitle Removal:
- Smart restoration using STTN technology
- Seamless removal with natural results
- Complex background handling
-
High-Quality Translation:
- Integration with ChatGPT API for accurate translations
- Preservation of original context and expression
- Support for multiple language pairs
-
Precise Subtitle Embedding:
- Customizable subtitle styles
- Intelligent position adjustment
- Smooth transition effects
Follow these steps to set up SubErase-Translate-Embed:
-
Clone the Repository:
git clone --recursive https://github.com/chenwr727/SubErase-Translate-Embed.git
-
Install Dependencies:
conda create -n ste python=3.10 conda activate ste pip install paddlepaddle-gpu==2.6.1.post120 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html pip install -r requirements.txt
-
Download Models:
Save the model files in the
./models
directory with the following structure:models ├── ch_PP-OCRv4_det_server_infer └── ch_PP-OCRv4_rec_server_infer └── sttn.pth
-
Configuration:
cp config-template.yaml config.yaml
-
Install Applications:
sudo apt install imagemagick conda install -c conda-forge ffmpeg conda install -c conda-forge gcc=12.2.0
Process your video with a single command:
python main.py --video input_video.mp4 --language English
For advanced configuration options, refer to config.yaml
.
We welcome all forms of contributions, whether it's new features, bug fixes, or documentation improvements. Please check our contribution guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to these amazing projects: