> For the complete documentation index, see [llms.txt](https://bkbilly.gitbook.io/lnxlink/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bkbilly.gitbook.io/lnxlink/media-player.md).

# Media Player

Control your media

**Note:** Home Assistant does not natively support MQTT integration for media players, so a custom add-on must be installed. Using **HACS**, you can install the **MQTT Media Player** integration to create a new `media_player` entity.

[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://858267164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa87mi2W2CjR0hW4euEf2%2Fuploads%2Fs5Rlmr9csbLquGOr2Uek%2Fhacs_repository.svg?alt=media\&token=5d74cb39-a4b2-4a60-af00-ab41ae304eed)](https://my.home-assistant.io/redirect/hacs_repository/?owner=bkbilly\&repository=mqtt_media_player\&category=integration)

After installation, restart your Home Assistant instance and add the MQTT Media Player integration from the **Devices & Services** page. You can find the correct input name by checking the **LNXlink** logs.

<div align="left"><figure><img src="https://858267164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa87mi2W2CjR0hW4euEf2%2Fuploads%2FH4jhdCgRxzdA15FS7Dyi%2FScreenshot%20from%202024-10-05%2017-11-02.png?alt=media&amp;token=229b73d5-0cfa-4b25-9fe9-c8022f4475e1" alt=""><figcaption></figcaption></figure></div>

This setup supports playing both local and remote media using one of the following backends: `cvlc`, `gst-play-1.0`, `ffplay`, `mpv`, or `vlc` — make sure at least one of these is installed on your system.

<div align="left"><figure><img src="https://858267164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa87mi2W2CjR0hW4euEf2%2Fuploads%2Fy2gyymBsb3QB5enYq6d9%2Fimage.png?alt=media&amp;token=3689afe4-d181-4e64-9f05-cf7b112ed8e1" alt="" width="449"><figcaption></figcaption></figure></div>

### Text To Speech

```yaml
service: tts.google_say
data:
  entity_id: media_player.desktop_linux
  message: Hello world!
```

### Play Media

```yaml
service: media_player.play_media
data:
  media_content_id: /home/user/imag.jpg
  media_content_type: media  # Not used, but required by home assistant
target:
  entity_id: media_player.desktop_linux
```

### Stream Camera

```yaml
service: camera.play_stream
data:
  media_player: media_player.desktop_linux
target:
  entity_id: camera.demo_camera
```

### Volume change by a predefined step

```yaml
service: media_player.volume_set
data:
  volume_level: '{{ state_attr("media_player.desktop_linux", "volume_level") - 0.01 }}'
target:
  entity_id: media_player.desktop_linux
```
