Install the ApsaraVideo VOD SDK for Java

Updated at:
Copy as MD

Add Maven dependencies to install the ApsaraVideo VOD SDK for Java.

Prerequisites

JDK 6 or later.

Install the SDK

Note
  • These examples use SDK V1.0. To install SDK V2.0, use the ApsaraVideo VOD SDK (V2.0) guide.

  • Download the latest SDK core library and VOD library from Server-side SDKs.

  • aliyun-java-sdk-core: the core library. Requires version 4.4.5 or later.

  • aliyun-java-sdk-vod: the VOD library. Update to the latest version when new APIs or features are unavailable. The ApsaraVideo VOD SDK Version History documents all release changes. On that page, select the SDK version and language, then click View Release Report.

  • aliyun-java-sdk-kms: the Key Management Service (KMS) dependency. Required only for HLS encryption with VOD SDK 2.16.9 or earlier.

  • Version numbers below are examples. Replace them with your required versions.

Add JAR dependencies:

<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>aliyun-java-sdk-core</artifactId>
  <version>4.6.0</version>
</dependency>
<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>aliyun-java-sdk-vod</artifactId>
  <version>2.16.10</version>
</dependency>
<dependency>
  <groupId>com.alibaba</groupId>
  <artifactId>fastjson</artifactId>
  <version>1.2.83</version>
</dependency>
<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>aliyun-java-sdk-kms</artifactId>
  <version>2.10.1</version>
</dependency>