parse_vtt rejects valid WebVTT MM:SS.mmm timestamps
Environment
claude-video: v0.2.0
commit: 83da59fa78c3eee9e20f515fe75c438bb5166efd
Python: 3.12.1
OS: Windows
Likely platform-independentDescription
transcribe.py currently accepts WebVTT timestamps containing an hours component, but valid WebVTT timestamps may omit that component when the hour value is zero.
The current timestamp parser only accepts HH:MM:SS.mmm. A cue using the valid short form MM:SS.mmm is silently skipped, causing parse_vtt to return an empty transcript.
Minimal reproduction
Create short.vtt:
WEBVTT
00:00.160 --> 00:02.360
helloFrom the repository root:
python -c "import sys; sys.path.insert(0, 'skills/watch/scripts'); from transcribe import parse_vtt; print(parse_vtt('short.vtt'))"Actual result:
[]The file contains one cue, but zero segments are parsed.
Expected behavior
The cue should parse as one segment equivalent to:
start = 0.160
end = 2.360
text = "hello"Control case
The same cue parses successfully when the hours component is included:
WEBVTT
00:00:00.160 --> 00:00:02.360
helloResult:
MM:SS.mmm -> 0 segments
HH:MM:SS.mmm -> 1 segmentSpecification
The WebVTT timestamp syntax allows the hours component to be omitted when the hour value is zero:
https://w3c.github.io/webvtt/#webvtt-timestamp
So 00:00.160 is a standards-compliant WebVTT timestamp.
Impact
A valid subtitle file can be acquired successfully but produce an empty transcript without a parsing error.
Downstream processing may therefore behave as if no transcript exists even though the VTT contains valid cues.
Suggested acceptance criteria
- Accept
MM:SS.mmm. - Continue accepting
HH:MM:SS.mmm. - Preserve correct start/end conversion and cue ordering.
- Keep existing behavior for timestamps beyond one hour.
- Add regression coverage for both timestamp forms.
Source: bradautomates/claude-video