Skip to content

sstybel/chat-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Converter YouTube Live-Chat JSON file to Text file

This program converts live chat from YouTube downloaded using the yt-dlp application.

To download live chat from YouTube using the yt-dlp application, call it with the parameters --write-sub --sub-lang live_chat. The live chat will be saved in JSONL (JSON Lines) format to a file with the .json extension.

Sample execution of the yt-dlp.exe application downloading a YouTube recording with the best available video and audio quality and live chat:

yt-dlp.exe -f "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b" --extractor-args "youtube:player-client=default,-tv_simply" --write-sub --sub-lang live_chat https://link_to_the_youtube_video/

In this repository, I've included sample PowerShell code (yt-down.ps1) that downloads a YouTube recording along with a live chat saved in JSON (.json) format and converts it to a text file (.txt).

Usage: chat-converter.exe [--json JSON] [--output OUTPUT] [--print] [--add-line-number] [--help | -h]`

Options:

  • --json JSON - Input JSON Chat file or auto to select first JSON file in current directory
  • --output OUTPUT - Output text Chat file or auto to create output file with same name as input file and add .txt extension
  • --print - Print Chat messages to console
  • --add-line-number - Add line numbers to each message in output file and console output
  • --help, -h - Show this help message and exit

Copyright © 2025 - 2026 by Sebastian Stybel, www.BONO.Edu.PL