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

Zencoder integration library for Python

License

NotificationsYou must be signed in to change notification settings

zencoder/zencoder-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

A Python module for theZencoder API.

Installation

Install from PyPI usingeasy_install orpip.

pip install zencoder

Dependencies

zencoder-py depends onrequests, and uses thejson orsimplejson module.

Usage

from zencoder import Zencoderzen = Zencoder('abc123') # enter your api key# creates an encoding job with the defaultsjob = zen.job.create('http://input-file/movie.avi')print job.codeprint job.bodyprint job.body['id']# get the transcode progress of the first outputprogress = zen.output.progress(job.body['outputs'][0]['id'])print progress.body# configure your outputs with dictionariesiphone = {             'label': 'iPhone',             'url': 's3://output-bucket/output-file-1.mp4',             'width': 480,             'height': 320         }web = {          'label': 'web',          'url': 's3://output-bucket/output-file.vp8',          'video_codec':, 'vp8'      }# the outputs kwarg requires an iterableoutputs = (iphone, web)another_job = zen.job.create(input_url, outputs=outputs)

Note: If you set theZENCODER_API_KEY environment variable to your api key, you don't have to provide it when initializing Zencoder.

Specifying the API Version

Set the version of the Zencoder API you want to use as theapi_version keyword to theZencoder object (defaults tov2):

# set to version 1: https://app.zencoder.com/api/v1/zen=Zencoder(api_version='v1')# set to the edge version: https://app.zencoder.com/api/zen=Zencoder(api_version='edge')

Documentation

Docs are in progress, and hosted at Read the Docs:http://zencoder.rtfd.org

Contributors

About

Zencoder integration library for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors9

Languages


[8]ページ先頭

©2009-2025 Movatter.jp