Git Product home page Git Product logo

chirpradio-archiver's Introduction

CHIRP Radio is a non-profit organization that runs a community radio station in Chicago focused on new music and the arts.

Get started by reading the development guide.

This is the code for CHIRP's internal web applications. The apps run on Google App Engine, under the 'chirpradio' project. The source code is hosted on Google Code, also under the 'chirpradio' project.

For the chirpradio developer dashboard, go to: http://appengine.google.com/dashboard?&app_id=chirpradio-hrd

For the end-user landing page, go to: http://chirpradio.appspot.com/

For the Google Code project: http://code.google.com/p/chirpradio

Helpful external documentation:

Documentation

To read or work on the developer documentation locally, create a virtualenv, and install the requirements:

pip install -r docs/requirements.txt

Run this to build the docs:

make -C docs/ html

Open docs/build/html/index.html in a web browser.

Third party code

  • google-app-engine-django

Some of the files in this directory and all of files under the appengine_django/ subdirectory are based on rev 81 of the google-app-engine-django Subversion repository.

  • Django

All files in django.zip are taken from Django 1.0.2-final. It was constructed by running the following commands:

zip -r django.zip django/__init__.py django/bin django/core \
                  django/db django/dispatch django/forms \
                  django/http django/middleware django/shortcuts \
                  django/template django/templatetags \
                  django/test django/utils django/views

zip -r django.zip django/conf -x 'django/conf/locale/*'

These commands were taken from http://code.google.com/appengine/articles/django10_zipimport.html

Some of the CSS files media/common/css are based on files that were copied from django/contrib/admin/media/css.

chirpradio-archiver's People

Watchers

 avatar  avatar  avatar

Forkers

kumar303

chirpradio-archiver's Issues

Rotate files better when the system is slow (dropped ticks)

Archive files are rotated at the start of every hour. In the current implementation, if the tick that happens at the top of the hour is dropped (which might happen for slow channel receivers) then the archive file will not get rotated. I've seen this happen while testing on my laptop when the wifi was spotty. I think we could take a new approach more like this:

  • last_rotation = timestamp
  • if tick is at the top of the hour or last_rotation > one_hour_ago then rotate the file

Retry harder when there are errors

What I've seen is that when the archiver can't connect to the streaming appliance, it retries but always fails. I think we need to make it retry for longer or possibly introduce a backoff. I think that in most cases the streaming appliance is restarting and taking a while to start up.

Log version of library at startup

It would be nice if the archiver logged the version of the code it's running from when it starts up. This can just be the git revision or whatever makes sense for installing it with go get ....

Always use Chicago time

Force Chicago time so files are always in sync with the broadcast. Right now the code just uses local time. This will run from a server in CHIRP's studio so not a big deal but nice to have.

Add a self-health check

It might be possible to add a periodic task to the ticker that checks the health of the system. Some things that might be interesting to check:

  • has a file been written lately?
  • is the currently active file growing in size?
  • has the broadcast task written bytes to its channel recently?

Don't write empty files

When the archiver encounters an error that it can't recover from, it writes 0 byte files. This is confusing because at a glance someone might think the archiver is working fine. It shouldn't write files at all.

Write ID3 tags for the current DJ

It's pretty easy to find out the current DJ using the CHIRP API so the archiver could write ID3 tags for Artist name as the DJ name. This would be nice when DJs are storing their archive files in their own music library. One consideration is that DJs sometimes take a few minutes to update the metadata at the beginning of their own show so this might work best as a post-processing step.

Organize files in date directory

Whoops, the old archiver organized files like:

/archives/2015/10/17/archive.mp3

The new archiver is missing the date part of that directory

Archive files sometimes play at the wrong speed

I have seen two reports of this but archive files always play fine in iTunes.

Example:

"iTunes plays the file normally at 1:00:00, as expected. In Windows Explorer, the file specifics indicate that its length is 25:12, not the full hour. In Audacity, the file length is 55:07, and plays sped up to capture that whole hour in the time allotted."

Maybe we need to add file headers specifying the sample rate and other meta info?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.