# How do I stream to HDMI?

Writing video data to the HDMI port is done with the `Framebuffer` publication service. After creating a channel in Restreamer, you can add the `Framebuffer` publication service. This publication services require that at least one framebuffer device is availbale on your system.

A framebuffer device is located in `/dev` with the name `fb*`, where `*` is a number usually starting from `0`.

The framebuffer device might only show up as soon a display is connected.

In order to have these devices available in the Restreamer Docker container, you have to start the container with the `--privileged` option.

#### Raspberry Pi 4

On a Raspberry Pi 4 we recommend to install Raspbian "bullseye" in order to enable the framebuffer device `/dev/fb0`.

You have to edit the `/boot/config.txt` in order to set the correct resolution:

1. Open `/boot/config.txt` in an editor, e.g. `sudo nano /boot/config.txt`
2. Set `hdmi_force_hotplug=1`
3. Set `hdmi_group=1`
4. Set `hdmi_mode=4` (for 1280x720) or `hdmi_mode=16` (for 1920x1080)
5. Set `hdmi_pixel_encoding=2`
6. At the bottom in the `[pi4]` section, set `dtoverlay=vc4-fkms-v3d`

Reboot the Pi and the docker container. Now you should see the `Framebuffer` publication service, where you select the `/dev/fb0` device and the matching color settings (usually `RGB565 Little Endian`).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datarhei.com/restreamer/knowledge-base/user-guides/how-do-i-stream-to-hdmi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
