ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.15k stars 10.02k forks source link

Twitch.tv chat log download #11524

Closed Rosuav closed 7 years ago

Rosuav commented 7 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.12.22. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


Description of your issue, suggested solution and other information

Twitch.tv now records the (text) chat alongside videos. I would like to be able to download a video and have the chat as some form of associated download - maybe subtitles or other annotations. A couple of examples:

https://www.twitch.tv/cookingfornoobs/v/83226931 - a short clip (made by the broadcaster; clips made by viewers don't have associated chat) https://www.twitch.tv/lilbumblebear/v/109190561 - a full-length VOD (will eventually expire, presumably making this a dead link)

Chat emotes might be a bit problematic. I'm okay with them being included either way - in their textual form ("noobsLove"), or as links (https://static-cdn.jtvnw.net/emoticons/v1/109023/1.0).

Rosuav commented 7 years ago

Wow! You are FAST! Thank you!

Emotes come out in their text form ("noobsLove") and in a mapping {"77681":[[0,9]]}. I've no idea what that part means, but I can run with the text. Much appreciated!

Gorrrg commented 7 years ago

So how do I get the chat now? I'm totally confused. When I download a Twitch VoD there is no chat to be found and there's no reference to any option in the README either.

yan12125 commented 7 years ago

@Gorrrg Chat messages are available as subtitles. See https://github.com/rg3/youtube-dl/blob/master/README.md#subtitle-options

Gorrrg commented 7 years ago

Ah, I tried that out. But it seems it only download the first few messages. I remember something about the Twitch API only offering 5 second chunks of chat messages per request.

EDIT: it's a 30 second window https://discuss.dev.twitch.tv/t/getting-chat-replay-transcript/5295

yan12125 commented 7 years ago

Could you open a new issue for incomplete messages?

Gorrrg commented 7 years ago

Yep, I will.