Java Client Library for Zencoder API
Current release version: 0.9.3 Current development version: 0.9.4-SNAPSHOT
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:
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);
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);
ZencoderOutput output = new ZencoderOutput("test", "se://test/");
job.addOutput(output);
//Add notification email
ZencoderNotification notification = new ZencoderNotification("[email protected]");
output.addNotification(notification);
client.createJob(job);
client.cancelJob(job);
boolean resubmitted = client.resubmitJob(job);
client.deleteJob(job);
ZencoderWatermark watermark = new ZencoderWatermark("http://url/");
output.addWatermark(watermark);