Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clip-maker

CLI that clips ~the last 30 seconds of a live Twitch streamer, downloads the mp4, and optionally extracts the audio to mp3.

Requirements

Setup

  1. Register an app at https://dev.twitch.tv/console/apps with redirect URI http://localhost:3000/callback.
  2. Copy .env.example to .env and fill in TWITCH_CLIENT_ID and TWITCH_CLIENT_SECRET.
  3. bun install

Usage

bun run src/cli.ts <streamer> [--mp3] [--out ./clips]

First run opens a browser to authorize (token cached at ~/.config/clip-maker/tokens.json and auto-refreshed thereafter).

Build a standalone binary

bun run build
./clip-maker <streamer> --mp3

The binary bundles the Bun runtime but NOT yt-dlp/ffmpeg, which must still be installed on the target machine.

Notes

  • Twitch decides clip length (~25-30s); duration is not caller-settable.
  • The channel must be live at the moment you run the command.

About

Creates clip of the given twitch streamer of the past ~30 secs and downloads the clip, optionally rips audio to mp3

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages