Bulk Generate SRT Subtitles From Video Locally No API Needed
Project description
translatevideo
-Bulk scans video files and transribes and translates video audio into srt subtitle files. Places srt files adjacent to video files.
--Runs on windows/linux/mac
--AMD/Intel/Nvidia GPU compatibility on windows/mac/linux using whisper CPP - Vulkan. Unlike whisper python which is only compatible with NVIDIA GPU's.
Currently only translates into English from other languages. Fastest when transcribing english audio.
Free, all processing is done locally. There is no api. Uses whisper cpp and argos translate to do the transribing and transcription.
Install
- Download and install ffpmeg (https://www.ffmpeg.org/download.html)
- Add bin path to enviornment path variable
- Download and install Whisper CPP. https://github.com/ggerganov/whisper.cpp.
Windows:
- For GPU support install the Vulkan SD and add to enviornment paths prior to compiling for Vulkan
- Install w64devkit for C++ compiler. When compiling insert the flag -G "MinGW Makefiles"
Example if compiling with Vulkan GPU support: cmake -B build -DGGML_VULKAN=1 -G "MinGW Makefiles"
- After compiling download some models. See github.
- Add whispercpp build/bin to windows enviornment variables
- Install TranslateVideo
required: need python 3.8 or 3.9 (https://www.python.org/downloads/release/python-390/)
pip install --upgrade translatevideo
or
pip install --upgrade translatevideo@git+https://github.com/codexhound/translatevideo
Or download and unzip the release for windows
- See examples for usage
- Setup config.tsv (tab delimited, seperate options by tab)
- Need to set an english only and nonenglish model as below in config
C:\Software\whisper.cpp\models\ggml-large-v3-turbo-q5_0.bin Model nonenglishmodel
C:\Software\whisper.cpp\models\ggml-small.en-q5_0.bin Model englishmodel
- Need to set at least 1 videos path:
D:\Share\VIDEOS\Movies Movies videopath
- Need to set a temporary directory
D:\Share\tempgensubtitles Temp tempdir
- Usage Command Line:
translatevideo
translatevideo --rescan ## this rescans directories for subtitles even if database file exists for video path
- Usuage Python
import translatevideo.gensubtitles as gensubtitles
gensubtitles.generatesubtitles()
Future additions:
Translate into other languages besides English
Generate merged srt files (with the from language and the translated too language side by side
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
translatevideo-0.8.5.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file translatevideo-0.8.5.tar.gz.
File metadata
- Download URL: translatevideo-0.8.5.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff0c8f2bb9a7e08022cfe2395b75582c6eca0ab493b8145819be3934ce0bfd22
|
|
| MD5 |
5a406c120c063db6f448ab43fbc33182
|
|
| BLAKE2b-256 |
b247352acb244d3ce920dfe6428604462fce286fd4380c6af2af113d74fcecd2
|
File details
Details for the file translatevideo-0.8.5-py3-none-any.whl.
File metadata
- Download URL: translatevideo-0.8.5-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
112ff185e56976c6fbd7bf163bbfc0a8f30f717b41c757b235a5f2a8f7908162
|
|
| MD5 |
baf33919ec4f9c74558083266e8a1540
|
|
| BLAKE2b-256 |
7df3f6fabe3c2898b7bfd9583139911aff8114ed78fbd999c1e90cddf75256fc
|