OpenFlix is an open-source media server with Live TV/IPTV and DVR capabilities. It provides a complete self-hosted streaming solution with native clients for Android TV, Apple TV, and a Go-powered backend.
openflix/
├── android-native/ # Native Android/Android TV app (Kotlin/Compose)
├── OpenFlix-tvOS/ # Native tvOS/Apple TV app (Swift/SwiftUI)
├── server/ # Go backend server
│ ├── cmd/server/ # Server entrypoint
│ ├── web/ # React web admin interface
│ └── internal/ # Server modules
│ ├── api/ # HTTP handlers
│ ├── auth/ # JWT authentication
│ ├── db/ # Database layer
│ ├── library/ # Media scanning
│ ├── metadata/ # TMDB/TVDB agents
│ ├── livetv/ # M3U, EPG, channels
│ ├── dvr/ # Recording engine
│ └── transcode/ # FFmpeg wrapper
└── assets/ # Shared assets
- Plex-compatible API endpoints
- Media library scanning and metadata fetching (TMDB/TVDB)
- Multi-user authentication with profiles
- Live TV / IPTV support (M3U playlists, XMLTV EPG)
- DVR recording with scheduling
- Series recording rules
- Commercial detection (Comskip integration)
- Hardware-accelerated transcoding (FFmpeg)
- Web-based admin interface
- Native Kotlin with Jetpack Compose for TV
- Hero carousel with auto-rotation and TMDB trailers
- Genre-based content discovery
- MPV-powered video playback (HEVC, AV1, VP9, Dolby Vision)
- Live TV guide with EPG grid
- Channel surfing with instant switch
- DVR management and playback
- Subtitle support (ASS/SSA)
- D-pad optimized navigation
- Native Swift with SwiftUI
- Hero carousel with featured content
- Genre hub sections
- AVPlayer with custom overlay controls
- Live TV with EPG and channel surfing
- DVR playback with commercial skip
- Siri Remote optimized
- Go 1.21+ (for server)
- Android Studio (for Android TV app)
- Xcode 15+ (for Apple TV app)
- FFmpeg (for transcoding)
- Comskip (optional, for commercial detection)
cd server
# Copy and configure
cp config.yaml.example config.yaml
# Edit config.yaml with your settings
# Build and run
go build -o openflix-server ./cmd/server
./openflix-serverThe server runs on http://localhost:32400 by default.
cd android-native
# Build debug APK
./gradlew assembleDebug
# Install to device
adb install app/build/outputs/apk/debug/app-debug.apkcd OpenFlix-tvOS
# Open in Xcode
open OpenFlix.xcodeproj
# Build and run on Apple TV simulator or devicecd server
docker build -t openflix-server .
docker run -p 32400:32400 -v ~/.openflix:/data openflix-serverSee server/config.yaml.example for all configuration options:
server:
port: 32400
host: "0.0.0.0"
database:
path: "~/.openflix/openflix.db"
media:
libraries:
- name: "Movies"
path: "/media/movies"
type: "movie"
- name: "TV Shows"
path: "/media/tv"
type: "show"
livetv:
m3u_sources:
- name: "IPTV"
url: "http://example.com/playlist.m3u"
epg_sources:
- url: "http://example.com/epg.xml"
dvr:
storage_path: "/recordings"
comskip_path: "/usr/local/bin/comskip"POST /auth/register- Register new userPOST /auth/login- LoginGET /api/user- Get current user
GET /library/sections- List librariesGET /library/sections/{id}/all- Library contentGET /library/metadata/{key}- Item detailsGET /hubs/search- Global search
GET /livetv/channels- List channelsGET /livetv/guide- EPG gridGET /livetv/now- Currently playingPOST /livetv/sources- Add M3U source
GET /dvr/recordings- List recordingsPOST /dvr/recordings- Schedule recordingGET /dvr/recordings/{id}/commercials- Commercial segmentsGET /dvr/stream/{id}- Stream recording
cd server
go build ./...
go test ./...cd android-native
./gradlew build
./gradlew testcd OpenFlix-tvOS
xcodebuild -scheme OpenFlix -destination 'platform=tvOS Simulator,name=Apple TV'cd server
CGO_ENABLED=0 go build -o openflix-server ./cmd/servercd android-native
./gradlew assembleReleaseBuild via Xcode with Release configuration or:
xcodebuild -scheme OpenFlix -configuration Release archive- Built with Kotlin, Swift, and Go
- Android playback powered by MPV
- Apple TV playback via AVPlayer
- Commercial detection by Comskip
- Metadata from TMDB
MIT License - see LICENSE for details.