Java Client Library for Zencoder API
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
src
.classpath
.gitignore
.project
CHANGELOG.md
CONTRIBUTING.md
README.md
header.txt
pom.xml

README.md

zencoder-java

Java Client Library for Zencoder API

Current release version: 0.9.3 Current development version: 0.9.4-SNAPSHOT

How to use zencoder-java

Zencoder-java currently supports most of the functions of Zencoder, e.g.:

  • Watermarks
  • Multiple outputs
  • S3 storage (both for in and output)
  • Notifications (email, HTTP, ...)
  • ...

Using zencoder-java to create your zencoder jobs is fairly easy:

Create a client instance

ZencoderClient zencoderClient = new ZencoderClient(API_KEY, API_VERSION);
HttpClient client = new HttpClient(new SimpleHttpConnectionManager());
ApacheHttpClientHandler apacheHttpClientHandler = new ApacheHttpClientHandler(client, new DefaultApacheHttpClientConfig());
ApacheHttpClient httpClient = new ApacheHttpClient(apacheHttpClientHandler);
zencoderClient.setHttpClient(httpClient); 

Create Job

ZencoderJob job = new ZencoderJob("http://ca.bitzeche.de/big_buck_bunny_720p_h264.mov");

//region where the job is processed
job.setZencoderRegion(ZencoderRegion.EUROPE);

//set test mode
job.setTest(true);

Create Output

ZencoderOutput output = new ZencoderOutput("test", "se://test/");
job.addOutput(output);

Create Notification

//Add notification email
ZencoderNotification notification = new ZencoderNotification("test@test.de");
output.addNotification(notification);

Submit Job

client.createJob(job);

Cancel Job

client.cancelJob(job);

Resubmit Job

boolean resubmitted = client.resubmitJob(job);

Delete Job

client.deleteJob(job);

Add Watermark

ZencoderWatermark watermark = new ZencoderWatermark("http://url/");
output.addWatermark(watermark);