Skip to main content

subtitle-deduplicator 🎬

PyPI AUR GitHub

SRT Subtitle Duplicate Remover

Remove duplicate/ghost entries from auto-generated SRT subtitle files. | GitHub | PyPI | AUR |Blog

Why?

Auto-generated SRT subtitles (from YouTube, Whisper, etc.) often contain duplicated entries in a "scrolling karaoke" pattern:

1
00:00:00,440 --> 00:00:02,909

so welcome to the last Talk of the day

2
00:00:02,909 --> 00:00:02,919
so welcome to the last Talk of the day
 

3
00:00:02,919 --> 00:00:06,630
so welcome to the last Talk of the day
and OSS what do ABI and why should they

Each real entry shows 2 lines (previous + new), and between them are 10ms "ghost" entries that only repeat the previous text. This roughly triples the file size and makes the subtitles unreadable.

Install

PyPI

pip install subtitle-deduplicator

Arch Linux (AUR)

yay -S subtitle-deduplicator

Usage

# Basic usage (outputs to video_deduped.srt)
subtitle-dedup video.srt

# Specify output file
subtitle-dedup video.srt -o video_clean.srt

# Overwrite in place
subtitle-dedup video.srt --in-place

# Custom ghost threshold (default: 20ms)
subtitle-dedup video.srt -t 50

# Specify encoding
subtitle-dedup video.srt -e latin-1

Example Output:

✔ Deduplication complete!
ℹ Input:               video.srt
ℹ Output:              video_clean.srt
ℹ Original entries:    1559
ℹ Deduplicated:        760
ℹ Removed:             799 (51.3%)

What It Removes

Duplicate Type Description
Ghost entries 10ms entries that repeat previous text
Carry-over lines First line duplicating previous entry's last line
Identical entries Back-to-back entries with same text
Empty entries Entries with no actual text content

Zero Dependencies

subtitle-deduplicator uses only Python standard library — no pip install requirements beyond Python 3.8+.

License

MIT

Metadata

Release files for subtitle-deduplicator 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for subtitle-deduplicator 1.0.1
File Size Uploaded Provenance Actions
subtitle_deduplicator-1.0.1.tar.gz 10.0 kB With provenance Details for subtitle_deduplicator-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for subtitle-deduplicator 1.0.1
File Interpreter ABI Platform Actions
subtitle_deduplicator-1.0.1-py3-none-any.whl Python 3 none any Details for subtitle_deduplicator-1.0.1-py3-none-any.whl

Total release size: 17.4 kB

Release files / subtitle_deduplicator-1.0.1.tar.gz

Download URL subtitle_deduplicator-1.0.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5bdfa5ea443e9b2c36bb4017b327a831df3ac9788d0d2b7d757b5bf0cf2a940a
BLAKE2b-256 checksum
How to use checksums
db3e8153ecb5bd82753d5f5c11a12e63be8bef9e1839665de227bf1d5416d5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Release files / subtitle_deduplicator-1.0.1-py3-none-any.whl

Download URL subtitle_deduplicator-1.0.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f264bd394552a8f97cea2b5ec25f7e1cd6801cd52743fbb826f9e0bfd20e7cc4
BLAKE2b-256 checksum
How to use checksums
3f5eedcba3b7ec3fc6d2f5aa4728524c05ef738435900ce34cfd5c0e18cb11b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Security for subtitle-deduplicator 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for subtitle_deduplicator-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page