Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Receive and send videos with the internal RTMP server in the datarhei Restreamer. Each RTMP signal is available as output via the Publication Service for multistreaming.
Real-Time Messaging Protocol (RTMP) is often the first choice for transferring video files over the Internet. The Adobe Inc. proprietary network protocol can transmit audio, video, and other data over the Internet from a media server. The RTMP server in the open-source datarhei Restreamer is easy to activate dun use. All RTMP signals on the system can be used directly for multistreaming on various video platforms. In the video, the RTMP server is enabled in the system settings and then enabled as output for the individual video channel to work with Publication Services.
Use the option to change the protocol to SRT in the specific Publication Service.
The filters for audio software encoders are:
You can manipulate the sampling rate of the input signal (which already existed before directly in the encoder)
Sets the audio layout (mono, stereo, unprocessed)
Can mute the left or right channel
Lets you set the level (10-90% or custom with dB value)
FFmpeg tries to bring the noise level to an average level.
Vertical video is helpful on smartphones and vertical video platforms such as TikTok. It is encoded and transmitted for free with the datarhei Restreamer.
In this video, a 16:9 video is rotated 90° using the datarhei Restreamer streaming server. In the video settings of the active channel, the encoding is changed to 9:16. There are different rotation presets available. In the example, a Raspberry Pi 4 is used, which performs the encoding via the GPU OpenMax.
An encoding of the video is always necessary to get rotated video output.
You have already started your Restreamer and added a video source.
Edit the video source settings.
Start encoding
Various setting options are available besides rotation, also horizontal and vertical flipping.
The ”Publication Website“ is the player website. You can customize the path of the web page and link any web page. To deploy a custom website at http://restreamer-url/ follow the few steps.
You have already started your Docker container with the mount path if you followed the instructions.
The /core/data folder represents the root directory for the Restreamer, accessible via the URL: http://restreamer-url/
Make website (index.html) accessible
Copy your website files into the mount path:
Now the page is active.
The address is http://restreamer-url/
H.265 reduces traffic by about 50% compared to H.264, so in some cases, it makes sense to use H.265 to transport the video to the server.
High-Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H Part 2, is a standard for encoding video content and images. Compared to H.264/MPEG-4, the codec offers twice the compression while maintaining the same quality.
There are several cases where it may be helpful to use H.265 for the transport path to the server. Since there are currently no H.265-capable video players, the video stream must be transcoded to H.264 after it arrives at the server so that the video player can display it.
Docker is the easiest way to use the Restreamer. That is why we recommend it.
Docker is an open platform for developing, deploying, and running applications. Docker allows you to separate your applications from your infrastructure to deploy software quickly. In addition, Docker lets you manage your infrastructure the same way you manage your applications. By taking advantage of Docker's methods for rapidly deploying, testing, and deploying code, you can significantly reduce the time between writing code and running it in production.
Let's Encrypt is a certificate authority that offers free X.509 certificates for Transport Layer Security. These HTTPS certificates work with the datarhei Restreamer.
Encrypt your live streams with HTTPS and avoid security gaps and errors caused by mixed content.
You can use any dynamic DNS service like myfritz, no-ip, dyndns or other services.
Do not forget to forward the public port for HTTPS: 443 to your internal Restreamer IP default port: 8181.
Don't forget to forward the public port for HTTP: 80 to your internal Restreamer IP default port: 8080
The HTTPS certificate is renewed automatically.
No registration with Let's Encrypt is required
So that the Restreamer can be reached via the Internet.
Port forwarding allows remote computers (e.g., computers on the Internet) to connect to a specific computer or service within a private local area network (LAN). A public IP must be available for the Restreamer's IP to be accessible from "outside" after installation.
Open ports for HTTP and HTTPS are required. We recommend using HTTPS on the website.
RTMPS can be activated in addition to HTTPS!
To use live streams/players/publication sites on the Internet, including Let's Encrypt (automatic HTTPS certification function), the port forwarders for HTTP and HTTPS are required.
Various free web services are available on the Internet for testing to check whether the forwarding is active without errors.
What | Router (external port) | Restreamer (internal port) | Optional |
---|---|---|---|
HTTP
80/tcp
8080/tcp
HTTPS
443/tcp
8181/tcp
x
RTMP
1935/tcp
1935/tcp
x
RTMPS
1936/tcp
1936/tcp
x
SRT
6000/udp
6000/udp
x
Use the internal RTMP server as a video source.
The Restreamer has an internal RTMP server function. The function can be used to receive any RTMP-enabled video sources. The video shows the popular OBS software as the transmitter for the RTMP stream and the Restreamer as the receiver. Once the video stream is up, the Restreamer is ready for all functions.
Add and delete video sources.
With a few clicks, the wizard helps set up network video, USB camera, Raspicam, and framebuffer.
The quick start video shows the fast lane method without additional unique video source settings. It is possible to edit the source for individual needs. The selection of a video license has also been omitted. The settings can be adjusted at any time later.
Video source selection. There are 3 inputs to choose from.
Network source for use with network cameras or other devices with IP addresses.
An internal RTMP server can be used to send OBS streams to the restreamer, for example.
Internal HLS server
All the necessary configurations for the audio track are provided. As a unique feature, fake audio can be enabled. There are 3 different audio tracks available.
Silence allows streams to be transmitted to networks that require an audio track. Silence is often required for use in social media such as YouTube or Facebook.
If you are already running a web server and you want Restreamer to be part of the website, you can forward requests to a specific location to your Restreamer.
Below you will find example configuration snippets for nginx, Apache, and Caddy. All of these allow proxying requests to a specific location to your Restreamer. These examples assume that Restreamer is running on the same server or in a trusted local network accessible by your server. In this case HTTPS doesn't need to be enabled in Restreamer. Your nginx, Apache, or Caddy needs to be configured for HTTPS instead.
Example 1: nginx is serving your website and you want access Restreamer at /restreamer/
. Restreamer is running on the same server at “127.0.0.1:8080”:
Example 2: nginx is serving your website and you want access multiple Restreamer at /restreamer1/
, /restreamer2/
, and /restreamer3/
. All Restreamer are in a local network that is connected to your server:
Example 3: nginx is serving your website via HTTPS and you want access Restreamer at /restreamer/
. Restreamer is running on the same server at “127.0.0.1:8080”:
Please note that you don't need to enable HTTPS in Restreamer, because nginx is already handling the SSL connection.
Example 4: nginx is serving your website and you want access Restreamer at /restreamer/
. Restreamer is running in the local network at “192.168.1.42”. The Restreamer HTTP server is listening on port 8080 and the RTMP and SRT servers are listening on ports 1935 and 6000 resp.:
See the Nginx documentation for more details.
Example 1: Apache is serving your website and you want access Restreamer at /restreamer/
. Restreamer is running on the same server at “127.0.0.1:8080”:
Example 2: Apache is serving your website and you want access multiple Restreamer at /restreamer1/
, /restreamer2/
, and /restreamer3/
. All Restreamer are in a local network that is connected to your server:
Example 3: Apache is serving your website via HTTPS and you want access Restreamer at /restreamer/
. Restreamer is running on the same server at “127.0.0.1:8080”:
Please note that you don't need to enable HTTPS in Restreamer, because Apache is already handling the SSL connection.
See the Apache documentation for more details.
Example 1: Caddy is serving your website and you want access Restreamer at /restreamer/
. Restreamer is running on the same server at “127.0.0.1:8080”:
Example 2: Caddy is serving your website and you want access multiple Restreamer at /restreamer1/
, /restreamer2/
, and /restreamer3/
. All Restreamer are in a local network that is connected to your server:
Caddy will automatically serve your site with HTTPS enabled in case you configured your DNS correctly. Read more about Automatic HTTPS with Caddy.
Please note that you don't need to enable HTTPS in Restreamer, because Caddy is already handling the SSL connection.
See the Caddy documentation for more details.
Any video source can be sent to Facebook with the Restreamer and posted there as a live event with a few clicks.
It may be that Facebook has adjusted the process on the platform. However, the basic principle with the streaming key will always remain the same. Visit Facebook Help if you are not sure how to use it.
RS = Clicks in Restreamer FB = Clicks on Facebook
RS: Go to Publication Service in your Restreamer.
RS: Click on Facebook
RS: Click on Settings.
RS: Give a name to the Publication Service (optional)
FB: Copy the stream key on Facebook
RS: Paste the stream key or permanent stream key in the restreamer.
RS: Enter backup server (optional)
RS: Process settings are good on default values for all applications. We advise changing the settings only if necessary.
RS: Click on save to start the video stream to Facebook. A preview will be displayed on Facebook.
FB: Write a description and a title for the live stream.
Click go live now. If you want to schedule a broadcast for later, click Schedule Live Video Event.
You can find a helpful guide for live streaming on Facebook. The guide will help you find the streaming ID for the restreamer.
The stream should always be manually stopped on Facebook first. If the stream is interrupted elsewhere during a social media stream, Facebook may not save the live stream in the archive.
With just a few clicks, any video source can be sent to YouTube via the Restreamer's Publication Service for use as a live stream.
Select Publication Service
Enter a valid streaming ID from YouTube
Click on the Save button
Once connected to YouTube Live, the bitrate of the live stream will be displayed in the main Restreamer window.
Click Stop to pause the stream.
How to start a livestream to YouTube using the Publication Service with the free open source video software datarhei Restreamer.
A helpful guide for live streaming is on YouTube. The guide helps to find the streaming ID for the restreamer.
Always end the stream on YouTube first after an event. If you interrupt the stream in the Restreamer during a live stream, YouTube may not save your live stream in the DVR archive.
You could always change the username and password for the datarhei Restreamer.
You can use the RTSP protocol for live streaming if you have an IP camera. RTSP stands for Real-Time Streaming Protocol.
To integrate an RTSP-enabled network camera, you need the address where you can retrieve the live stream from the camera. Please read your camera manual and search for "RTSP" or look on the internet with the excellent search command "RTSP + URL + manufacturer + camera model."
ATTENTION! Do not use standard user data for IP cams, and always assign a secure password! ATTENTION! Activate password protection for your RTSP streams to prevent unauthorized access!
If you don't know how to get the RTSP address of your network camera, learn it in this guide.
rtsp:// [USERNAME] : [PASSWORD] @ [ADDRESS] : [RTSP PORT] /Streaming/Channels/ [CH] 0 [STREAM TYP]
[USER] - This is the username for accessing the stream
[PASSWORD] - String, for access or access control to the device.
[ADDRESS] - Network address of the IP cam.
[RTSP PORT] - default port is 554
[CHANNEL] - HIKVISION cameras provide 2 to 3 channels, where channel 1 is mostly 4:3 format and is used for internal viewing
[STREAM TYPE] - 1 for First/Mainstream, 2 for Substream 4:3 format (internal use), 3 for Secondstream (sometimes has to be enabled separately)
In this example, the IP address of the IP cam in the LAN is: 192.168.1.64 and the RTSP port is on the default port: 554. The username is: admin and the password is: password. The 3 possible streaming channels are addressed.
The RTSP streaming addresses are:
1 Main Stream: rtsp://admin:passwort@192.168.1.64:554/Streaming/Channels/101 2 Substream: rtsp://admin:passwort@192.168.1.64:554/Streaming/Channels/102 3 Dritter Stream: rtsp://admin:passwort@192.168.1.64:554/Streaming/Channels/103
The IP address on the LAN is: 181.112.101.124 and the RTSP port is on the default port: 554. All other parameters are identical to Example 1 on the LAN.
The RTSP streaming addresses are:
1 Main Stream: rtsp://admin:passwort@181.112.101.124:554/Streaming/Channels/101 2 Substream: rtsp://admin:passwort@181.112.101.124:554/Streaming/Channels/102 3 Dritter Stream: rtsp://admin:passwort@181.112.101.124:554/Streaming/Channels/103
Don't forget to forward active ports in routers and firewalls to be publicly available over the Internet.
If the RTSP stream does not work, you can check with VLC. To do this, install the free VLC player from the manufacturer's website: https://www.videolan.org/.
Navigate via the tab "Media" to the option "Open network stream" or open the menu via the key combination "Ctrl + N".
Enter RTSP address as described above
Click on the "Open RTP/UDP stream" button to start the stream.
If the video does not start, check the video source and firewall settings in your network.
If you have a working RTSP address, the rest is ready to live stream with a few clicks.
The Restreamer provides a video player in iFrame for embedding in HTML on web pages.
If you want to display your live stream on your website in a CMS like WordPress or a homepage builder like Wix or Jimdo, you can use an automatically generated iFrame HTML code snippet for it.
Don't forget to forward the TCP port to use the HTML code successfully on your website. Please refer to your router's manual on how to enable port forwarding.
We explain how to connect the Raspberry Pi camera module to a datarhei Restreamer.
Check that the device is installed correctly before the restreamer recognizes the camera module. As soon as the device is available on the host system, it is automatically displayed in the Restreamer.
There are several types of camera boards available for the Raspberry Pi. The official Raspberry Pi cameras can take high-resolution photos and Full HD 1080p videos and be fully controlled. After the installation in the "raspi-config" menu, all cameras can be used in the Restreamer for live streaming.
ATTENTION! Using the GPU with the Raspicam requires increasing the cache memory to 256 MB. >> To the guide <<
If unexpected behavior occurs, rebooting the Raspberry Pi might help.
If unexpected behavior occurs, restarting the datarhei Restreamer might help.
Note the video where we explain encoding over the GPU from the Raspberry Pi to offload the CPU from the Raspberry Pi.
If you have a Pi camera connected to your Raspberry Pi and you want capture a stream from it, you first need to make it available as a "video4linux" device.
On the console, type sudo modprobe bcm2835-v4l2
and restart Restreamer. Then you should be able to select the Pi camera in the wizard or advanced setup.
With the latest Raspbian (bullseye) the tools for the camera are based on libcamera
which is not necessarly compatible with video4linux and is currently not supported by ffmpeg directly. In order to make the camera available as a video4linux device you have to switch it into legacy mode:
Open /boot/config.txt
in an editor, e.g. sudo nano /boot/config.txt
Replace the line camera_auto_detect=1
with start_x=1
Add gpu_mem=256
right after the line with start_x=1
Replace the line with dtoverlay=vc4-kms-v3d
with dtoverlay=vc4-fkms-v3d
Save the file and exit the editor
Reboot the Pi
After the Pi rebooted you should see the Pi camera option in the UI.
Alternatively, you can run sudo raspi-config and enable the legacy camera support in the Interface Options
section. This will only allocate 128MB GPU memory and will only allow HD streaming (1280x720). If you want FullHD streaming (1920x1080), then open /boot/config.txt
in an editor and change the line with gpu_mem=128
to gpu_mem=256
.
With the release of Raspbian "bookworm", the legacy mode for the camera is not anymore available and the camera can't be accessed anymore directly from ffmpeg. We recommend to install Raspbian "bullseye" and follow the instructions above.
How GPU encoding from the Raspberry Pi in the datarhei Restreamer significantly reduces CPU load.
The graphics processor (GPU) takes over computationally intensive tasks and thus relieves the central processor (CPU). The function is directly controlled in the Restreamer with FFmpeg. The freed processor time can thus be used for other tasks.
Not only Raspberry PI GPUs are supported. If a GPU is detected on the system, it is ready for use.
GPU support is available for every stream.
We explain how to connect a USB video device to a datarhei Restreamer.
Before the restreamer recognizes the USB device, check if the device is installed correctly. As soon as the device is available on the host system, it is automatically displayed in the restreamer. Use USB device as a video source in datarhei Restreamer
The "USB Video Class" (UVC) contains devices that stream video over USB and brings them together into a particular class of USB devices. They are webcams, camcorders, transcoders, and devices that can convert analog tape material to a digital format. UVC video sources are displayed as video sources in the datarhei Restreamer's graphical user interface and are active for live streaming with a few simple steps.
If unexpected behavior occurs, a reboot of the host system will help.
If unexpected behavior occurs, restarting the datarhei Restreamer will help.
This guide explains how you can write a template for the publication website and describes the available expressions.
The available Handlebars expressions are:
Many of those expressions are for manipulating the default template. If you write your own template you are not required to use all expressions. Pick the ones that are suitable for your needs.
The template is used to create the /index.html
for the default channel and for each channel a /playersite_[channelid].html
. The [channelid]
will be replaced by the respective ID of that channel. This can be used to link to the rendered template of an individual channel.
There are two additional helper defined:
This helper lets you check if two values are equal, e.g.
This helper lets you check if two values are not equal, e.g.
A template for the publication website is a single HTML page which uses the Handlebars templating language () to control the output based on the available expressions.
The Restreamer default template is available at .
Expression | Type | Description |
---|
Expression | Type | Description |
---|
The template language "Handlebars" is used for the publication website templates. If you are new to Handlebars, please check out their guide () in order to get up to speed.
player | string | Currently this value is always |
playersite | boolean | Whether the playersite is enabled. |
title | string | The sitename of the playersite as defined in the |
share | boolean | Whether to enable share buttons. |
support | boolean | Whether to display a link to the datarhei project website. |
chromecast | boolean | Whether to enable chromecast in the player. |
airplay | boolean | Whether to enable airplay in the player. |
url | string | The URL to the playersite. |
textcolor_title | string | Text color for titles as defined in the |
textcolor_default | string | Default text color as defined in the |
textcolor_link | string | Link color as defined in the |
textcolor_link_hover | string | Link :hover color as defined in the |
bgcolor_header | string | Background color for the header as defined in the |
bgcolor_selected | string | Background color for selected items as defined in the |
bgcolor_unselected | string | Background color for unselected items as defined in the |
bgcolor_default | string | Default background color as defined in the |
hrcolor | string | Separator color as defined in the |
bgimage_url | string | URL of the background image, empty if no background image has been uploaded. |
imprint_html | string | Imprint HTML content as defined in the |
terms_html | string | Terms HTML content as defined in the |
inject1 | string | HTML content for the extended header as defined in the |
inject2 | string | HTML content for the extended channel list as defined in the |
inject3 | string | HTML content for the extended content area as defined in the |
inject4 | string | HTML content for the extended footer as defined in the |
channels | array | List of all available channels, i.e. channel objects. See below. |
channel_id | string | ID of the currently selected (or default) channel. |
channel_name | string | Name of the currently selected (or default) channel. |
channel_description | string | Description of the currently selected (or default) channel. |
channel_descriptionhtml | string | Description of the currently selected (or default) channel as HTML. |
channel_creator_name | string | Name of the creator of the currently selected (or default) channel. |
channel_creator_description | string | Description of the creator of the currently selected (or default) channel. |
channel_creator_description_html | string | Description of the creator of the currently selected (or default) channel as HTML. |
channel_license | string | License of the currently selected (or default) channel. |
channel_poster | string | URL of the poster (snapshot) image of the currently selected (or default) channel. |
channel_width | number | The witdh of the player, currently always |
channel_height | number | The height of the player, currently always |
id | string | Full channel ID, e.g. |
channelid | string | UUID of the channel. |
name | string | Name of the channel. |
available | boolean | Whether the channel is available, i.e. connected. |
thumbnail | string | URL to the latest snapshot of that channel, empty if not available. |
egresses | array(string) | List of egress UUIDs. |
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.
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:
Open /boot/config.txt
in an editor, e.g. sudo nano /boot/config.txt
Set hdmi_force_hotplug=1
Set hdmi_group=1
Set hdmi_mode=4
(for 1280x720) or hdmi_mode=16
(for 1920x1080)
Set hdmi_pixel_encoding=2
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
).