Jellyfin with pre-transcode plugin — auto-transcodes next episodes for instant playback
336
A Jellyfin plugin that automatically pre-transcodes the next episode when you reach the credits, so it starts playing instantly with zero buffering delay.
Credits Detection — When you're watching a TV episode, the plugin monitors your playback position. It detects credits using chapter markers (if available) or a configurable time threshold (default: 90% of runtime).
Next Episode Resolution — Once credits are detected, the plugin finds the next episode in the series, handling season boundaries automatically.
Background Transcoding — The next episode is transcoded in the background using FFmpeg at below-normal CPU priority, so it doesn't impact your current stream.
Direct-Play Injection — The cached MP4 is registered as a direct-play media source via Jellyfin's IMediaSourceProvider API. The client sees it as the preferred source and plays it instantly with zero transcode delay.
Seamless Resume — When the cached segment ends, the client resumes from the original source at the correct position. Jellyfin transcodes from that point forward with -ss seeking.
Use the pre-built Jellyfin image with the plugin included:
docker pull salmutt/jellyfin-pretranscode:latest
Or in a docker-compose.yml:
services:
jellyfin:
image: salmutt/jellyfin-pretranscode:latest
ports:
- 8096:8096
volumes:
- ./config:/config
- ./media:/media
restart: unless-stopped
Jellyfin.Plugin.PreTranscode.dll from the releases page<jellyfin-data>/plugins/PreTranscode/git clone https://github.com/SalMutt/jellyfin-pretranscode.git
cd jellyfin-pretranscode
dotnet build Jellyfin.Plugin.PreTranscode -c Release
cp Jellyfin.Plugin.PreTranscode/bin/Release/net9.0/Jellyfin.Plugin.PreTranscode.dll \
<jellyfin-data>/plugins/PreTranscode/
After installation, go to Dashboard > Plugins > Pre-Transcode in the Jellyfin web UI.
| Setting | Default | Description |
|---|---|---|
| Enable Pre-Transcoding | On | Master toggle for the plugin |
| Credits Threshold (%) | 90 | Fallback percentage of runtime to trigger credits detection |
| Pre-Transcode Duration | 5 min | How many minutes of the next episode to pre-transcode |
| Max Concurrent Jobs | 1 | Maximum simultaneous background transcodes |
| Max Cache Size | 10 GB | Disk space limit for cached transcodes |
| Cache Directory | (auto) | Custom cache path (defaults to Jellyfin's cache folder) |
| Enable Direct-Play Injection | On | Serve cached files as direct-play sources for instant playback |
| Skip Watched Episodes | Off | Skip pre-transcoding episodes you've already watched |
The plugin exposes REST endpoints for monitoring and management:
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/PreTranscode/Status | GET | User | Active jobs, queue size, cache stats |
/PreTranscode/Queue | GET | User | Detailed active and queued job list |
/PreTranscode/Health | GET | User | Health check for monitoring |
/PreTranscode/Cache | DELETE | Admin | Clear the entire cache |
/PreTranscode/Cache/{episodeId} | DELETE | Admin | Remove a specific episode from cache |
# Build
dotnet build
# Run tests
dotnet test
# Publish release
dotnet publish Jellyfin.Plugin.PreTranscode -c Release
Apache License 2.0. See LICENSE for details.
Content type
Image
Digest
sha256:51ef2e8fc…
Size
659.6 MB
Last updated
7 months ago
docker pull salmutt/jellyfin-pretranscode