Zencoder API Client Library

An API client library for interacting with Zencoder

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.brightcove.zencoder.api
ArtifactId

ArtifactId

zencoder-java
Last Version

Last Version

2.0.23
Release Date

Release Date

Type

Type

jar
Description

Description

Zencoder API Client Library
An API client library for interacting with Zencoder
Project URL

Project URL

https://github.com/zencoder/zencoder-java
Source Code Management

Source Code Management

https://github.com/zencoder/zencoder-java

Download zencoder-java

How to add to project

<!-- https://jarcasting.com/artifacts/com.brightcove.zencoder.api/zencoder-java/ -->
<dependency>
    <groupId>com.brightcove.zencoder.api</groupId>
    <artifactId>zencoder-java</artifactId>
    <version>2.0.23</version>
</dependency>
// https://jarcasting.com/artifacts/com.brightcove.zencoder.api/zencoder-java/
implementation 'com.brightcove.zencoder.api:zencoder-java:2.0.23'
// https://jarcasting.com/artifacts/com.brightcove.zencoder.api/zencoder-java/
implementation ("com.brightcove.zencoder.api:zencoder-java:2.0.23")
'com.brightcove.zencoder.api:zencoder-java:jar:2.0.23'
<dependency org="com.brightcove.zencoder.api" name="zencoder-java" rev="2.0.23">
  <artifact name="zencoder-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.brightcove.zencoder.api', module='zencoder-java', version='2.0.23')
)
libraryDependencies += "com.brightcove.zencoder.api" % "zencoder-java" % "2.0.23"
[com.brightcove.zencoder.api/zencoder-java "2.0.23"]

Dependencies

compile (2)

Group / Artifact Type Version
org.springframework : spring-web jar 4.1.0.RELEASE
org.codehaus.jackson : jackson-mapper-lgpl jar 1.9.13

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

zencoder-java

Java library for interacting with the Zencoder API.

Getting Started

Add the library as a dependancy to your project.

If you're using Maven, add this to your pom.xml file:

    <dependency>
          <groupId>com.brightcove.zencoder.api</groupId>
          <artifactId>zencoder-java</artifactId>
          <version>2.0.23</version>
    </dependency>

Import the client and related classes:

import com.brightcove.zencoder.client.ZencoderClient;
import com.brightcove.zencoder.client.ZencoderClientException;
import com.brightcove.zencoder.client.model.*
import com.brightcove.zencoder.client.request.*
import com.brightcove.zencoder.client.response.*;

Instantiate a new client with your API key:

ZencoderClient client = new ZencoderClient("INSERT_API_KEY_HERE");

Usage

Create a new job:

ZencoderCreateJobRequest job = new ZencoderCreateJobRequest();
job.setInput("s3://zencodertesting/test.mov");
List<ZencoderOutput> outputs = new ArrayList<ZencoderOutput>();

ZencoderOutput output1 = new ZencoderOutput();
output1.setFormat(ContainerFormat.MP4);
outputs.add(output1);

ZencoderOutput output2 = new ZencoderOutput();
output2.setFormat(ContainerFormat.WEBM);
outputs.add(output2);

job.setOutputs(outputs);
ZencoderCreateJobResponse response = client.createZencoderJob(job);

Query an existing job:

String jobId = response.getId();
ZencoderJobDetail details = client.getZencoderJob(jobId);
String inputId = details.getInputMediaFile().getId();
String outputId1 = response.getOutputs().get(0).getId();
String outputId2 = response.getOutputs().get(1).getId();

ZencoderInputOutputProgress inputProgress = client.getInputProgress(inputId);
ZencoderInputOutputProgress outputProgress1 = client.getOutputProgress(outputId1);
ZencoderInputOutputProgress outputProgress2 = client.getOutputProgress(outputId2);

Cancel and resubmit an existing job:

client.cancelJob(jobId);
client.resubmitJob(jobId);

Copyright

See LICENSE.txt for details.

com.brightcove.zencoder.api

Zencoder

Versions

Version
2.0.23
2.0.22
2.0.20
2.0.19
2.0.18
2.0.17
2.0.15