MPV Karaoke Web is a web interface for queueing and playing karaoke songs with MPV. It is designed to be used on a local network, with the server running on the machine used for song playback.
Use --help
to see the available options.
Use make
to build the server. A static build will be output to bin/mpvkaraoke
. Use Go's GOOS
and GOARCH
environment variables to cross-compile.
- Go 1.22
- Node, npm
- a-h/templ CLI
Run the server with ./bin/mpvkaraoke
. See --help
for available options.
- mpv
- yt-dlp
- imagemagick
- Create an account on ngrok and get your auth token.
- Claim a domain on ngrok.
- Create a Discord application on the Discord Developer Portal.
- Under OAuth2, add a redirect URL to
https://NGROK_DOMAIN/auth/callback
. - Copy the client ID and secret from the Discord application.
- Run the server with the required flags.
This command will start the application with the required flags, a maximum user queue of 1, and disable preemptive video caching.
mpvkaraoke \
--session-secret=SOME_SECRET \
--client-secret=DISCORD_APPLICATION_SECRET \
--client-id=DISCORD_APPLICATION_ID \
--guild-id=DISCORD_GUILD_ID \
--ngrok-domain=NGROK_DOMAIN \
--ngrok-token=NGROK_TOKEN \
--admin-role=DISCORD_ADMIN_ROLE \
--max-queue=1 \
--session-encrypt \
--disable-cache
Usage of mpvkaraoke:
-admin-role string
discord admin role
-cache string
path to video cache (default "vidcache")
-client-id string
discord client ID (required)
-client-secret string
discord client secret (required)
-db string
path to sqlite database (default "karaoke.sqlite")
-disable-cache
disable video cache
-disable-persist
disable queue persistence
-guild-id string
discord guild ID (required)
-max-queue int
maximum number of songs a user can queue (default 1)
-ngrok-domain string
ngrok domain (required)
-ngrok-token string
ngrok authtoken (required)
-no-compression
disable gzip compression
-session-encrypt
encrypt session data
-session-secret string
session secret (default "secret")
-ytdl string
path to youtube-dl (default "yt-dlp")
-ytdl-filter string
youtube-dl filter (default "bestvideo[ext=mp4][height<=1080]+bestaudio/best")