Skip to content

koshkokoshka/yt-dlp-chat-to-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yt-dlp - Live Chat JSON to MP4 Video

Converts .live_chat.json from yt-dlp to .mp4 video for overlaying live chats over recorded streams.


screenshot_1 screenshot_2

How to use

  1. Install Node.js

  2. Install FFmpeg
    (For Windows users: download ffmpeg.exe and place it next to the script file)

  3. Install dependencies

    npm install
  4. Download the YouTube stream with live chat replay using yt-dlp:

    yt-dlp --live-from-start --write-subs https://www.youtube.com/watch?v=CqnNp8kwE78
  5. After the stream download completes, a video_id.live_chat.json file will appear in the directory.
    Pass this file to the script:

    node ./chat-to-video.js video_id.live_chat.json

    When conversion is complete, the result will be in the output.mp4 file

Command line arguments

node ./chat-to-video.js [OPTIONS] video_id.live_chat.json -o output.mp4

Options

  • -o output.mp4 --output output.mp4 - Output filename
  • --width 385 - Video width
  • --height 400 - Video height
  • --frame-rate 10 - Video framerate
  • --font 'bold 16pt Arial' - Chat font
  • --background-color '#000000' - Chat background color
  • --author-color '#aaaaaa' - Author name color
  • --message-color '#ffffff' - Message text color
  • --from 0 - Start time in seconds
  • --to 60 - End time in seconds
  • --no-avatars - Skip downloading user avatars

About

Converts .live_chat.json to .mp4 video

Topics

Resources

Stars

Watchers

Forks