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
Metadata
Release files for translatevideo 0.8.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| translatevideo-0.8.5.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| translatevideo-0.8.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / translatevideo-0.8.5.tar.gz
| Download URL | translatevideo-0.8.5.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff0c8f2bb9a7e08022cfe2395b75582c6eca0ab493b8145819be3934ce0bfd22
|
|
BLAKE2b-256 checksum How to use checksums |
b247352acb244d3ce920dfe6428604462fce286fd4380c6af2af113d74fcecd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.0
|
Release files / translatevideo-0.8.5-py3-none-any.whl
| Download URL | translatevideo-0.8.5-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
112ff185e56976c6fbd7bf163bbfc0a8f30f717b41c757b235a5f2a8f7908162
|
|
BLAKE2b-256 checksum How to use checksums |
7df3f6fabe3c2898b7bfd9583139911aff8114ed78fbd999c1e90cddf75256fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.0
|