Closed kdHub closed 2 years ago
@kdHub Hi, I am having a look over this issue and unfortunately I can not acces the source file provided: https://gist.github.com/kdHub/d6f4ce9f34968d2807ae69101338026a and it is not very clear for me when this error occurs. Does the error occur in pycaption or in the context you use it? Thanks!
Thanks for reporting this, we added zero padding for 1-digit hours on pycaption 2.0.1
Expected Behavior
When hours are included in timestamp output transitioning from 00 hours to 01 hours should be in the 01:00:00.000 format based on spec and optionally included when no hour is included. Finding in some cases 1:00:00.000 is found in output of scc to webvtt conversion.
Current Behavior
1:00:00.000 is outputted causing parse error vs 01:00:00.000
Possible Solution
Steps to Reproduce
Source File: https://gist.github.com/kdHub/d6f4ce9f34968d2807ae69101338026a
Context (Environment)
Issue causes parsing failures when packaging.
Detailed Description
From https://www.w3.org/TR/webvtt1/#webvtt-timestamp
WebVTT timestamp consists of the following components, in the given order: Example: Optionally (required if hours is non-zero): Two or more ASCII digits, representing the hours as a base ten integer.****
Recommendation is to output 00:00:00.000 format at all times as that appears to fix it locally.