SubChat is a command-line and GUI toolset for generating YouTube subtitles from chat logs.
IMPORTANT: Currently, only YouTube in desktop browsers is supported.
Chat on this screenshot was created entirely using YouTube subtitles.
Screenshot from Tsoding stream.
The project has two separate targets:
-
config_generator_gui: A GUI tool for creating and editing INI config files used by the subtitle generator.
System Dependencies: OpenGL, GLEWUses Submodules: GLFW, Dear ImGui, TinyXML2, SimpleIni, Magic Enum, UTFCPP, nativefiledialog-extended.
-
subtitles_generator: A CLI tool that converts CSV chat logs into subtitle files (YTT/SRV3) using a given config file.
Uses Submodules: CLI11, TinyXML2, SimpleIni, Magic Enum, UTFCPP.
The input CSV file must follow this schema:
time,user_name,user_color,message
Where:
time
: Timestamp when the message was sent (in milliseconds or seconds, see-u
flag)user_name
: The display name of the user who sent the messageuser_color
: Hex color code for the username (e.g.,#FF0000
for red)message
: The actual chat message content
Example CSV:
time,user_name,user_color,message
1234567,User1,#FF0000,"Hello world!"
1235000,User2,,"Hi there!"
1240000,User1,#FF0000,"How are you?"
For example, you can download chat from Twitch VOD using https://www.twitchchatdownloader.com/
Clone the repository recursively to fetch all submodules:
git clone --recursive --shallow-submodules https://github.com/Kam1k4dze/SubChat
If already cloned without submodules:
git submodule update --init --recursive
The project uses CMake (minimum required version 3.14) and is set up to build both targets. Note that OpenGL and GLEW are only needed for the GUI target.
-
Create a build directory and navigate into it:
mkdir build && cd build
-
Configure the project:
cmake ..
-
Build everything:
cmake --build .
If you only need the CLI tool and don't have OpenGL/GLEW installed:
cmake -DBUILD_GUI=OFF ..
cmake --build .
Launch this tool to generate or modify INI config files:
./config_generator_gui
Convert a chat CSV into a subtitle file using a config file.
./subtitles_generator -c <config_path> -i <chat_csv_path> -o <output_file> -u <time_unit>
-
-h, --help
Display help information and exit. -
-c, --config
Path to the INI config file. -
-i, --input
Path to the CSV file with chat data. -
-o, --output
Output subtitle file (e.g.,output.ytt
oroutput.srv3
). -
-u, --time-unit
Time unit in the CSV:"ms"
or"sec"
.