Giter VIP home page Giter VIP logo

zencoder-py's Introduction

Zencoder

A Python module for the Zencoder API

Installation

Install from PyPI using easy_install or pip.

Dependencies

zencoder-py depends on httplib2, and uses the json or simplejson module.

Usage

from zencoder import Zencoder
zen = Zencoder('abc123') # enter your api key

# creates an encoding job with the defaults
job = zen.job.create('http://input-file/movie.avi')
print job.code
print job.body
print job.body['id']

# get the transcode progress of the first output
progress = zen.output.progress(job.body['outputs'][0]['id'])
print progress.body


# configure your outputs with dictionaries
iphone = {
             '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 iterable
outputs = (iphone, web)
another_job = zen.job.create(input_url, outputs=outputs)

Note: If you set the ZENCODER_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 the api_version keyword to the Zencoder object (defaults to v2):

# 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')

Contributors

zencoder-py's People

Contributors

issackelly avatar kennedyj avatar schworer avatar senko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.