Back to blogs

Prototype

The initial MVP.

Raudio · Mar 3, 2022

Server

A minimal server was first written that could stream an audio file via the command line (one file, one client). Adding onto this functionality, we are excited to share that our initial prototype is a server that streams an audio file on a loop to clients that receive the stream via GET requests. To manually test the functionality of the server, we are able to use mpv or go to the IP address and listen. Through our API, we support the control to pause and resume the audio file via PUT requests, so that client streams will pause and resume where it was left off. As of now, several users can connect and the serfver is able to control the playback.

Process

As for our next steps, we have our list of subprojects to keep an eye on as listed in blog 3. We plan to continue using a feedback loop involving discerning next tasks, how to implement them, executing them, and pushing the updates to the GitHub organization.

Switch from RTP to HLS

The minimal server used RTP via GStreamer, which worked for its scale, but we later ran into problems involving UDP while developing this prototype. We are using Momo, a machine on campus, to run our server, though the University of Notre Dame's firework apparently blocks some UDP traffic. Because of this, we realized that in general, clients with their own firewall would need to open a port to allow incoming stream packets. Since UDP is connectionless, we instead swapped to HLS via a Python wrapper for FFmpeg which offers benefits greater than using RTP.

Updated architecture diagram

In Action

The server is currently running on Momo, which is a machine (belonging to the Notre Dame Linux Users Group) running in the CSE Commons of the Fitzpatrick Hall of Engineering on the University of Notre Dame's campus. The stream is accessible to anyone on the eduroam network when visiting this link on a client that can handle an HLS stream. Currently, we are still considering to use a VPS service instead of this university machine to avoid potential firewall issues again.

Server in action

Slide Deck