My Experience with developing Music Stream and Why you should do it too…

VedNig
3 min readFeb 12, 2024

This blog was originally posted on blog.vednig.site

Well, to start I am writing this blog from the comfort of my bed in my P.G. — a.k.a far from home and that too on my birthday.

Now, although I would like to talk more about myself here but most probably you will learn more about me as we post more posts here.

So, it’s 2024 and world is witnessing an AI revolution with tools like ChatGPT and Gemini or Bard should I say it.

It was a while ago (more than two years to be fair) when I started on one of my projects, but the memories remain as clear as the sun.

It was the mid of peak covid period and I was sitting in my room watching movies and listening to music because my college’s first year was online. When it first struck to me that I should start my own music streaming service if not for gain but for how does Spotify, Russo and Airtel Music (3 Popular Streaming Services that I listened to at that time) work behind the hood.

I had learned a little Python in school during IP classes. I also had interest in computers growing up. So, I knew some basic coding, also few months before I had developed JoInTest using MIT App Inventor for App Hackathon. But that’s a story for another time.

This one goes something like this, I decided I wanted my own music server so I could bypass some ads and listen to songs which I controlled .

PS: I had a top 100 list of songs downloaded from internet.

So I started my app in Python and Django. with a simple command

I had recently found redis from redis.com and they were allowing 30MB or so of free database. I tried in repl.it -( back in those days it was still developing they had coordinated with GFG so I had received a few credits )and it was so fast.

I understood that I could do with it. Then also, that was my first time with MongoDB was also.

I found that I could host app for free on pythonanywhere.com or Heroku — now limited, so I started scraping Billboard charts and Spotify playlists to get list of data to view and choose from.

With /song/<name> listing information about song . And getting thumbnail of song from Apple Music Api and getting audio file from YouTube download. As Spotify streams songs I was still far away from that and this was one month into development. And I had to design UI and integrate authentication using django-authentication. Well while I was working on django-authentication integration, I ran into django-authentication with firebase and it seemed complex to me back then and the concepts and documentation were not well versed for Python and I still thing it is today. So, I went with simple authentication using email and password.

Since, downloading complete file while streaming didn’t seem ideal I went on to django documentation and found way to stream using http and that felt like the missing piece of the puzzle. But building a music server is like finding multiple pieces like these, that don’t fit together but must be made to, because this puzzle will always have something left to improve. Some of which are licensing restriction and funding caps which I later encountered. But I would say this was fun building. And you should too, in your own way find your way through problems and find problems that affect your consumer. Also, improve your product until you start using it and keep the loop going.

In the following months I learned many more things like CDNs , latency and other topics in file management in Linux with Node.js , PHP and Python.

As a final note I would like to state that,

There are thousands of protocols and ways things work. There is no such thing as a standard way in technology.

Well, that is all for this one here, but I think more like this will keep coming up.

--

--