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
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.
-
Download the upload SDK for Java and the sample code.
-
SDK version: 1.4.15
-
Update time: 2022-11-03
-
Download address: V1.4.15 SDK and demo source code
-
-
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.
-
-
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
libdirectory. -
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
libdirectory.
ImportantAfter importing the JAR packages, configure the dependencies.
-
-
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+.
-