# Plex Prerolls

> Open-source, self-hosted Docker app that rebuilds Plex pre-roll lists on a cron schedule by date, week, month or holiday, and auto-generates trailer-style prerolls.

- **Category:** [Plex](https://selfhost.directory/plex)
- **Source model:** Open source
- **Latest version:** 2026-03-30
- **Author:** Nate Harris
- **Platforms:** Docker, Docker Compose
- **Ports:** 8283 (HTTP endpoint for the app: Plex webhook ingestion (/recently-added) and healthcheck (/last-run-within))
- **Tags:** Webhooks, Cron, Scheduling, Media Server, Plex, Python, Holidays, Video Generation

## Docker images

- [`nwithan8/plex_prerolls`](https://hub.docker.com/r/nwithan8/plex_prerolls)

## What is Plex Prerolls?

Plex Prerolls is a Python-based service for Plex owners who want cinema-style intro videos that rotate over time. On each run (a cron-style schedule taken from its config.yaml) it decides which entries are currently active — always-on lists, date/time ranges that accept wildcards for recurring events, week-of-year and month-of-year schedules, and floating holidays resolved through the Python holidays library — and feeds the matching video paths to Plex. Extra knobs include weighting entries so some play more often, suppressing the always section for specific schedules, randomly picking a subset with count, and expanding directories of files into Plex-visible remote paths with glob patterns. It can also auto-build trailer-like prerolls for newly added library items by reacting to Plex webhooks and gathering trailer and soundtrack assets from YouTube; that feature needs a Plex Pass subscription, a YouTube cookies file for yt-dlp, and hosting the container next to Plex Media Server. Self-hosting is via Docker or the provided docker-compose file, publishing port 8283 for its webhook and healthcheck endpoints. It is Plex-only: the FAQ points Jellyfin and Emby users to those platforms' own intro plugins.

## Should you self-host Plex Prerolls?

Plex Prerolls scores **50/100** on selfhost.directory ([how scoring works](https://selfhost.directory/scoring)) and ranks **#1 of 2** in [Plex](https://selfhost.directory/plex).

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available.

Its closest alternative on selfhost.directory is [pasta](https://selfhost.directory/project/pasta) (44/100, 447 stars). Plex Prerolls scores higher overall. [See Plex Prerolls vs pasta side by side.](https://selfhost.directory/compare/pasta-vs-plex-prerolls)

## Features

- Auto-generated preroll videos
- Date range scheduling
- Dry Run Mode
- Floating holiday schedules
- Healthcheck endpoint
- Path Globbing
- Per-schedule override of always entries
- Random subset selection
- Recently-added media prerolls — Requires Plex Pass webhooks and a YouTube cookies file for yt-dlp
- Scheduled pre-roll rotation
- Weekly and monthly scheduling
- Weighted selection

## How to install Plex Prerolls

### Install Plex Prerolls with Docker

Requirements: Docker

```sh
docker run -d \
  --name=plex_prerolls \
  -p 8283:8283 \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -v /path/to/config:/ \
  -v /path/to/logs:/logs \
  -v /path/to/preroll/files:/files \
  -v /path/to/auto-generated/rolls/temp:/renders \
  -v /path/to/auto-generated/rolls/parent:/auto_rolls \
  --restart unless-stopped \
  nwithan8/plex_prerolls:latest
```

### Install Plex Prerolls with Docker Compose

```sh
docker-compose up -d
```

Note: Complete the provided docker-compose.yml file first; image nwithan8/plex_prerolls, port 8283, volumes for config, logs, preroll files, auto-generated rolls and render temp.

## FAQ

### Can this work with Emby?

No — Emby's Cinema Intros plugin has a similar video-list option, but there is currently no way to update that setting through Emby's API, so the process cannot be automated.

### Can this work with Jellyfin?

Not directly — the author recommends Jellyfin's own Intros plugin, which already replicates the rule- and schedule-based preroll functionality.

## Plex Prerolls alternatives

- [NeXroll](https://selfhost.directory/project/nexroll): Self-hosted, open-source preroll manager adding cinema-style preshows to Plex, Jellyfin, and Emby with visual sequences, scheduling, and Radarr/Sonarr trailers. (compare: https://selfhost.directory/compare/nexroll-vs-plex-prerolls)
- [dynamiX](https://selfhost.directory/project/dynamix): dynamiX automates Plex collection pinning by time blocks and seasons, plus manages seasonal pre-roll videos. Self-hosted via Docker or Python with PWA UI on port 1166. (compare: https://selfhost.directory/compare/dynamix-vs-plex-prerolls)
- [trailarr](https://selfhost.directory/project/trailarr): Trailarr is a self-hosted, open-source app that auto-downloads and manages trailers for movie/TV libraries, integrating with Radarr, Sonarr, Plex, Emby, and Jellyfin. (compare: https://selfhost.directory/compare/plex-prerolls-vs-trailarr)
- [Upcoming-Movies-TV-Shows-for-Kometa](https://selfhost.directory/project/upcoming-movies-tv-shows-for-kometa): Self-hosted tool creating Kometa overlays by checking Radarr/Sonarr for upcoming movies and TV shows, downloading trailers or creating placeholders. (compare: https://selfhost.directory/compare/plex-prerolls-vs-upcoming-movies-tv-shows-for-kometa)
- [AutoPlexx](https://selfhost.directory/project/autoplexx): AutoPlexx is a self-hosted, open-source Docker Compose stack for a complete Plex Media Server with request handling, library automation, VPN torrent downloads, monitoring (compare: https://selfhost.directory/compare/autoplexx-vs-plex-prerolls)
- [ytsync](https://selfhost.directory/project/ytsync): Self-hosted open-source tool that automatically downloads YouTube videos on a schedule with Plex/Jellyfin integration and Docker deployment. (compare: https://selfhost.directory/compare/plex-prerolls-vs-ytsync)
- [jellyplex-watched](https://selfhost.directory/project/jellyplex-watched): Self-hosted, open-source tool that syncs watched history, in-progress playback, and view dates across Plex, Jellyfin, and Emby servers. (compare: https://selfhost.directory/compare/jellyplex-watched-vs-plex-prerolls)
- [ChannelTube](https://selfhost.directory/project/channeltube): Self-hosted YouTube channel downloader using yt-dlp with scheduled syncs, format options, and Plex/Jellyfin integration. (compare: https://selfhost.directory/compare/channeltube-vs-plex-prerolls)

## More in Plex

- [Cleanarr](https://selfhost.directory/project/cleanarr): Cleanarr is a self-hosted, open-source web UI that helps Plex users find and delete duplicate media files and sample files from their Plex libraries.
- [deleterr](https://selfhost.directory/project/deleterr): Deleterr is a self-hosted, open-source tool that automatically cleans up Plex libraries by deleting unwatched or old content with smart exclusions and a grace period.
- [Kitana](https://selfhost.directory/project/kitana): Kitana is a self-hosted, open-source web frontend that exposes Plex plugin interfaces via Plex.TV authentication, making them manageable from mobile devices.
- [Ombi](https://selfhost.directory/project/ombi): Self-hosted, open-source media request tool: Plex, Emby and Jellyfin users request movies, TV and music, which get approved and handed to Sonarr or Radarr.
- [pasta](https://selfhost.directory/project/pasta): Self-hosted, browser-based Plex helper to batch-change audio and subtitle tracks for whole TV shows or single episodes, with Docker image and Unraid template.

## Links

- [Homepage](https://codeberg.org/nwithan8/plex-prerolls)
- [Plex webhooks setup guide](https://support.plex.tv/articles/115002267687-webhooks/)

---
Source: https://selfhost.directory/project/plex-prerolls