twitch-dl chat video
Render twitch chat as video
Additional dependencies
This command requires twitch-dl to be installed with optional "chat" dependencies:
pipx install "twitch-dl[chat]"
It is not available if twitch-dl is used from the pyz archive.
USAGE
twitch-dl chat video [OPTIONS] ID
OPTIONS
| -w, --width INTEGER | Chat width in pixels [default: 400] |
| -h, --height INTEGER | Chat height in pixels [default: 1080] |
| --font-size INTEGER | Font size [default: 20] |
| --dark | Dark mode |
| --pad-x INTEGER | Horizontal padding [default: 5] |
| --pad-y INTEGER | Vertical padding [default: 5] |
| -o, --output TEXT | Output file name template. See docs for details. [default: chat_{id}_{title_slug}.{format}] |
| -f, --format TEXT | Video format to convert into, passed to ffmpeg as the target file extension. [default: mp4] |
| -i, --image-format TEXT | Image format used to render individual frames, bmp (default) is fast but consumes a lot of space. You can switch to png to conserve space at cost of speed. [default: bmp] |
| --overwrite | Overwrite the target file if it already exists without prompting. |
| -k, --keep | Don't delete the generated intermediate frame images. |
| --no-join | Don't run ffmpeg to join the generated frames, implies --keep. |
Example
Here's an example how you can join a twitch stream with its chat in a single video.
First download the video in the desired quality:
twitch-dl download -q 1080p 2237172069 -o video.mp4
Render the chat with the same height as the downloaded video:
twitch-dl chat --dark --width 500 --height 1080 2237172069 -o chat.mp4
Stitch them togheter using ffmpeg:
ffmpeg -i video.mp4 -i chat.mp4 -filter_complex hstack=inputs=2 chat_with_video.mp4