Skip to content

Commit 7268137

Browse files
committed
Update README.md
Add usage
1 parent 82cb416 commit 7268137

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,27 @@ Setting up AWS Elastic Transcoder
5555
2. Hookup every Notification.
5656
3. Subscribe SNS Notification through HTTP
5757
4. You are ready to encode!
58+
59+
60+
61+
Usage
62+
------------
63+
64+
For instance, encode an mp3
65+
66+
```python
67+
from dj_elastictranscoder.utils import encode
68+
69+
input = {
70+
'Key': 'path/to/input/file.mp3',
71+
}
72+
73+
outputs = [{
74+
'Key': 'path/to/output/file.mp3',
75+
'PresetId': '1351620000001-300040' # for example: 128k mp3 audio preset
76+
}]
77+
78+
pipeline_id = '<pipeline_id>'
79+
80+
encode(pipeline_id, input, outputs)
81+
```

0 commit comments

Comments
 (0)