Skip to main content

Add missing subtitles. Recursive video-to-SRT transcription using whisper.cpp

Project description

NOTE: This is a vibe coded app. Proceed with caution.

add_subs_to_videos

You have video files but no subtitles. This tool fixes that.

It crawls a directory recursively, transcribes every video it finds using whisper.cpp, and writes a .srt sidecar file next to each one. Already-transcribed files are skipped, so re-running is fast and safe.

Install

brew install ffmpeg        # macOS
sudo apt install ffmpeg    # Linux
pip install git+https://github.com/simnim/add_subs_to_videos.git

pywhispercpp compiles a C++ extension at install time (requires CMake). On macOS, Metal is auto-detected. On Linux with CUDA:

WHISPER_CUDA=1 pip install git+https://github.com/simnim/add_subs_to_videos.git

Usage

add_subs_to_videos /path/to/videos
add_subs_to_videos /path/to/videos --model large-v3 --language en
add_subs_to_videos /path/to/videos --force   # re-transcribe even if .srt exists

movie.mp4movie.srt, placed in the same directory. Supports .mp4, .mkv, .avi, .mov, .m4v, .webm, and more.

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

add_subs_to_videos-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

add_subs_to_videos-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file add_subs_to_videos-0.1.0.tar.gz.

File metadata

  • Download URL: add_subs_to_videos-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for add_subs_to_videos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42e764a694fa90e2f4385479f60a575a447d28c987e7815a0fa375eb5a2a9ec7
MD5 371e6c3ed23871068f2336a05d6b4d54
BLAKE2b-256 0da5b2dd865001c3164201b1cbe37f3f201a7f3a73c8becfcb39a23b670fa3a9

See more details on using hashes here.

File details

Details for the file add_subs_to_videos-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: add_subs_to_videos-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for add_subs_to_videos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6a1f1efb69d3e622f95549f0388764bdf227410becc9cda2af13181ea08fdc
MD5 2a8e67db5c43b2bb0db6693f7c05e717
BLAKE2b-256 45a36206b73484f9626fc70606ce61189f55aaa390660f7a23ef3f6fbb12f3cc

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