gitmyhub

LunaTV

TypeScript ★ 8.9k updated 24d ago

本项目采用 CC BY-NC-SA 协议,禁止任何商业化行为,任何衍生项目必须保留本项目地址并以相同协议开源

A self-hosted web app you run on your own server that searches across multiple video streaming APIs at once and plays them back in a single interface. No subscription required, you bring your own video source URLs.

TypeScriptNext.jsTailwind CSSDockerHLS.jsArtPlayerRedissetup: moderatecomplexity 3/5

MoonTV (also called LunaTV in the repository) is a self-hosted video streaming aggregator you can run on your own server. It is built with Next.js 14, TypeScript, and Tailwind CSS, and deployed via Docker. The idea is to give you a single interface that searches across multiple third-party video source APIs at once and plays back what they return, rather than relying on any one streaming service.

After you deploy it, the application starts as an empty shell. It has no built-in video sources. You supply those yourself by writing a JSON configuration file in the admin panel that lists the APIs of video sites you want to aggregate. The app uses a standard format called Apple CMS V10, which many Chinese video indexing sites support, so compatible source URLs can be added in the config. You can also define custom content categories and set how long API responses are cached.

Playback uses ArtPlayer combined with HLS.js for adaptive streaming. The app supports favorites, watch history, and a continue-watching feature. Progress syncs across devices and is stored in a database you choose: Kvrocks, Redis, or Upstash. There is also an experimental feature that attempts to automatically skip advertisements embedded in video streams.

The interface is responsive: on desktop it shows a sidebar, on mobile it switches to a bottom navigation bar. It supports PWA installation, meaning users on mobile can add it to their home screen and get a native-app-like experience with offline caching.

Deployment is Docker-only. You can run it with a simple docker-compose file pairing the app container with a storage container. A one-click deploy option on the Zeabur cloud platform is also available. The project is licensed under CC BY-NC-SA, which prohibits commercial use and requires attribution and the same license on any derivative projects.

Where it fits