Server plugin to extract a direct URL to a YouTube video using the yt-dlp library.
  • TypeScript 87.5%
  • JavaScript 12.5%
Find a file
2026-04-06 01:12:12 +03:00
dist Fix npm audit 2026-02-08 00:53:36 +02:00
src Add comments, clear caches on exit 2025-06-02 11:08:28 +03:00
.eslintrc.js Fix links. Add eslint 2024-04-28 15:47:17 +03:00
.gitignore Initial commit 2024-04-26 00:55:09 +03:00
LICENSE Initial commit 2024-04-26 00:55:09 +03:00
package-lock.json Fix npm audit 2026-04-06 01:12:12 +03:00
package.json Fix npm audit 2026-01-02 19:44:03 +02:00
README.md Update readme 2024-04-28 16:19:34 +03:00
tsconfig.json Initial commit 2024-04-26 00:55:09 +03:00
webpack.config.js Initial commit 2024-04-26 00:55:09 +03:00

SillyTavern YouTube Player

Also check out a companion UI extension! SillyTavern-YouTube-Videos-UI

Server plugin to extract a direct URL to a YouTube video using the yt-dlp library.

How to use

Tip

Both endpoints also support providing the URL as a query parameter.

Video URL

Send a message containing a video element with the source URL pre-wrapped with /api/plugins/youtube/play/.

For example

<video src="/api/plugins/youtube/play/https://youtu.be/zFfL0y3zyfc" autoplay controls></video>

Video info

Query the GET /api/plugins/youtube/info/ endpoint to fetch the video info.

interface VideoInfo {
    id: string;
    title: string;
    url: string;
    thumbnail: string;
    duration: number;
    description: string;
    uploader: string;
    view_count: number;
    upload_date: string;
}

Example: GET /api/plugins/youtube/info/https://youtu.be/zFfL0y3zyfc.

How to install

  1. Before you begin, make sure you set a config enableServerPlugins to true in the config.yaml file of SillyTavern.

  2. Open a terminal in your SillyTavern directory, then run the following:

cd plugins
git clone https://github.com/SillyTavern/SillyTavern-YouTube-Videos-Server
  1. Restart the SillyTavern server. The yt-dlp binary will be automatically downloaded from GitHub when you start the first video.

How to build

Clone the repository, then run npm install.

# Debug build
npm run build:dev
# Prod build
npm run build

License

AGPLv3