Skip to content
An HTML 5 music player for Django
Python CSS JavaScript
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
djukebox models now fk to settings.AUTH_USER_MODEL. Careful, the migrations st… Aug 3, 2013


This is a pure HTML 5 based audio storage and playing app.  It does not and will not have a flash fallback.
Djukebox is currently very, very early in its development, but as is it allows you to upload an mp3 and it will
automatically encode an ogg version using sox or ffmpeg asynchronously via celery.  There is a track list view
which shows the tracks you currently have loaded and will play them (with a few bugs, depending on the web browser.

Django 1.3+
Celery - I believe 2.4+ will work, I am using 2.5.  You need a version with the @task decorator in celery.task
SoX or ffmpeg
Tastypie - be sure to put it in your installed apps

Configuration settings for - it should be pretty clear what these are:
DJUKEBOX_AUDIO_ENCODER = 'sox' # or 'ffmpeg' or 'avconv'
DJUKEBOX_SOX_BIN = '/usr/bin/sox'
DJUKEBOX_FFMPEG_BIN = '/usr/bin/ffmpeg'
DJUKEBOX_UPLOAD_FILE_TYPES = ('audio/mp3', 'audio/mpeg', 'audio/ogg')
DJUKEBOX_UPLOAD_FILE_MAX_SIZE = 100000000 #random big number here I haven't tested this bit, I just wanted the upload types tested
DJUKEBOX_MP3_CONTENT_TYPES = ('audio/mp3', 'audio/mpeg')
# default album, artist, etc. will be added shortly
DJUKEBOX_USE_MEDIA_URL = True # Defaults to False.  If True, content will be streamed from
# settings.MEDIA_URL rather than the stream view.  This is lighter weight, but less secure since
# it requires you to expose the raw audio files
DJUKEBOX_CONVERT_UPLOADS = True # Defaults to True.  If false, the file you upload is stored, but other formats will not be created

# These two are likely to change to allow more flexibility for uploading other file types
# and converting them to ogg or mp3 as well
# Encoders to go mp3 to ogg and ogg to mp3 using sox, ffmpeg, and avconv are provided
# ffmpeg has had frequent interface changes in the past and so may not work on your system
# djukebox.converters.FFMpegMp3ToOgg
# djukebox.converters.FFMpegOggToMp3
# djukebox.converters.AvconvMp3ToOgg
# djukebox.converters.AvconvOggToMp3
# djukebox.converters.SoxMp3ToOgg
# djukebox.converters.SoxOggToMp3

FAQ (I have not actually been asked frequently or at all as this project has only existed a few days):

Q: There's a bug in X / X feture is missing (ok, that's not really worded as a question):
A: If it's an obvious issue, I probably know.  I'm testing in the latest Firefox, Opera, and IE8 currently.
   It's very early in development, though, so it's going to be pretty broken.

Q: Why is there no flash fallback?
A: This is a project just for fun for me to experiment with stuff, use the latest and greatest tech, and learn.
   My goal is not to create a huge service or necessarily a widely used back end for other services to make everyone happy.
   You can create your own templates and js if you want something different.

Q: Why Celery?
A: See above for one.  Also, for the audio encoding.  Encoding within the browser held process is terrible and error prone.
   On the off chance  that this does get used for something serious, Celery is way more scalable and controllable than 
   things like forking off a separate python process from the fastcgi/mod_wsgi/whatever process.  It's really easy to 
   get working with RabbitMQ, and if you really dont't want to use RabbitMQ it can work with other brokers, so 
   there's really no reason not to use it.
You can’t perform that action at this time.