Skip to content

oxan/home-assistant-mpv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpv integration for Home Assistant

hacs_badge

An Home Assistant Media Player integration for the mpv media player, using mpv's JSON IPC API.

Setup

Installation

The integration can be installed by adding it as a custom repository to HACS. In Home Assistant, navigate to HACS > Integrations > Custom repositories (in the top-right menu). Under Repository enter oxan/home-assistant-mpv, and under Category select Integration. The integration should now appear in HACS.

Configuration

Start mpv with the input-ipc-server option set to the socket location:

$ mpv --input-ipc-server=/path/to/mpv-socket

Configure the location of the socket in Home Assistant:

media_player:
  - platform: mpv
    server:
      path: /path/to/mpv-socket

Restart Home Assistant and enjoy!

Playback using local paths

When starting playback through Home Assistant, by default it will stream all media through its own HTTP server. If mpv and Home Assistant can access the media files using the same filesystem path, you can disable this and play media directly from the filesystem. This reduces resource usage and allows mpv to find external subtitle files.

media_player:
  - platform: mpv
    server:
      path: /path/to/mpv-socket
    proxy_media: false