- Notifications
You must be signed in to change notification settings - Fork36
StreetVoice/django-elastic-transcoder
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
django-elastic-transcoder is an Django app, let you integrate AWS Elastic Transcoder in Django easily.
What is provided in this package?
Transcoderclass- URL endpoint for receive SNS notification
- Signals for PROGRESS, ERROR, COMPLETE
EncodeJobmodel
First, installdj_elastictranscode withpip
$ pip install django-elastic-transcoder
Then, adddj_elastictranscoder toINSTALLED_APPS
INSTALLED_APPS= ( ...'dj_elastictranscoder', ...)
Bindurls.py
urlpatterns=patterns('', ...url(r'^dj_elastictranscoder/',include('dj_elastictranscoder.urls')), ...)
Migrate
$ ./manage.py migrate
- Create a new
Pipelinein AWS Elastic Transcoder. - Hookup every Notification.
- Subscribe SNS Notification through HTTP
- You are ready to encode!
Please settings up variables below to make this app works.
AWS_ACCESS_KEY_ID=<yourawsaccesskeyid>AWS_SECRET_ACCESS_KEY=<yourawssecretaccesskey>AWS_REGION=<awsregion>
For instance, encode an mp3
fromdj_elastictranscoder.transcoderimportTranscoderinput= {'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)transcoder.encode(input,outputs)# your can also create a EncodeJob for object automaticallytranscoder.create_job_for_object(obj)# Transcoder can also work standalone without Django# just pass region and required aws key/secret to Transcoder, when initiatetranscoder=Transcoder(pipeline_id,AWS_REGION,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY)
AWS Elastic Transcoder can send various SNS notification to notify your application, likePROGRESS,ERROR,WARNING andCOMPLETE
So this package provide a endpoint to receieve these notifications, for you to update transcode progress. without checking by your self.
Go to SNS section in AWS WebConsole to choose topic and subscribe with the url below.
http://<your-domain>/dj_elastictranscoder/endpoint/
Before notification get started to work, you have to activate SNS subscription, you will receive email with activation link.
After subscribe is done, you will receive SNS notification.
This package provide various signals for you to get notification, and do more things in your application. you can check the signals usage in tests.py for more usage example.
- transcode_onprogress
- transcode_onerror
- transcode_oncomplete
About
Django + AWS Elastic Transcoder
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.


