Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a846b4

Browse files
committed
add usage docs
1 parente7d3952 commit1a846b4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

‎docs/usage.rst‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp