Skip to content

Audio Live Streaming using a 5G Network

In this section, we will be looking at utilizing the deployed 5G Network for live audio streaming. Because of the very small latency and increased bandwith over other past mobile network technologies such as 4G, 5G can offer near realtime audio streaming with optimum quality. For this example we will be utilizing the Real Time Streaming Protocol (RTSP) where we will have one of the UEs running a RTSP server with a broadcast and second UE as a listener. Since we cannot hae audio or video outputs on AWS server, we will have the second UE restream the broadcast back to an open port on the AWS server and then connect to that particular port from our local machine. The overall system is shown in the below diagram.

Connection Diagram

System architecture for audio streaming

Configuring Live Transmission

For the transmission we need to have two UEs, one transmitting the audio stream and at least one recieveing the stream. For this purpose we can use the same two UEs we previously deployed during the Initial Network Connection. Once two UEs are deployed and running, we need to open a terminal window inside the UE, for this purpose click attach shell on both the UE containers as shown below.

Console Attach UE

Attaching a shell to the NR-UEs (Click to zoom)

Now we can set up one container as the transmitter and the other as the receiver.

Transmitter

For the streaming, we will be using ffmpeg software and the RTSP server package, which is already installed on our UE docker image. You can use the following command to start the stream on the server.

./rtsp-simple-server

RTSP Server

Starting the RTSP server on the transmitter UE

Next, open another terminal on the same UE and tun the following command to initiate the stream through the ffmpeg software.

ffmpeg -re -stream_loop -1 -i Test_Audio.mp3 -c copy -f rtsp rtsp://localhost:8554/Test_Audio

Streaming

Streaming from the transmitter UE (Click to zoom)

Next we need to get the ip address of our transmitting UE so that other UE users can connect to the stream for listening. To obtain the ip address please type ifconfig in the terminal and you will get ip address information as shown below. In this case our IP address is 12.1.1.2

UE network info

Obtaining the 5G network IP address of the transmitter UE

Receiver

Now that we have our server streaming the audio file, we need to listen to that stream from the second UE and re stream it to the open AWS port. For this also, first start the RTSP server by typing the following command on the terminal

./rtsp-simple-server

RTSP Server

Starting the RTSP server on the receiver UE

Next we are going to listen to the stream coming from the firt UE and then re-stream it into the second UE's localhost RTSP port so that we can connect to it from outside. Note that you have to replace the IP address in the command with the IP address of the transmitter UE. The command for this is as follows:

ffmpeg -re -stream_loop -1 -i rtsp://12.1.1.2:8554/Test_Audio -c copy -f rtsp rtsp://localhost:8554/Test_Audio

RTSP Server

Forwarding the audio stream on the receiver UE

Listen from the local machine

Now you can listen to the stream using your local machine. For this open VLC on your computer and enter the following address on the network stream address or type the following command on the terminal.

vlc rtsp://<AWS Serer IP>:<forwarded local port number Eg:8554>/Test_Audio

RTSP Server

Listening to the audio stream VLC on your local machine