Skip to main content

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


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.3.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

translatevideo-0.8.3-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file translatevideo-0.8.3.tar.gz.

File metadata

  • Download URL: translatevideo-0.8.3.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.0

File hashes

Hashes for translatevideo-0.8.3.tar.gz
Algorithm Hash digest
SHA256 f36957951cd038f5624b53d089924e62859f5f257b7c32bdb46236667af4fde0
MD5 afa01443dae62c8b5e99fdb3261b70a5
BLAKE2b-256 ec959056bdf675b043b1177313df500cf7260ccbc859560a3e8308b9f2f3a8ed

See more details on using hashes here.

File details

Details for the file translatevideo-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: translatevideo-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.0

File hashes

Hashes for translatevideo-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 872eafafba5a5793029f7ac51a9faf2e974969d969a25dc31947cc4b8a80d052
MD5 87ea409c73fce308b30260f73362a86e
BLAKE2b-256 2caedc4da0c45385ff045efcec16229a2bc6cbf2ca4bd07621173a8387ccb7d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page