Skip to content

add support for parsing HLS WebVTT X-TIMESTAMP-MAP tag#25

Open
omerholz wants to merge 3 commits into
glut23:masterfrom
omerholz:hls-webvtt-timestamp-map-support
Open

add support for parsing HLS WebVTT X-TIMESTAMP-MAP tag#25
omerholz wants to merge 3 commits into
glut23:masterfrom
omerholz:hls-webvtt-timestamp-map-support

Conversation

@omerholz

@omerholz omerholz commented Oct 31, 2019

Copy link
Copy Markdown
Contributor

Adding support for parsing HLS WebVTT X-TIMESTAMP-MAP tag.
for more details see: https://tools.ietf.org/html/rfc8216#section-3.5

This PR keeps full backward compatibility. It adds a new structure TimestampMap to store the timestamp map, a new parser HlsWebVTTParser to parse webvtt payload that may or may not have X-TIMESTAMP-MAP tag and a new HlsWebVTT class to tie everything together:

vtt = HlsWebVTT.read('my_hls_subtitle_segment.vtt')
vtt.captions
vtt.timestamp_map.local
vtt.timestamp_map.mpegts

@omerholz

omerholz commented Nov 4, 2019

Copy link
Copy Markdown
Contributor Author

@glut23 would love your feedback

@glut23

glut23 commented Nov 22, 2019

Copy link
Copy Markdown
Owner

Hi @omerholz apologies for replying this late. I am thinking that we could incorporate this parsing functionality as part of the WebVTT class, so the user can parse a vtt file and read the HLS data if present. What do you think? Thanks for your contribution.

@omerholz

omerholz commented Dec 5, 2019

Copy link
Copy Markdown
Contributor Author

I'm game to place it there @glut23
I'll ping you once I get to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants