Skip to main content

Django with AWS elastic transcoder

Project description

Build Status Coverage Status

Django + AWS Elastic Transcoder

Install

First, install dj_elastictranscode with pip

$ pip install django-elastic-transcoder

Then, add dj_elastictranscoder to INSTALLED_APPS

INSTALLED_APPS = (
    ...
    'dj_elastictranscoder',
    ...
)

Bind urls.py

urlpatterns = patterns('',
    ...
    url(r'^dj_elastictranscoder/', include('dj_elastictranscoder.urls')),
    ...
)

Migrate

$ ./manage.py migrate

Setting up AWS Elastic Transcoder

  1. Create a new Pipeline in AWS Elastic Transcoder.

  2. Hookup every Notification.

  3. Subscribe SNS Notification through HTTP

  4. You are ready to encode!

Usage

For instance, encode an mp3

from dj_elastictranscoder.transcoder import Transcoder

input = {
    'Key': 'path/to/input.mp3',
}

outputs = [{
    'Key': 'path/to/output.mp3',
    'PresetId': '1351620000001-300040' # for example: 128k mp3 audio preset
}]

pipeline_id = '<pipeline_id>'

transcoder = Transcoder(pipeline_id, 'ap-southeast-1')
transcoder.encode(input, outputs)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-elastic-transcoder-0.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page