Twitch Chat To Subtitles converts a Twitch chat JSON file to SubRip .srt subtitles file or Advanced Sub Station Alpha .ass subtitles file.
The program provides 3 types of subtitles and one text file:
- Regular Subtitles. Chat messages will appear at the center-bottom of the screen.
- Rolling Chat Subtitles. Chat messages will roll vertically across the screen and then disappear. Past chat messages won't clutter the screen.
- Static Chat Subtitles. Chat messages are added to the previous chat messages and remain there. Similar to what Twitch chat does.
- Chat Text File. Save Twitch chat to a text file.
The program uses ASSA override tags extensively. ASSA override tags are what allows the program to position the subtitles at different locations on the screen. If the program writes subtitles with ASSA override tags, it will also underline moderators and URL links.
ASSA override tags are not part of the SubRip specification but some media players can read ASSA override tags from a SubRip file. The program was tested successfully with MPC-HC. On the other hand, VLC ignores ASSA override tags in a SubRip file. In that case, you can write Subtitles Without ASSA Override Tags, or simply write Advanced Sub Station Alpha .ass file.
If MPC-HC doesn't display properly subtitles from an Advanced Sub Station Alpha .ass subtitles file, for example semi-transparent backgrounds are not displayed, enable Use libass for SSA/ASS in MPC-HC. This option is located at View -> Options -> Subtitles -> Default Style -> Use libass for SSA/ASS.
The program is provided both as Command Line (TwitchChatToSubtitles) and as UI (TwitchChatToSubtitlesUI).
Twitch Chat To Subtitles requires .NET 8 Runtime.
Twitch Chat To Subtitles doesn't download the JSON file itself, the JSON file must be retrieved beforehand. There are a few programs for downloading Twitch chat JSON file. Twitch Downloader seems to be the best choice to start with.
- Twitch Downloader. Has GUI and CLI. Supports Windows, Linux & Mac.
- Chrome Extension Twitch Chat Downloader. Make sure to download the .json file, not the .csv file.
- RechatTool. Command line tool to download the chat log from a Twitch VOD.
- Chat Downloader. Command line tool, in Python, used to retrieve chat messages.
Chat messages will appear at the center-bottom of the screen.
TwitchChatToSubtitles --RegularSubtitles
--JsonFile <file>
[--ass]
[--BoldText]
[--ColorUserNames]
[--RemoveEmoticonNames]
[--SemiTransparentDarkBackground]
[--SemiTransparentLightBackground]
[--ShowTimestamps]
[--SubtitleShowDuration <seconds>]
[--SubtitlesFontSize <font size>]
[--TextColor <color>]
[--TimeOffset <seconds>]The following subset of options create a subtitles file without any ASSA override tags.
TwitchChatToSubtitles --RegularSubtitles
--JsonFile <file>
[--RemoveEmoticonNames]
[--SubtitleShowDuration <seconds>]
[--TimeOffset <seconds>]- Default usage:
TwitchChatToSubtitles --RegularSubtitles --JsonFile "C:\Path\To\Twitch Chat.json"- Color user names, remove emoticon names, font size
Medium, subtitles will use ASSA override tags:
TwitchChatToSubtitles --RegularSubtitles --JsonFile "C:\Path\To\Twitch Chat.json" --ColorUserNames --RemoveEmoticonNames --SubtitlesFontSize MediumChat messages will roll vertically across the screen and then disappear. Past chat messages won't clutter the screen.
TwitchChatToSubtitles --RollingChatSubtitles
--JsonFile <file>
[--ass]
[--BoldText]
[--ColorUserNames]
[--RemoveEmoticonNames]
[--SemiTransparentDarkBackground]
[--SemiTransparentLightBackground]
[--ShowTimestamps]
[--SubtitlesFontSize <font size>]
[--SubtitlesLocation <location>]
[--SubtitlesRollingDirection <rolling direction>]
[--SubtitlesSpeed <speed>]
[--TextColor <color>]
[--TimeOffset <seconds>]- Default usage:
TwitchChatToSubtitles --RollingChatSubtitles --JsonFile "C:\Path\To\Twitch Chat.json"- Color user names, remove emoticon names, font size
Medium, subtitles location will default to wholeLeftside of the screen:
TwitchChatToSubtitles --RollingChatSubtitles --JsonFile "C:\Path\To\Twitch Chat.json" --ColorUserNames --RemoveEmoticonNames --SubtitlesFontSize Medium- Subtitles will roll faster than regular speed and will appear on the right side and top half of the screen:
TwitchChatToSubtitles --RollingChatSubtitles --JsonFile "C:\Path\To\Twitch Chat.json" --SubtitlesLocation RightTopHalf --SubtitlesSpeed Speed2Chat messages are added to the previous chat messages and remain there. Similar to what Twitch chat does.
TwitchChatToSubtitles --StaticChatSubtitles
--JsonFile <file>
[--ass]
[--BoldText]
[--ColorUserNames]
[--RemoveEmoticonNames]
[--SemiTransparentDarkBackground]
[--SemiTransparentLightBackground]
[--ShowTimestamps]
[--SubtitlesFontSize <font size>]
[--SubtitlesLocation <location>]
[--SubtitlesRollingDirection <rolling direction>]
[--TextColor <color>]
[--TimeOffset <seconds>]- Default usage:
TwitchChatToSubtitles --StaticChatSubtitles --JsonFile "C:\Path\To\Twitch Chat.json"- Color user names, remove emoticon names, font size
Medium, subtitles location will default to wholeLeftside of the screen:
TwitchChatToSubtitles --StaticChatSubtitles --JsonFile "C:\Path\To\Twitch Chat.json" --ColorUserNames --RemoveEmoticonNames --SubtitlesFontSize Medium- Subtitles will appear on the left side and top two-thirds of the screen:
TwitchChatToSubtitles --StaticChatSubtitles --JsonFile "C:\Path\To\Twitch Chat.json" --SubtitlesLocation LeftTopTwoThirdsSave Twitch chat to a text file. In the text file, "[M]" before the user name indicates a moderator.
TwitchChatToSubtitles --ChatTextFile
--JsonFile <file>
[--RemoveEmoticonNames]
[--ShowTimestamps]- Default usage:
TwitchChatToSubtitles --ChatTextFile --JsonFile "C:\Path\To\Twitch Chat.json"- Remove emoticon names, show chat message timestamps:
TwitchChatToSubtitles --ChatTextFile --JsonFile "C:\Path\To\Twitch Chat.json" --RemoveEmoticonNames --ShowTimestampsThese options select which subtitles type to convert the Twitch chat JSON file to.
--RegularSubtitles Convert Twitch chat to regular subtitles.
--RollingChatSubtitles Convert Twitch chat to rolling chat subtitles.
--StaticChatSubtitles Convert Twitch chat to static chat subtitles.
--ChatTextFile Save Twitch chat to a text file.The full path to the Twitch chat JSON file. The name of the subtitles file is the same as the name of the JSON file with .srt extension.
--JsonFile Path to Twitch chat JSON file.Write .ass subtitles file instead of .srt subtitles file.
--ass Whether to write Advanced Sub Station Alpha (.ass) file.This option displays the subtitles text in bold font.
--BoldText Whether the font of the subtitles text is bold.Users, who post in Twitch chat, have an assigned color to their name. This option colors the name of the users across all subtitles, both the title and the body of chat messages. If a user doesn't have an assigned color, it will be colored with Twitch's purple color.
--ColorUserNames Whether to color user names.SubRip specification doesn't support displaying images. As a result of that, emoticons are written by their name in the chat message. This option removes the emoticon and badge names from chat messages.
If you are downloading chat JSON file using Twitch Downloader, I suggest to check the boxes "Embed Images" and all the "3rd Party Emotes" boxes. Twitch Chat To Subtitles retrieves the names of the emoticon and badge names from the list of embed emoticons in the JSON file.
--RemoveEmoticonNames Remove emoticon and badge names.These options display the subtitles text with a semi-transparent background. These options are applicable only when ass is enabled.
--SemiTransparentDarkBackground Whether to overlay a semi-transparent dark
background around the subtitles text.
--SemiTransparentLightBackground Whether to overlay a semi-transparent light
background around the subtitles text.This option displays the timestamp of when the chat message was posted in chat.
--ShowTimestamps Whether to show chat message timestamps.This option is applicable only for RegularSubtitles. A chat message has a timestamp of when it was posted in chat. This timestamp determines when it is going to be shown as a regular subtitle and this option determines how long the subtitle will be visible on screen. The default is 5 seconds.
--SubtitleShowDuration (Default: 5) For how long a subtitle is visible
on the screen, in seconds.The font size of the subtitles. If the options is not specified, RollingChatSubtitles and StaticChatSubtitles will default to Regular font size and for RegularSubtitles, the font size will be determined by the media player. The larger font sizes are suitable for viewing on a TV screen rather than a computer screen.
--SubtitlesFontSize The font size of the subtitles.
Valid values: Regular, Medium, Large, XL, 2XL, 3XL, 4XL, 5XL.This option determines where the subtitles are displayed on the screen. This option is applicable only for RollingChatSubtitles and StaticChatSubtitles.
--SubtitlesLocation The location of the subtitles on the screen.
Valid values: Left, LeftTopHalf, LeftBottomHalf,
LeftTopTwoThirds,LeftBottomTwoThirds, Right, RightTopHalf,
RightBottomHalf,RightTopTwoThirds, RightBottomTwoThirds.This option determines the direction that the subtitles roll from the bottom to the top of the screen or from the top to the bottom of the screen. This option is applicable for RollingChatSubtitles and StaticChatSubtitles. If not specified, it will default to BottomToTop direction.
--SubtitlesRollingDirection The direction that the subtitles roll.
Valid values: BottomToTop, TopToBottom.This option determines the speed of the subtitles rolling vertically across the screen, in milliseconds. This option is applicable only for RollingChatSubtitles. If not specified, it will default to Speed1. When the chat is blasted with messages by viewers, the higher speeds are more suitable for showing the messages at the right time. Slower speeds will cause a time drift where the messages will appear later than their actual posted time in chat. The higher the speed number, the faster the speed:
- Speed1 = 1 second
- Speed2 = 0.5 second
- Speed3 = 250 ms
- Speed4 = 200 ms
- Speed5 = 125 ms
- Speed6 = 100 ms
- Speed7 = 50 ms
--SubtitlesSpeed How fast the subtitles roll.
Valid values: Speed1, Speed2, Speed3, Speed4, Speed5,
Speed6, Speed7.This option determines the color of the subtitles text. If not specified, the color will be determined by the media player's default text color. Valid color values are hex format (#000000) or known names (Black).
--TextColor The color of the subtitles text.This option shifts the timing of all the subtitles. This option is applicable for all subtitles types but very useful for RegularSubtitles. For RegularSubtitles, the subtitles are visible only for a few seconds and then disappear. A Twitch streamer is more likely to interact with a chat message as it passes around the mid point of the chat, not when it first appears at the bottom of the chat. By adding a few seconds (3-7 seconds), the subtitles will appear closer in time to when the Twitch streamer has read and responded to it.
--TimeOffset Time offset for all subtitles, in seconds.