You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Setting Up AWS SNS endpoint
AWS Elastic Transcoder can send various SNS notification to notify your application, like PROGRESS, ERROR, WARNING and COMPLETE
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.
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.
Signals
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.