All Products
Search
Document Center

ApsaraVideo VOD:FAQ about media asset upload

Last Updated:Sep 11, 2026

This topic describes common issues and solutions for media asset uploads.

Can I overwrite or replace an existing video by uploading a new video?

No. ApsaraVideo VOD does not support overwriting or replacing an existing video by uploading a new video. To update a video, you must upload the new video as a separate file, which generates a new VideoId. You then need to manually replace the reference address used in your business system with the new VideoId.

Why is my file stuck in the 'Uploading' status?

The issue may be caused by one of the following reasons:

  • Cause 1: URL-based batch upload is asynchronous.

    If you use the UploadMediaByURL API operation, the upload is an asynchronous task. The upload is not completed in real time and may take several hours or even days to finish. This operation is supported only in the China (Shanghai), China (Beijing), China (Shenzhen), Singapore, and U.S. (Silicon Valley) regions. We recommend that you integrate the ApsaraVideo VOD server-side upload SDK for uploads.

  • Cause 2: Only the upload credential was generated, but no file was uploaded. This is often described as "the CreateUploadVideo API operation returns a success response, but the console still shows the video as 'Uploading'".

    When you call the CreateUploadVideo API operation, it only obtains an upload credential and creates basic information for the media asset. The operation does not upload the file. Calling this operation successfully does not mean that the file upload is complete. You must use the returned UploadAuth and UploadAddress to call the SDK or an API operation to upload the file to Object Storage Service (OSS). For the complete steps, see Upload media files by calling the ApsaraVideo VOD API. We recommend that you add logs or breakpoints in your code to confirm whether the file upload step is actually executed and check its result.

  • Cause 3: The file is large, resulting in a long upload time.

    Check whether the file size and the time spent in the 'Uploading' status are reasonable. When you upload files using the console, upload SDK, or client tools, multipart upload is used by default. Multipart upload supports single files of up to 48.8 TB. The upload SDK also provides a simple upload feature, which supports single files of up to 5 GB.

  • Cause 4: Network issues.

    Check whether your network bandwidth meets the requirements.

    ApsaraVideo VOD does not impose any upload speed limits. The actual upload speed depends on your local bandwidth and network conditions. For large files (such as those larger than 700 MB), it is normal for the upload and subsequent transcoding to take a long time. We recommend that you check your network connection or the performance of your upload tool.

    Cross-region uploads (for example, uploading from the U.S. to Singapore) are significantly affected by network latency. No fixed estimated time can be provided for such scenarios.

    If a video remains in the 'Uploading' status for an extended period and transcoding has not started, it is typically because the file has not yet finished uploading. The system automatically triggers transcoding only after the file upload is complete. We recommend that you check the specific upload progress in the console or upload tool, and keep the upload page active until the upload is complete.

    If the console shows a continuous spinning indicator or the upload is stuck, use one of the following methods to diagnose the issue:

    • Press F12 to open the browser developer tools, and check the Network tab for failed requests or error responses.

    • Use packet capture tools such as Wireshark to analyze the client network requests and identify connection issues.

Why does the console still show "Uploading" after the VOD SDK triggers the onUploadSucceed callback?

This issue is usually caused by the file not being fully uploaded to Object Storage Service (OSS). Check whether the content-length-range setting in your PostPolicy is too restrictive; we recommend that you set it to 5368709120 (5 GB). Also confirm that your local network is normal and that the file has actually finished uploading. If the issue persists, try uploading the file again.

What is the difference between setUploadAuthAndAddress and resumeUploadWithAuth in the JavaScript SDK?

The two methods serve different upload scenarios:

Troubleshooting for no response or errors:

  1. Check whether uploadInfo.videoId has a value:

    • If it has a value, the server must call RefreshUploadVideo to refresh the credential.

    • If it is empty, call CreateUploadVideo on the server to obtain a new credential.

  2. Verify the frontend call logic:

    • After obtaining a new credential, you must call setUploadAuthAndAddress.

    • After refreshing an existing credential, you must call resumeUploadWithAuth.

  3. Check whether the credential permissions and parameters returned by the server are correct.

What do I do if the upload fails with a sensitive word or filename violation error?

Cause: When you call the CreateUploadVideo API operation, if the video filename contains sensitive words, the upload is blocked or the permission verification fails.

Solution: Rename the video file to a name that does not contain any sensitive words, and then call the CreateUploadVideo API operation again to obtain a new upload credential.

How do I handle concurrent upload exceptions or end-of-maintenance issues with the Android/iOS upload SDKs?

For end-of-maintenance SDKs: Avoid creating multiple uploader instances simultaneously. Ensure that the previous upload task is complete before starting the next one.

Android SDK null pointer exception: The Android SDK may throw a null pointer exception and crash when you make multiple calls under a single instance or perform concurrent uploads with multiple images. This is a known issue caused by conflicts in the internal release and cancel processes. We recommend that you use sequential uploads to avoid this risk.

Why does uploading a non-video file show success or return a 500 error in the callback?

Upload succeeds for non-video files: Images and audio files are supported media types and can be uploaded normally. If a completely unrelated file type shows a successful upload, it may be due to the file extension being misidentified, custom upload logic bypassing the verification, or the API upload not enabling strict format verification. We recommend that you verify the supported file extension list.

Callback returns a 500 error: ApsaraVideo VOD does not support uploading text documents such as .docx files. Attempting to upload such non-media files and triggering a callback results in a 500 error. We recommend that you upload only supported media types such as audio and video, or disable unnecessary callback configurations in the console.

Do a large number of ongoing upload tasks affect other users' uploads? How do I clean up invalid tasks?

Task independence: Upload tasks are independent. A large number of ongoing tasks in the background typically does not affect other users' normal uploads.

Cleaning up invalid tasks:

  • If you only called the credential creation API but did not upload the actual file, the task will remain in the 'Uploading' status indefinitely and will not be automatically closed.

  • Tasks that fail due to upload interruption are not automatically deleted.

In both cases, you must manually cancel or delete the tasks in the console.

What do I do if an upload fails on the iOS upload SDK with the error Error Domain=NSCocoaErrorDomain?

An upload failure with error code 207 and the error message "Error Domain=NSCocoaErrorDomain" is typically caused by a file read error due to a lack of permissions. To resolve this issue, use one of the following methods:

  • Method 1: Grant the upload SDK for iOS the permission to read local resources.

  • Method 2: Store local resources in the sandbox path before you upload them.

What do I do if the "The service is not open in current region" error occurs during a URL-based batch upload?

The error message The service is not open in current region indicates that URL-based batch upload is not supported in the current region. URL-based batch upload is currently supported only in the China (Shanghai) and Singapore regions.

If you are in a different region, you can download the audio or video files to your local computer and then use the upload SDK to upload them. For more information, see SDK Overview.

Why can't I view an uploaded image in the console?

When you upload an image-type media asset, if you set its type to cover (video thumbnail), the file is not displayed in the console. You can query the image only by calling an API operation. For more information, see CreateUploadImage - Obtain an image upload URL and credential.

What do I do if a video uploaded in MOV format cannot be played, and I cannot get its URL by VideoId?

This issue is usually caused by limited support for the MOV format. We recommend that you transcode the MOV video to a common format such as MP4 before you upload it. If you need to obtain the playback URL of the source file, call the GetMezzanineInfo operation to get the FileURL. Also check whether you are using the latest version of the SDK (for example, vod20170321 version 3.6.4) and upgrade if needed, and refer to the official demo for testing and verification.

Compatibility issues with JS SDK uploads in WeChat

This issue occurs because of a compatibility problem with HTML5 in the WeChat browser. To resolve this issue, remove the multiple="" parameter from <input type="file" name="file" id="files" multiple=""> to ensure a successful upload.

What do I do if onUploadProgress does not trigger and no error is reported when I upload using the Web SDK?

Troubleshoot the issue in the following order:

  1. Check your browser environment: Disable ad-blocking extensions (such as AdBlock or uBlock Origin), or add the Alibaba Cloud domain to the allowlist of such extensions. If you use Microsoft Edge, temporarily disable Tracking prevention or Enhanced security mode to test whether the issue persists.

  2. Check your SDK code logic: Confirm whether uploader.setUploadAuthAndAddress(uploadInfo, uploadAuth, uploadAddress, videoId) is called synchronously in the onUploadStarted callback.

  3. Verify the parameter format and validity: Check whether uploadAuth and uploadAddress are valid Base64-encoded strings, whether their structure matches the official demo, and whether the credential is still within its 30-minute validity period.

  4. Print the actual parameter values that are passed to setUploadAuthAndAddress, and check whether any value is empty or has an unexpected format.

What do I do if resumable upload fails with AccessDenied, or a message indicating that the AliyunVodSaasStsRole role is missing?

You do not need to manually create the AliyunVodSaasStsRole role. AccessDenied errors are usually caused by one of the following reasons:

  1. After the credential is refreshed, the new UploadAuth is not passed to the resumeUploadWithAuth method.

  2. When you use the native OSS SDK, UploadAuth and UploadAddress are not Base64-decoded.

  3. The STS token has expired or does not have sufficient permissions.

  4. The upload file path does not match the path authorized in the STS policy (for example, the sv folder instead of the customerTrans folder).

The required permission is oss:PutObject. To resolve this issue:

  • Make sure that the upload path matches the path authorized in the RAM or STS policy, or update the policy to include the actual upload directory.

  • Check the credential passing and decoding logic in your code.

  • Confirm that the token is still within its validity period.

Preview page stretching at specific resolutions with the Push SDK

When you select a resolution of 480p in the Push SDK, the preview page appears stretched, but the actual stream ingest is normal. This happens because 480p corresponds to a resolution of 480 × 640. The aspect ratio is not supported by most mobile phone screens, which causes the stretching.

Solution: Modify the aspect ratio of the SurfaceView on the preview page. Change the content of the activity_push.xml file as follows.


public void initView() {
    mPreviewView = (SurfaceView) findViewById(R.id.preview_view);
    mPreviewView.getHolder().addCallback(mCallback);
}

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <SurfaceView
            android:id="@+id/preview_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    <!--FrameLayout-->
        <!--android:id="@+id/publisher_fragment"-->
        <!--android:layout_width="match_parent"-->
        <!--android:layout_height="match_parent"-->
        <!--android:visibility="gone"/>-->

    <android.support.v4.view.ViewPager
            android:id="@+id/tv_pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >
    </android.support.v4.view.ViewPager>
</RelativeLayout>

How to view and import AAR package data in Android Studio

To view AAR package data, change the file extension from .aar to .zip and decompress the file. Then, you can view the contents, such as .class files, .xml files, .jar files, images, and text.

To import AAR package data:

  1. Copy the .aar file to your project folder, typically to the projectName/libs/ path, and then reload the project. Copy the library files, such as AlivcPlayer.aar, aliyun-vod-upload-android-sdk-1.1.1.jar, aliyun-vod-croe-android-sdk-1.2.1.jar, gson-2.8.0.jar, and jsr305-3.0.0.jar, to the app > libs directory of your project, and then reload the project.

  2. In the build.gradle file, add the local repository path under the root tag and add the compile dependency in the `dependencies` block.

    The libs directory name depends on the folder where the package is imported into your project. In the compile parameter, name specifies the name of the AAR file, and ext specifies the file extension.

    
    repositories{
        flatDir{
            dirs 'libs'
        }
    }
    
    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:26+'
        compile 'com.android.support:design:26+'
        compile (name:'AlivcPlayer',ext:'aar')
        // The upload SDK depends on the OSS upload SDK
        compile 'com.aliyun.dpa:oss-android-sdk:2.4.5'
    }
    
  3. Select Build > Rebuild to rebuild the project.

    After the build is complete, the imported AAR package appears in the External Libraries section of the project.

    
    External Libraries
    ├── Android API 26 Platform
    ├── JRE 1.8
    ├── AlivcPlayer:@aar
    │   ├── classes.jar (library root)
    │   │   └── com
    │   │       ├── alivc.player
    │   │       └── aliyun.aliyunplayer
    │   └── res (library root)
    │       ├── values
    │       └── values-zh-rCN
    ├── com.aliyun.dpa:oss-android-sdk-2.4.5
    ├── com.android.support:animated-vector-drawable:26.0.0-alpha1
    ├── com.android.support:appcompat-v7:26.0.0-alpha1
    ├── com.android.support:design:26.0.0-alpha1
    ├── com.android.support:recyclerview-v7:26.0.0-alpha1
    ├── com.android.support:support-annotations:26.0.0-alpha1
    └── com.android.support:support-compat:26.0.0-alpha1
    

