You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I found an EBU-TT-D file where some timestamps are without milliseconds. I made this small change to accommodate this:
def fraction_timestamp_to_ms(self, timestamp):
"""Convert hh:mm:ss.fraction to milliseconds
"""
if '.' in timestamp:
hh, mm, ss, fraction = re.split(r'[:.]', timestamp)
else:
hh, mm, ss = re.split(r'[:]', timestamp)
fraction = '0'
hh, mm, ss = [int(i) for i in (hh, mm, ss)]
# Resolution beyond ms is useless for our purposes
ms = int(fraction[:3])
return self._scaler(self._hhmmss_to_ms(hh, mm, ss) + ms)
The text was updated successfully, but these errors were encountered:
Hi, I found an EBU-TT-D file where some timestamps are without milliseconds. I made this small change to accommodate this:
The text was updated successfully, but these errors were encountered: