This topic provides answers to commonly asked questions about media asset upload.

Why is the file in the Uploading status for a long period of time?

The following section describes the possible causes:

  • Cause 1: You uploaded files from URLs in a batch. The URL-based upload is in asynchronous mode. In this case, the upload job may be queued.

    Check whether the UploadMediaByURL operation was called. If you call UploadMediaByURL to upload files, the URL-based upload jobs are asynchronous. After you submit a URL-based upload job, it may take hours, even days to complete.

  • Cause 2: You uploaded only the upload credential and no media file.

    Check whether the CreateUploadVideo operation was called. The CreateUploadVideo operation is used only to obtain an upload credential and create the basic information about a media file. You must use Object Storage Service (OSS) to upload a media file. For more information, see Upload media files by calling the ApsaraVideo VOD API.

  • Cause 3: The size of the file that you uploaded is large.

    Check the size of the uploaded file and whether the period of time during which the file remained in the Uploading status is within a valid range. By default, multipart upload applies when you use the ApsaraVideo VOD console, upload SDK, or PC client tool to upload files. Multipart upload allows you to upload a single file that is up to 48.8 TB in size. The upload SDK allows you to upload a single file that is up to 5 GB in size.

  • Cause 4: Network issues occur.

    Check whether the network bandwidth meets your business requirements.

What can I do if the upload SDK for iOS fails to upload files with an error Error Domain=NSCocoaErrorDomain?

Typically, the upload failure with the error code 207 and error message Error Domain=NSCocoaErrorDomain is usually caused by a file read error and lack of permissions. You can use either of the following methods to solve the problem:
  • Method 1: Grant the permission for reading local resources to the upload SDK for iOS.
  • Method 2: Store local resources in the sandbox directory before uploading.

What do I do if the "The service is not open in current region" error message appears when I upload files from URLs in a batch?

If the The service is not open in current region error message appears, URL-based upload is not supported in the current service region. URL-based upload is supported only in the China (Shanghai) and Singapore regions.

If you want to upload files from regions other than China (Shanghai) and Singapore, we recommend that you download the files to local PC and use the upload SDK to upload them to ApsaraVideo VOD. For more information, see Overview.

What can I do if a compatibility issue occurs when I use the SDK for JavaScript to upload a media file in WeChat?

This issue occurs because the WeChat browser is not compatible with the HTML5 player. To resolve this issue, delete the multiple="" parameter from <input type="file" name="file" id="files" multiple="">.

What can I do if the preview page is stretched when the resolution is set to 480p in the stream ingest SDK?

When the resolution of an ingested stream is set to 480p in the stream ingest SDK, the video image of the stream is properly displayed. However, the preview page may be stretched. This issue occurs because the resolution of a 480p video is 480 × 640 pixels, which is not supported by most mobile phone screens.

To resolve this issue, modify the settings of the SurfaceView parameter for the preview page in the activity_push.xml file, as shown in the following figure. TFpnKZEWmJXIKEqkNHdU.png poYUFCTzncXdWoUOyJKp.png

How can I view and import an AAR package in Android Studio?

To view files in an AAR package, change the file name extension of the package from .aar to .zip and decompress the package. Then, you can view the .class files, .xml files, .jar files, images, and text files in the package.

To import an AAR package, perform the following steps:
  1. Copy the .aar package to your project and reload the project. Generally, copy the package to the Project name/libs/ directory.
  2. In the build.gradle file, add the path of an on-premises repository to the root tag and add the compilation dependencies to the dependencies part.
    Replace libs in the sample code with the name of the directory to which the AAR package is imported. In the compile parameter, set the name field to the name of the AAR package and the ext field to the file name extension. IdybZmRLnUQfWAveqGGK.png
  3. Choose Build > Rebuild to rebuild the project.
    When the project is rebuilt, the imported AAR package is displayed in the External Libraries directory of the project. jwqQxvgFgbACgUTpklPK.png


For more information about the upload process and description, see the following documents based on your business requirements:
  • To upload media files by using the ApsaraVideo VOD console or upload tools on a PC, see Upload by using tools.
  • To upload media files by using the upload SDK of ApsaraVideo VOD, OSS SDK, URLs of source files, or OSS API operations, see Upload by developers