Is it normal for a URL-based batch upload to take a long time to complete?

URL-based batch upload is an asynchronous task. The system must first download the file from the source URL and then upload it to ApsaraVideo VOD. For large files, or when the bandwidth of the source server is limited, this process can take several hours. This is expected behavior. We recommend that you take the following actions:

  • Confirm that the source URL is accessible over the Internet and that the download speed is normal.

  • For large files that must be available quickly, use the server-side upload SDK or the client-side upload SDK instead.

Why is no VideoId generated after a server-side upload, or why is the host resolved to localhost?

Both symptoms are usually caused by an incorrect region configuration when the upload client is initialized. When you initialize vodClient, explicitly set the correct regionId, such as cn-beijing, and use the public endpoint of that region. This prevents the domain name from being resolved incorrectly.

What do I do if a network error is reported during a console or web page upload?

A network error is usually related to the browser or the local network environment. Try the following:

  • Switch to a different browser or network and try the upload again.

  • Confirm that your local network can resolve the OSS upload domain. You can use the ping command to verify this.

  • If the issue persists, use the server-side upload SDK to upload the file instead.

Which network policies do I need to allow if connecting to the OSS domain times out during video upload?

In addition to allowing port 443 on vod.cn-shanghai.aliyuncs.com, you also need to allow port 443 on the actual destination OSS domain for the upload (for example, outin-*.oss-cn-shanghai.aliyuncs.com). We recommend that you also allow port 443 on vod-upload.cn-shanghai.aliyuncs.com (the upload endpoint) and sts.cn-shanghai.aliyuncs.com (used to obtain temporary credentials). If your server is deployed within a VPC, you need to configure a NAT gateway or an EIP to access these public domains.

Does ApsaraVideo VOD provide the MD5 or CRC-64 hash value of an uploaded video?

No. ApsaraVideo VOD does not provide a feature to query the MD5, CRC-64, or other hash values of an uploaded video. If your business requires file integrity verification, we recommend that you calculate and record the hash value on the client or server side before you upload the file.

Related links

For more information about the upload flow and instructions, see the following documents:

  • For more information about how to upload files using the ApsaraVideo VOD console or PC upload tools, see Upload using tools.

  • For more information about how to upload files using the ApsaraVideo VOD upload SDK, native OSS SDK, URL-based batch upload, or OSS API operations, see Developer-based upload.

What do I do if Content-Type is displayed as application/octet-stream after a URL-based batch upload?

The FileExtension parameter in the UploadMediaByURL API operation specifies the format of the source file so that ApsaraVideo VOD can transcode and play the media correctly. It does not modify the Content-Type metadata of the Object Storage Service (OSS) object. Therefore, Content-Type may be displayed as application/octet-stream after a URL-based batch upload.

To change Content-Type to a value such as video/mp4, use the set-meta command in ossutil after the upload to modify the file metadata in OSS in bulk. Alternatively, trigger transcoding to generate a new file. Transcoding incurs fees.

How do I check the status of a URL-based batch upload task and troubleshoot an upload failure?

If a URL-based batch upload fails or you need to confirm the progress of an upload task, call the GetURLUploadInfos API operation to query the task status. Use the returned information to diagnose the upload failure. If the failure is caused by an inconsistency between the OSS storage interface and your configuration, use this information to identify the discrepancy. Verify that the OSS storage interface and the configuration are consistent.