How do I stream to HDMI?

This guide describes how to write a stream to the HDMI port.

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).

Last updated