Skip to main content

Bulk Generate SRT Subtitles From Video Locally No API Needed

Project description

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

- git clone https://github.com/codexhound/translatevideo.git

- python setup.py install

- See examples for usage 
	- Setup config.tsv
	- 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	0	nonenglishmodel
		C:\Software\whisper.cpp\models\ggml-small.en-q5_0.bin	Model	0	englishmodel
	- Need to set at least 1 videos path:
		D:\Share\VIDEOS\Movies	Movies	0	videopath
	- Need to set a temporary directory
		D:\Share\tempgensubtitles	Temp	0	tempdir

- Usage Command Line:
	python generatesubtitles.py
- Usuage Python
	import translatevideo
	generatesubtitles()
	

translatevideo


-Bulk scans video files and transribes and translates video audio into srt subtitle files. Places srt files adjacent to video files.

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.

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.2.0.tar.gz (11.5 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.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for translatevideo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e3ceef60feda9de7e5c0f473ee199fb0aa6aec3f10e8e114f178980588d02971
MD5 c32f9454850f1e477252bc5f5cb02183
BLAKE2b-256 74ece8c53548918bc9226ba043d4b9f7b4260345aba561aac318feb46a995c5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: translatevideo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da6abffe1cc7a462d8ec64b7bb25f57d89075978bad9d09b7cfe5077352f5c4a
MD5 af175e0511f33820f6dee1bc4dbadf60
BLAKE2b-256 3a4f579237adba2763ccb776be90daa0d99f0a1edb2a757baa15f5bb6ed8f7b5

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