Mp4SubtitleParser
从 mp4 中提取 wvtt/ttml 字幕. Extract embed wvtt/ttml subtitle in mp4.
Install / Use
/learn @nilaoda/Mp4SubtitleParserREADME
Mp4SubtitleParser
Program to extract embed wvtt/ttml subtitle in mp4.
Translated from shaka-player project.
python/js prj: https://github.com/xhlove/dash-subtitle-extractor
how to split single-file
"C:\Bento4-SDK-1-6-0-639.x86_64-microsoft-win32\bin\mp4split.exe" single-file.mp4
usage
Mp4SubtitleParser <segments dir> <segments search pattern> [output name] [--segTimeMs=SEGMENT_DUR_IN_MS]
wvtt example
│ 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
TTML example
│ 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
time offset for TTML
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
...
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
