Program to extract embed wvtt/ttml subtitle in mp4.
Translated from shaka-player project.
python/js prj: https://github.com/xhlove/dash-subtitle-extractor
"C:\Bento4-SDK-1-6-0-639.x86_64-microsoft-win32\bin\mp4split.exe" single-file.mp4
Mp4SubtitleParser <segments dir> <segments search pattern> [output name] [--segTimeMs=SEGMENT_DUR_IN_MS]
│ Mp4SubtitleParser.exe
└─samples-vtt
init.mp4
segment-1.0001.mp4
segment-1.0002.mp4
segment-1.0003.mp4
segment-1.0004.mp4
...
Mp4SubtitleParser.exe samples-vtt *.mp4
you got output.vtt
│ Mp4SubtitleParser.exe
└─samples-ttml
init.mp4
segment-1.0001.mp4
segment-1.0002.mp4
segment-1.0003.mp4
segment-1.0004.mp4
...
Mp4SubtitleParser.exe samples-ttmls *.mp4
you got output.ttml
and output.srt
in that case, every segment's basetime is 00:00:00.000
...
(put any ttml init.mp4
to the folder, so program can recognize ttml header)
Mp4SubtitleParser.exe "samples-ttml(no init, need offset)" *.mp4 --segTimeMs=60000
segment-01 will add offset +0s
segment-02 will add offset +60s
segment-03 will add offset +120s
...