metorm / MyTinyUtilities

Some self-written utilities, which are too trivial to be published as independent projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

metormWindowsToolkit

My windows script toolkit

vtt2ass

Usually youtube.com provides subtitle in *.vtt format. Some of these *.vtt subtitles contain extra timeline or format information. Therefore these subtitles cannot be handled correct by players such as Pot player or KMP. The following is an example among these subtitles:

00:00:02.960 --> 00:00:04.080 align:start position:0%

<c.colorCCCCCC>what's<00:00:03.159> going<c.colorCCCCCC><00:00:03.250> on<c.colorE5E5E5><00:00:03.570> very<00:00:03.730> welcome<00:00:04.080> to

00:00:04.080 --> 00:00:04.240 align:start position:0%

<c.colorCCCCCC>what's going<c.colorCCCCCC> on<c.colorE5E5E5> very welcome to

ffmpeg can convert this to *.ass or *.srt correctly. This vtt2ass.ps1 powershell script run ffmpeg -i xxx.vtt xxx.ass on all *.vtt files under current directory, and convert them to *.ass subtitle. By simply editing the first two lines of the script, other formats all also supported.

About

Some self-written utilities, which are too trivial to be published as independent projects

License:Creative Commons Zero v1.0 Universal


Languages

Language:Shell 94.4%Language:PowerShell 5.6%