lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.66k stars 260 forks source link

Allow downloading closed captions track as subtitles #750

Open KamasamaK opened 1 year ago

KamasamaK commented 1 year ago

Checklist

Write your feature request here

Twitch natively supports Closed Captions, so it would be great if this tool could download those from a VOD as a subtitle track. Unfortunately, they don't seem to be currently supported in Clips on Twitch.

ScrubN commented 1 year ago

It looks like Twitch stores captions in a standard format. If we can find an API endpoint for fetching it, I'll do my best to implement it for VODs.

ScrubN commented 12 months ago

I have made some progress on this.

VOD captions are stored inside the video part files, which is convenient. However there is no way to tell if a given VOD contains any subtitle data without scanning every single video part, which can take quite a while. My experimenting has shown ~1.6s per video part (10s) at best when tested on https://www.twitch.tv/videos/1866410218.

I think captions scanning will need to be opt-in because of this.