# 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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "translatevideo",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "translation, subtitles, transcription, srt, plex",
"author": "codexhound",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f2/2d/dc7e2a9c6fd72190cb7630b218fcf38404a736e4b39728806cbc39f600b0/translatevideo-0.8.4.tar.gz",
"platform": null,
"description": "# translatevideo\r\n```\r\n-Bulk scans video files and transribes and translates video audio into srt subtitle files. Places srt files adjacent to video files.\r\n\r\n--Runs on windows/linux/mac\r\n\r\n--AMD/Intel/Nvidia GPU compatibility on windows/mac/linux using whisper CPP - Vulkan. Unlike whisper python which is only compatible with NVIDIA GPU's.\r\n\r\nCurrently only translates into English from other languages. Fastest when transcribing english audio.\r\n\r\nFree, all processing is done locally. There is no api. Uses whisper cpp and argos translate to do the transribing and transcription.\r\n\r\n```\r\n\r\n## Install\r\n```\r\n- Download and install ffpmeg (https://www.ffmpeg.org/download.html)\r\n\t- Add bin path to enviornment path variable\r\n\r\n- Download and install Whisper CPP. https://github.com/ggerganov/whisper.cpp.\r\n\tWindows:\r\n\t- For GPU support install the Vulkan SD and add to enviornment paths prior to compiling for Vulkan\r\n\t- Install w64devkit for C++ compiler. When compiling insert the flag -G \"MinGW Makefiles\"\r\n\t\tExample if compiling with Vulkan GPU support: cmake -B build -DGGML_VULKAN=1 -G \"MinGW Makefiles\"\r\n\t- After compiling download some models. See github.\r\n\t- Add whispercpp build/bin to windows enviornment variables\r\n\r\n- Install TranslateVideo\r\n\trequired: need python 3.8 or 3.9 (https://www.python.org/downloads/release/python-390/)\r\n\tpip install --upgrade translatevideo\r\n\tor\r\n\tpip install --upgrade translatevideo@git+https://github.com/codexhound/translatevideo\r\n\r\n\tOr download and unzip the release for windows\r\n\r\n- See examples for usage\r\n\t- Setup config.tsv (tab delimited, seperate options by tab)\r\n\t- Need to set an english only and nonenglish model as below in config\r\n\t\tC:\\Software\\whisper.cpp\\models\\ggml-large-v3-turbo-q5_0.bin\tModel\tnonenglishmodel\r\n\t\tC:\\Software\\whisper.cpp\\models\\ggml-small.en-q5_0.bin\tModel\tenglishmodel\r\n\t- Need to set at least 1 videos path:\r\n\t\tD:\\Share\\VIDEOS\\Movies\tMovies\tvideopath\r\n\t- Need to set a temporary directory\r\n\t\tD:\\Share\\tempgensubtitles\tTemp\ttempdir\r\n\r\n- Usage Command Line:\r\n\ttranslatevideo\r\n\ttranslatevideo --rescan ## this rescans directories for subtitles even if database file exists for video path\r\n- Usuage Python\r\n\timport translatevideo.gensubtitles as gensubtitles\r\n\tgensubtitles.generatesubtitles()\r\n\t\r\n```\r\n\r\n# Future additions:\r\n```\r\n\r\nTranslate into other languages besides English\r\n\r\nGenerate merged srt files (with the from language and the translated too language side by side\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Bulk Generate SRT Subtitles From Video Locally No API Needed",
"version": "0.8.4",
"project_urls": {
"Homepage": "https://github.com/codexhound/translatevideo",
"Issues": "https://github.com/codexhound/translatevideo/issues"
},
"split_keywords": [
"translation",
" subtitles",
" transcription",
" srt",
" plex"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "602bc0f66ed0bdd1390b19e9937e296f32073a2d44e2973b9d0cb78c638b48bc",
"md5": "809ffaa32e9f62743d74a708c0a93aaf",
"sha256": "240d42ea208bd329f0d6f80110f7e41a2645c74b53baf82ca3e02f79e0ae394e"
},
"downloads": -1,
"filename": "translatevideo-0.8.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "809ffaa32e9f62743d74a708c0a93aaf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 12724,
"upload_time": "2025-01-15T04:57:54",
"upload_time_iso_8601": "2025-01-15T04:57:54.002739Z",
"url": "https://files.pythonhosted.org/packages/60/2b/c0f66ed0bdd1390b19e9937e296f32073a2d44e2973b9d0cb78c638b48bc/translatevideo-0.8.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f22ddc7e2a9c6fd72190cb7630b218fcf38404a736e4b39728806cbc39f600b0",
"md5": "7527565ff7939a85993b755a22154a9a",
"sha256": "2c0a60e9a5842deae12ce429856222f960c4432616dda658287c169f9eaeef0c"
},
"downloads": -1,
"filename": "translatevideo-0.8.4.tar.gz",
"has_sig": false,
"md5_digest": "7527565ff7939a85993b755a22154a9a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11381,
"upload_time": "2025-01-15T04:57:56",
"upload_time_iso_8601": "2025-01-15T04:57:56.036368Z",
"url": "https://files.pythonhosted.org/packages/f2/2d/dc7e2a9c6fd72190cb7630b218fcf38404a736e4b39728806cbc39f600b0/translatevideo-0.8.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-15 04:57:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "codexhound",
"github_project": "translatevideo",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "translatevideo"
}