In this tutorial, I’m going to walk you through building a Golang video streaming API (this works for other types of media as well!). Don’t worry, its surprisingly easy to build a robust media streaming server, especially if we utilize one of the more modern protocols, HLS.

HLS allows us to serve large media files as many smaller text files that are broken up into ~10-second increments.

Using FFmpeg, we can easily convert mp3 files to HLS format, which consists of multiple files.

In traditional file server architecture, this just means that they need to be in the same directory.

Related Articles