TS-CC Extractor
With this pure-python utility you can extract EIA-608 captions from Video Transport Stream (*.ts) file and convert them to SubRip (*.srt) or Video Text Tracks (*.vtt) subtitles.
Installation
pip install ts-cc-extractor
Usage
usage: ts-cc-extractor -i PATH -o PATH [-f {SRT,VTT}] [-v] [-h]
required arguments:
-i PATH Path to *.ts file
-o PATH Output subtitles file
optional arguments:
-f {SRT,VTT} Subtitles format (default: SRT)
-v, --version show program's version number and exit
-h, --help show this help message and exit
API example
from ts_cc_extractor import extract_subtitles
with open('video1.ts') as f:
subs_text = extract_subtitles(f, fmt='VTT')
print(subs_text)
WEBVTT
00:01.705 --> 00:03.974 align:left position:10% line:5% size:80%
THAT'S JUST THE WAY IT GOES.
I DONE SEEN IT TOO MANY TIMES.
00:03.974 --> 00:05.609 align:left position:30% line:89% size:60%
HEY, Y'ALL READY?
...
CLI example
$ ts-cc-extractor -i video2.ts -o subs.srt -f SRT
$ cat subs.srt
1
00:00:01,967 --> 00:00:05,633
>> HARRY AND MEGHAN WERE IN THE
MAJOR GENERAL'S OFFICE
2
00:00:05,633 --> 00:00:10,533
OVERLOOKING THE PAGEANTLY OF THE
HORSE GUARDS PARADE AND THE
3
00:00:10,533 --> 00:00:10,800
TROOPING.
...
License
BSD
Metadata
Release files for ts-cc-extractor 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ts-cc-extractor-0.0.3.tar.gz | 40.9 kB | Without provenance | Details for ts-cc-extractor-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ts_cc_extractor-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for ts_cc_extractor-0.0.3-py3-none-any.whl |
Total release size: 84.5 kB
Release files / ts-cc-extractor-0.0.3.tar.gz
| Download URL | ts-cc-extractor-0.0.3.tar.gz |
|---|---|
| Size | 40.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a026a27f1fe4c97e80cfb6b98339a77f494eb3a54dda83a9690c6ec31b1a8c0d
|
|
BLAKE2b-256 checksum How to use checksums |
46f95e185e34b271085afe24e44d3cc1d0dd40d105e9913acab92cc6b76d5120
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|
Release files / ts_cc_extractor-0.0.3-py3-none-any.whl
| Download URL | ts_cc_extractor-0.0.3-py3-none-any.whl |
|---|---|
| Size | 43.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3aab4c5eee575e89abfc9f9e7899412277058a56400dbc3a794142a042cb0011
|
|
BLAKE2b-256 checksum How to use checksums |
5812ec063e08e7751ceec3c40aa9aefac303681b61edc1025471cf2e0971bfbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|
Security for ts-cc-extractor 0.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.