File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ Usage
2
+ =====
3
+
4
+ Here is some basic usage information::
5
+
6
+ import zencoder
7
+ zen = zencoder.Zencoder()
8
+ zen.jobs.list()
9
+
10
+ from zencoder import Zencoder
11
+ zen = Zencoder('abc123') # enter your api key
12
+
13
+ # creates an encoding job with the defaults
14
+ job = zen.job.create('http://input-file/movie.avi')
15
+ print job.code
16
+ print job.body
17
+ print job.body['id']
18
+
19
+ # get the transcode progress of the first output
20
+ progress = zen.output.progress(job.body['outputs'][0]['id'])
21
+ print progress.body
22
+
23
+
24
+ # configure your outputs with dictionaries
25
+ iphone = {
26
+ 'label': 'iPhone',
27
+ 'url': 's3://output-bucket/output-file-1.mp4',
28
+ 'width': 480,
29
+ 'height': 320
30
+ }
31
+ web = {
32
+ 'label': 'web',
33
+ 'url': 's3://output-bucket/output-file.vp8',
34
+ 'video_codec':, 'vp8'
35
+ }
36
+ # the outputs kwarg requires an iterable
37
+ outputs = (iphone, web)
38
+ another_job = zen.job.create(input_url, outputs=outputs)
39
+
You can’t perform that action at this time.
0 commit comments