jewel-andraia / vtt-timeshift

Adjust the timestamps on a VTT file to accommodate for cropping the beginning of the source video

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vtt-timeshift

Adjust the timestamps on a .VTT (transcript) to accommodate for cropping the beginning of the source video

⚠️ This is not well-tested. Double-check the results yourself. PRs welcome.

Setup

git clone git@github.com:andytuba/vtt-timeshift
cd vtt-timeshift
virtualenv -p python3 .
pip install -r requirements.txt

Usage

Put your transcript.vtt file in the vtt_files/ directory

In your terminal:

source bin/activate
python shift_it.py --time 00:05:23.010 vtt_files/transcript.vtt

to timeshift all the captions back 5 minutes, 23.01 seconds. If the video is padded at the beginning, instead of cropped, add a --padded argument, like python shift_it.py --padded --time etc

The timeshifted version of the .vtt file will be placed in the output/ directory (unless you specify a --output path/to/file.vtt).

About

Adjust the timestamps on a VTT file to accommodate for cropping the beginning of the source video


Languages

Language:Python 100.0%