Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ihabunek committed Sep 1, 2024
1 parent 4b4a13a commit 696c3f2
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 3 deletions.
5 changes: 5 additions & 0 deletions book.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ td.code {
white-space: nowrap;
}

.callout {
border: 1px solid gray;
padding: 0.5rem 1rem;
}

/* Override max width */
.searchbar-outer,
.searchresults-outer,
Expand Down
7 changes: 4 additions & 3 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

- [Installation](installation.md)
- [Usage](usage.md)
- [twitch-dl download](commands/download.md)
- [twitch-dl videos](commands/videos.md)
- [twitch-dl chat](commands/chat.md)
- [twitch-dl clips](commands/clips.md)
- [twitch-dl info](commands/info.md)
- [twitch-dl download](commands/download.md)
- [twitch-dl env](commands/env.md)
- [twitch-dl info](commands/info.md)
- [twitch-dl videos](commands/videos.md)
- [Environemnt variables](environment_variables.md)
- [Shell completion](shell_completion.md)
- [Advanced](advanced.md)
Expand Down
74 changes: 74 additions & 0 deletions docs/commands/chat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<!-- ------------------- generated docs start ------------------- -->
# twitch-dl chat

Render chat for a given video (experimental)

### USAGE

```
twitch-dl chat [OPTIONS] ID
```

### OPTIONS

<table>
<tbody>
<tr>
<td class="code">-w, --width INTEGER</td>
<td>Chat width in pixels [default: <code>400</code>]</td>
</tr>

<tr>
<td class="code">-h, --height INTEGER</td>
<td>Chat height in pixels [default: <code>1024</code>]</td>
</tr>

<tr>
<td class="code">--font-size INTEGER</td>
<td>Font size [default: <code>20</code>]</td>
</tr>

<tr>
<td class="code">--dark</td>
<td>Dark mode</td>
</tr>

<tr>
<td class="code">--pad-x INTEGER</td>
<td>Horizontal padding [default: <code>5</code>]</td>
</tr>

<tr>
<td class="code">--pad-y INTEGER</td>
<td>Vertical padding [default: <code>5</code>]</td>
</tr>
</tbody>
</table>

<!-- ------------------- generated docs end ------------------- -->

<h2>Experimental</h2>

This command is experimetnal and may change in the future!

<h2>Rendering video with chat</h2>

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:

```sh
twitch-dl download -q 1080p 2237172069 -o video.mp4
```

Render the chat with the same height as the downloaded video:

```sh
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
```

0 comments on commit 696c3f2

Please sign in to comment.