This tutorial covers the configuration options for running the Linux-based 5G Broadcast stack, focused on the Service Announcement (SA) file and the FLUTE ffmpeg watchfolder. The right configuration depends on two choices:
- Delivery mode: HLS or DASH broadcast, or HLS seamless switching between broadcast and unicast.
- Service Announcement source: served by the FLUTE ffmpeg signalling server, or a local SA file read directly by the middleware.
Use the sections below to pick the combination that matches your scenario. The repeated configuration blocks differ only in a few lines (delivery mode, SA format and paths).
Setup Resources
Preparation
Running the modem service once and then stopping it generates or refreshes the configuration files the stack needs. After each reboot of your machine run:
sudo systemctl start 5gmag-rt-modemsudo systemctl stop 5gmag-rt-modem
Make sure that you have the latest nginx config enabled in /etc/nginx/sites-enabled/5gmag-rt-wui. Compare it to the
config that is provided here
Different SA formats
The Reference Tools support three different service announcement formats. The examples below use either the
5gmag_legacy format for the recordings or the default format for seamless switching. To use the seamless switching
format that was agreed in 5G-MAG you have to use 5gmag_bc_uc. The corresponding service announcement example file is
labeled bootstrap.multipart.seamlessswitching.hls.5gmag. More details can be found in the
Service Announcement Formats section.
Playback of 5GBC together with the MBMS Modem
Set the target configuration in /etc/5gmag-rt.conf:
seamless_switching: {
enabled: <TRUE OR FALSE>;
truncate_cdn_playlist_segments: 3
}
bootstrap_format: <TARGET FORMAT>;
local_service: {
enabled: false
}
Playback of legacy recordings
Set the configuration in /etc/5gmag-rt.conf to use the legacy format:
seamless_switching: {
enabled: false;
}
bootstrap_format: "5gmag_legacy";
local_service: {
enabled: false;
}
If you want to play the recorded content in a loop consider increasing the cache values to avoid segments with the same url being deleted immediately:
cache: {
max_segments_per_stream: 30;
max_file_age: 1200; /* seconds */
max_total_size: 128; /* megabyte */
}
FLUTE ffmpeg watchfolder with signaling server
HLS seamless switching (signaling server)
Set the config file for the rt-mbms-examples project in flute-ffmpeg\config\default.cfg to:
general : {
multicast_ip = "238.1.1.111";
multicast_port = 40101;
mtu = 1500;
rate_limit = 1200000;
watchfolder_path = "<PATH TO YOUR WEBSERVER WHERE HLS SEGMENTS ARE WRITTEN TO>";
path_to_transmit = "<RELATIVE PATH FROM THE ROOT OF YOUR WEBSERVER>"
stream_type = "hls";
transmit_service_announcement = true;
dash: {
number_of_init_segments = 3;
resend_init_in_sec = 30;
service_announcement = "../supporting_files/mbms/bootstrap_examples/bootstrap.multipart.legacy.dash";
};
hls: {
service_announcement = "../supporting_files/mbms/bootstrap_examples/bootstrap.multipart.seamlessswitching.hls";
media_playlists_to_ignore_in_multicast = []
}
webserver_port: 3010;
}
Note: For seamless switching to work the watchfolder_path needs to point to a webserver that hosts the segments.
Enable seamless switching in the /etc/5gmag-rt.conf file:
seamless_switching: {
enabled: true;
truncate_cdn_playlist_segments: 3
}
DASH Broadcast (signaling server)
Disable seamless switching and set the right SA format in the /etc/5gmag-rt.conf file:
seamless_switching: {
enabled: false;
truncate_cdn_playlist_segments: 3
},
bootstrap_format: "5gmag_legacy";
Adjust the config for flute-ffmpeg:
general : {
multicast_ip = "238.1.1.111";
multicast_port = 40101;
mtu = 1500;
rate_limit = 1200000;
watchfolder_path = "/home/dsi/5G-MAG/simple-express-server/public/watchfolder/dash";
path_to_transmit = ""
stream_type = "dash";
transmit_service_announcement = true;
dash: {
number_of_init_segments = 3;
resend_init_in_sec = 30;
service_announcement = "../supporting_files/mbms/bootstrap_examples/bootstrap.multipart.legacy.dash";
};
hls: {
service_announcement = "../supporting_files/mbms/bootstrap_examples/bootstrap.multipart.seamlessswitching.hls";
media_playlists_to_ignore_in_multicast = []
}
webserver_port: 3010;
}
HLS Broadcast (signaling server)
Disable seamless switching and set the right SA format in the /etc/5gmag-rt.conf file:
seamless_switching: {
enabled: false;
truncate_cdn_playlist_segments: 3
},
bootstrap_format: "5gmag_legacy";
Adjust the config for flute-ffmpeg:
general : {
multicast_ip = "238.1.1.111";
multicast_port = 40101;
mtu = 1500;
rate_limit = 1200000;
watchfolder_path = "/home/dsi/5G-MAG/simple-express-server/public/watchfolder/hls";
path_to_transmit = "watchfolder/hls/"
stream_type = "hls";
transmit_service_announcement = true;
dash: {
number_of_init_segments = 3;
resend_init_in_sec = 30;
service_announcement = "../supporting_files/mbms/bootstrap_examples/bootstrap.multipart.legacy.dash";
};
hls: {
service_announcement = "../supporting_files/mbms/bootstrap_examples/bootstrap.multipart.legacy.hls";
media_playlists_to_ignore_in_multicast = []
}
webserver_port: 3010;
}
FLUTE ffmpeg with local Service Announcement
In this example, the http server that signals the mch_info.json is not needed. Instead, start the MBMS Middleware
directly with a local service announcement file
General
Enable the local service in the /etc/5gmag-rt.conf file:
local_service: {
enabled: true;
}
Disable transmit_service_announcement in the flute-ffmpeg default.cfg file:
transmit_service_announcement = false;
HLS seamless switching (local SA)
Point to a local service announcement file with seamless switching support in the /etc/5gmag-rt.conf file e.g.:
local_service: {
bootstrap_file: "/home/dsi/5G-MAG/rt-common-shared/mbms/bootstrap_examples/bootstrap.multipart.seamlessswitching.hls";
}
Enable seamless switching in the /etc/5gmag-rt.conf file:
seamless_switching: {
enabled: true;
truncate_cdn_playlist_segments: 3
},
bootstrap_format: "";
HLS Broadcast (local SA)
Point to a local service announcement in the /etc/5gmag-rt.conf file e.g.:
local_service: {
bootstrap_file: "/home/dsi/5G-MAG/rt-common-shared/mbms/bootstrap_examples/bootstrap.multipart.legacy.hls";
}
Disable seamless switching and set the right SA format in the /etc/5gmag-rt.conf file:
seamless_switching: {
enabled: false;
truncate_cdn_playlist_segments: 3
},
bootstrap_format: "5gmag_legacy";
DASH Broadcast (local SA)
Point to a local service announcement in the /etc/5gmag-rt.conf file e.g.:
local_service: {
bootstrap_file: "/home/dsi/5G-MAG/rt-common-shared/mbms/bootstrap_examples/bootstrap.multipart.legacy.dash";
}
Disable seamless switching and set the right SA format in the /etc/5gmag-rt.conf file:
seamless_switching: {
enabled: false;
truncate_cdn_playlist_segments: 3
},
bootstrap_format: "5gmag_legacy";
Next steps
- To play a received HLS stream, see SDR - HLS Playback over 5G Broadcast.
- For details of each Service Announcement format, see Service Announcement Formats.
- Return to the Tutorials index.