Django with AWS elastic transcoder
Project description
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
Create a new Pipeline in AWS Elastic Transcoder.
Hookup every Notification.
Subscribe SNS Notification through HTTP
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-elastic-transcoder-0.2.tar.gz
.
File metadata
- Download URL: django-elastic-transcoder-0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7c089035193657da5b256140572288bf66fe3a8ebdffd820f7e89e524aa93d8d
|
|
MD5 |
e63a4477d30f1df56aa692680ac53cd8
|
|
BLAKE2b-256 |
c963a1214523bb291e23b69a9877817df2ed9ec79a188bfd0539417748247453
|