All Products
Search
Document Center

ApsaraVideo VOD:Audio extraction

Last Updated:Jul 31, 2023

After you enable the audio extraction feature, Alibaba Cloud CDN points of presence (POPs) extract audio data from a video file and then return only the audio data to clients. This reduces bandwidth and traffic usage. This topic describes how to enable the audio extraction feature.

Background information

When a client requests a video file, the client sends a request to the nearest CDN node. The request contains the URL of the video file, for example, http://www.aliyun.com/test.flv?ali_audio_only=1. Then, the CDN node returns the audio data extracted from the video file to the client. The client must support the following transmission method: Transfer-Encoding: chunked.

Note
  • The audio extraction feature does not support range requests. Browsers such as Safari initiate a range request when a user plays a video. We recommend that you provide user-developed clients to your users for extracting audio data.
  • If you want to advance or rewind the audio during playback, you must enable the seeking feature. When you perform a seeking operation, ApsaraVideo VOD reads the metadata of the original file, obtains information about the playback position that you seek to, and starts playback from the position that you specified. For more information, see Video seeking.

  • Audio extraction does not support MP4 files whose box header size is 16 (64 bits). It only supports MP4 files whose box header size is 8.

Procedure

  1. Log on to the ApsaraVideo VOD console.

  2. In the left-side navigation pane, choose Configuration Management > CDN Configuration > Domain Names. The Domain Names page appears.

  3. On the Domain Names page, find the domain name that you want to manage and click Configure in the Actions column.

  4. On the page that appears, click Video Related.

  5. In the Audio Extraction section, turn on Audio Extraction.

    After the audio extraction feature is enabled, you must include the ali_audio_only parameter in your requests to extract audio data. The following table describes the types of files that support the audio extraction feature.

    File formatMetadataali_audio_onlyExample
    MP4The metadata of a video file on the origin server must be contained in the file header and cannot be contained in the file tail. Set the ali_audio_only parameter to 1 to require Alibaba Cloud CDN to return only the metadata and audio data of the requested video file. The video data is not returned. If requests do not include this parameter or it is set to other values, audio extraction is not performed. http://domain/video.mp4?ali_audio_only=1.
    FLVNo requirements. Set the ali_audio_only parameter to 1 to require Alibaba Cloud CDN to return only the metadata and audio data of the requested video file. The video data is not returned. If requests do not include this parameter or it is set to other values, audio extraction is not performed.http://domain/video.flv?ali_audio_only=1.

References

BatchSetVodDomainConfigs