All Products
Search
Document Center

ApsaraVideo VOD:Server-side best practices for short dramas

Last Updated:Jun 22, 2026

The server-side of the micro-drama solution supports the upload, management, and processing of micro-drama media. Learn about the preparations required for the micro-drama solution.

Console operations

  • ApsaraVideo VOD is activated. For more information, see Activate ApsaraVideo VOD.

  • Upload-related system settings, including the storage path in the target region and callback settings, are configured. For instructions, see Manage storage buckets and Callback settings.

  • A RAM user is created to access ApsaraVideo VOD. To prevent security risks from AccessKey pair leakage on your Alibaba Cloud account, create a RAM user, grant it the permissions to access ApsaraVideo VOD, and use the RAM user's AccessKey pair (AccessKey ID and AccessKey Secret). For instructions, see Create and authorize a RAM user.

  • Configure the ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET environment variables. For more information, see Configure environment variables in Linux, macOS, and Windows.

    Important
    • An Alibaba Cloud account AccessKey pair has permissions on all API operations. Use a RAM user's AccessKey pair to call API operations or perform routine O&M.

    • Do not hard-code your AccessKey ID and AccessKey secret in project code. If leaked, all resources in your account are compromised.

Integrate the upload SDK for Java

Note

This example uses Java 1.8+ and upload SDK for Java 1.4.15. Steps may vary by version. The SDK requires manual JAR import — direct dependency integration is not supported. Troubleshooting.

  1. Download the upload SDK for Java and the sample code.

  2. Decompress the downloaded package.

    After extracting VODUploadDemo-java-1.4.15.zip, you get the following folders:

    • lib: JAR packages required by the upload SDK.

    • sample: Sample code for the upload SDK.

  3. Import the JAR packages.

    • Eclipse: Right-click your project, select Properties > Java Build Path > Add JARs, navigate to the extracted VODUploadDemo-java-1.4.15 folder, and add all jar files from the lib directory.

    • IntelliJ IDEA: Select File > Project Structure > Modules, click Dependencies on the right, click +, then JARs or directories. Navigate to the extracted VODUploadDemo-java-1.4.15 directory and add all jar files from the lib directory.

    Important

    After importing the JAR packages, configure the dependencies.

  4. Add dependencies: Alibaba Cloud SDK for Java, OSS SDK, ApsaraVideo VOD server-side SDK, and ApsaraVideo VOD upload SDK.

    Important
    • All listed dependencies are required. Missing any causes integration failure.

    • If you use the latest JAR package (aliyun-java-vod-upload-1.4.15.jar), ensure the aliyun-sdk-oss version is 3.9.0 or later and the aliyun-java-sdk-vod version is 2.16.11 or later.

    • ApsaraVideo VOD is available in the China (Shanghai), China (Shenzhen), and China (Beijing) regions. For uploads to China (Shenzhen) or China (Beijing): upload SDK 1.4.14 or earlier requires aliyun-java-sdk-vod 2.15.11+ and aliyun-java-sdk-core 4.4.5+; upload SDK 1.4.15 or later requires aliyun-java-sdk-vod 2.16.11+ and aliyun-java-sdk-core 4.4.5+.

    Show dependencies

       <dependency>
            <groupId>com.aliyun</groupId>
            <artifactId>aliyun-java-sdk-core</artifactId>
            <version>4.5.1</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun.oss</groupId>
            <artifactId>aliyun-sdk-oss</artifactId>
            <version>3.10.2</version>
        </dependency>
         <dependency>
            <groupId>com.aliyun</groupId>
            <artifactId>aliyun-java-sdk-vod</artifactId>
            <version>2.16.11</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.83</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20170516</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.2</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun.vod</groupId>
            <artifactId>upload</artifactId>
            <version>1.4.15</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/aliyun-java-vod-upload-1.4.15.jar</systemPath>
        </dependency>