Setting up a server

3 views
Skip to first unread message

AJ Arora

unread,
Jan 26, 2017, 2:23:25 PM1/26/17
to indycast
Hi Chris,

This is an amazing project — thanks so much for creating and sharing it! I've played around with setting up a server for a WNYC stream, and currently have one up on an EC2 instance at http://54.90.186.89:9390/

I'm an absolutely terrible coder though (particularly with back-end engineering), so I had a few unexpected warnings and some questions for you.

  1. Is there a way to access the admin interface on my server? Perhaps I'm supposed to do something with the indycast.net folder, or change a setting that controls my hostname?
  2. Similarly, how would I go about accessing/testing things like the podcast before connecting to indycast.net? E.g. I'm able to stream as expected at a link such as http://54.90.186.89:9390/live/7%3A55AM , but URI's in a podcast at http://54.90.186.89:9390/mon,tue,wed,thu,fri/7am/2hr/MorningEdition.xml would be prepended with indycast.net)
  3. I'm still playing around with different clouds and some promotions I have...Would it be possible/better to send you a domain that will point to my server (e.g. ajarora.com:9390 ) in case I want to switch to a server at a different IP?
  4. Do you have any pointers on how I should set up my cloud settings / credentials to use S3?
  5. Is it possible to configure the streams to be encoded with aac instead of mp3? (Specifically HE-AAC v2 for efficiency and compatibility... I had been using the stream on my phone and quickly chewed through a couple gigs of data 😉)

I've attached my config file and a screenshot of my server console with the warnings and processes. I'm not seeing the same ones as in your documentation, but I'm guessing that's because the front end isn't up.

Thanks again for all your hard work. I'm hoping to utilize some of the DRR features in other public radio projects I've been meaning to build, and I look forward to joining the federation :)


Best,
AJ
Screen Shot 2017-01-26 at 1.32.44 PM.png
wnyc.txt

Chris McKenzie

unread,
Jan 26, 2017, 8:18:00 PM1/26/17
to indy...@googlegroups.com
Hi!

Glad you think this is useful. I'm going to reply inline:


On 01/26/2017 11:23 AM, AJ Arora wrote:
Hi Chris,

This is an amazing project — thanks so much for creating and sharing it! I've played around with setting up a server for a WNYC stream, and currently have one up on an EC2 instance at http://54.90.186.89:9390/

I'm an absolutely terrible coder though (particularly with back-end engineering), so I had a few unexpected warnings and some questions for you.

  1. Is there a way to access the admin interface on my server? Perhaps I'm supposed to do something with the indycast.net folder, or change a setting that controls my hostname?
so there's two interpretations of "admin interface".

First interpretation:

If you go to http://54.90.186.89:9390/help you'll see the various endpoints that you have access to.

I can find out the stats of your server for instance by doing http://54.90.186.89:9390/heartbeat . For instance, I can see you've been up for 6.5 hours.

I used http://54.90.186.89:9390/stats and fed this through tools/graph.py


         +-0------1-----2-----3-----4------5-----6-----7-----8------9-----10----11----12-----13----14----15----16-----17----18----19----20-----21----22----23-----+
2017-01-26 ...**.***=**********=***************************************************************=*********************=***************............................ 76
         +-0------1-----2-----3-----4------5-----6-----7-----8------9-----10----11----12-----13----14----15----16-----17----18----19----20-----21----22----23-----+
         wnyc coverage: 78.402778%

That generally looks good.

Second interpretation.

If you are talking about http://indycast.net/admin.php then you have to contact me like you just did and I have to manually add it. I could certainly do the DNS work to make this automated, but it hasn't been a priority.  I just added it right now and if everything works you should be receiving heartbeat requests every 30 minutes in a bit.  I haven't added you to the dns yet ... I'll do that in a bit (and I just got an idea about how to simplify this step away).


  1. Similarly, how would I go about accessing/testing things like the podcast before connecting to indycast.net? E.g. I'm able to stream as expected at a link such as http://54.90.186.89:9390/live/7%3A55AM , but URI's in a podcast at http://54.90.186.89:9390/mon,tue,wed,thu,fri/7am/2hr/MorningEdition.xml would be prepended with indycast.net)
Oh yeah? That's a terrible bug.  I probably presume a translation to indycast.net/wnyc... (which works now). However, yes, this should probably work well without me being involved.


  1. I'm still playing around with different clouds and some promotions I have...Would it be possible/better to send you a domain that will point to my server (e.g. ajarora.com:9390 ) in case I want to switch to a server at a different IP?
Whatever you want. I value this project and I want to make sure people find it useful.


  1. Do you have any pointers on how I should set up my cloud settings / credentials to use S3?
I only wrote code that supported microsoft azure because at the time of the architecting that was the cheapest.  Google Cloud has undercut them recently so that may be a good thing to support.  I certainly have access to S3 buckets too, since that's the "industry standard" here. 

Unfortunately each of these cloud storage techs have a different python library so there's a good amount of legwork involved.

In fact, the server/lib/cloud.py file which interfaces azure doesn't seem to be designed to be agnostic to a particular cloud provider.  So I guess I'd need to add some kind of thin wrapper to it and then have a user-parameter in the cloud-creds file to specify the service.  It's a pretty legit feature request and one that I've been meaning to do.  

  1. Is it possible to configure the streams to be encoded with aac instead of mp3? (Specifically HE-AAC v2 for efficiency and compatibility... I had been using the stream on my phone and quickly chewed through a couple gigs of data 😉)
In your case, it is. 
The server doesn't do any audio "processing" as in, it doesn't transcode or convert.
It essentially creates an archived timecoded database of audio and then surgically slices chunks of it which are specified in numerous ways.
Even though it has ".mp3" on the end, that's just an "extension of convenience".
What you download is the data that was sent from the radio stations' server at the time you specified.
If you run ffprobe on it you'll see "Audio: aac (HE-AACv2), 44100 Hz, stereo, fltp, 28 kb/s"

If you wish this was generally the case for all stations then you can set up a transcoding proxy (it adds a few seconds of latency). There's really magnificent GPU transcoders these days. If you are interested in finding out more, please ask and I'll do a writeup.



I've attached my config file and a screenshot of my server console with the warnings and processes. I'm not seeing the same ones as in your documentation, but I'm guessing that's because the front end isn't up.
Wow yeah, making this thing work without a DNS resolution sounds like an oversight on my part.  Sorry.  I'll see what I can do about that.




Thanks again for all your hard work. I'm hoping to utilize some of the DRR features in other public radio projects I've been meaning to build, and I look forward to joining the federation :)
Thanks a lot.  I put in a lot of effort into this and I'm hoping others find it useful.



Best,
AJ
--
You received this message because you are subscribed to the Google Groups "indycast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to indycast+u...@googlegroups.com.
To post to this group, send email to indy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/indycast/9dc43b9d-e300-4a6c-b6f1-9502d29f8122%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages