A personal media streaming service built with Next.js. Netflix-like experience for self-hosted media.
- Password-based authentication
- Auto-discovers shows/seasons/episodes from folder structure
- MKV files transcoded/remuxed to MP4 on-the-fly via ffmpeg
- Subtitle support (embedded MKV subtitles or external SRT files)
- Progress tracking with resume playback
- Continue watching on home page
- Auto-play next episode
- Mobile support
cp .env.example .envEdit .env with your settings:
AUTH_PASSWORD=your_secret_password
MEDIA_PATH=/path/to/your/media
docker compose up -dThe app will be available at http://localhost:3000
# Build and start
docker compose up -d --build
# View logs
docker compose logs -f
# Stop
docker compose down
# Rebuild after changes
docker compose up -d --build --force-recreate- Node.js 20+
- ffmpeg/ffprobe (for video transcoding)
# Ubuntu/Debian
sudo apt install ffmpeg
# macOS
brew install ffmpeg-
Install dependencies:
npm install
-
Create
.env.local:AUTH_PASSWORD=your_password MEDIA_DIR=/path/to/media -
Run development server:
npm run dev
npm run dev # Start dev server
npm run build # Production build
npm run start # Production server
npm run lint # ESLintmedia/
└── Show Name/
├── thumbnail.jpg # Show poster
└── Season 1/ # Must match "Season X" pattern
├── 01 - Episode Name.mkv # Video file
├── 01 - Episode Name.srt # Optional: external subtitles
└── 01 - Episode Name.jpg # Optional: episode thumbnail
Subtitle Priority:
- External
.srtfile (same base name as video) - Embedded subtitles in MKV (prefers English track)
| Key | Action |
|---|---|
| Space | Play/Pause |
| F | Fullscreen |
| M | Mute |
| C | Toggle captions |
| ←/→ | Seek 10s |
| ↑/↓ | Volume |
| ,/. | Subtitle sync |
- Video: MKV (H.264 remuxed, H.265/VP9/AV1 transcoded to H.264)
- Subtitles: Embedded (SRT, ASS, SSA) or external SRT
Utility scripts in tools/:
generate-thumbnails.py- Generate episode thumbnailsgenerate-subtitles.py- Auto-generate subtitlesconvert-srt-to-vtt.py- Convert SRT to VTTconvert-videos.sh- Video conversion helper