An offline mobile music streaming server.
Here's a step-by-step overview:
- Accepts song selection input via SMS (ex: 'fireworks by katy perry')
- Searches on YouTube and grabs URL of first result
- Downloads media source, stripping all but audio
- Streams MP3 over returned call to initiator
So... how does all that work?
- SMS and phone calling done - Twilio
- YouTube searches - YouTube API
- YouTube downloads - youtube-dl
- MP4 to MP3 - FFmpeg
- API Server - express
For more details, use the source, Luke ;)
Clone the repo, and navigate to your local copy:
git clone https://github.com/tejasmanohar/omnus.git && cd omnus
Expose your routes with a public web address. I use [ngrok]:
Messaging Request URL w/ HTTP POST setting.
Source the following variables in your environment (with real information)
TWILIO_AUTH_SID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX TWILIO_AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PHONE_NUMBER=+XXXXXXXX BASE_URL=example.ngrok.com
Start the server:
Use it, hack it, share it!
With mobile data being so expensive, I wanted to create a workaround to listen to music. I have come to realize that Twilio's voice pricing so expensive, it's not a practical solution to release (even in a SaaS model). That said, it's still pretty freaking amazing that you can mimic the functionality of an Rdio or Spotify MVP without internet in under 100 lines of code.
Omnus is Copyright 2015 Tejas Manohar.
Licensed under the [MIT License] license.