sys/saveas persists the output of an OSS processing operation directly to a bucket. Use it whenever you need to keep a processed file rather than discard it after serving.
How it works
OSS processing is either synchronous or asynchronous:
Synchronous processing (images): results are served directly. OSS discards the output after the response unless you attach
sys/saveas.Asynchronous processing (video, audio, documents): OSS runs the job in the background and returns a task ID. Because there is no direct download response,
sys/saveasis required — it is the only way to retrieve the result.
In both cases, sys/saveas appends two steps to the processing pipeline: write the output object to a bucket and optionally name it. Everything before sys/saveas describes what to process; sys/saveas describes where to save it.
Request string anatomy:
image/resize,w_100 | sys/saveas , o_<base64-object-name> , b_<base64-bucket-name>
└──────────────┘ └──────────┘ └──────────────────────┘ └───────────────────────┘
Processing params Save directive Destination object Destination bucket
(URL-safe Base64) (URL-safe Base64)Prerequisites
Before you begin, ensure that you have:
oss:PostProcessTaskpermission on the source bucketoss:PutObjectpermission on the destination objectA source bucket and a destination bucket in the same region under the same Alibaba Cloud account (the two buckets can be the same bucket)
Parameters
| Option | Description | Required |
|---|---|---|
o | Destination object name, URL-safe Base64 encoded. Supports variables in the format {varname} or a combination of a literal string and {varname}. See Variables. | Yes |
b | Destination bucket name, URL-safe Base64 encoded. Supports the same variable formats as o. If omitted, OSS saves the output to the source bucket. See Variables. | No |
Limits
Access control list (ACL): The saved object inherits the bucket's ACL. Custom ACLs are not supported.
URL-based processing: Saving a processed file directly from a URL to a bucket is not supported. Download the processed file locally first, then upload it to the destination bucket.
Object expiration: To set a retention period for saved objects, configure an expiration policy using lifecycle rules. See Introduction to lifecycle rules.
Save processed files using an SDK
The examples below append sys/saveas to the processing parameter string to write the output directly to a bucket. For other SDK languages, see Overview.
<details> <summary>Python</summary>
# -*- coding: utf-8 -*-
import os
import base64
import oss2
from oss2.credentials import EnvironmentVariableCredentialsProvider
# Load credentials from environment variables.
auth = oss2.ProviderAuth(EnvironmentVariableCredentialsProvider())
# Replace with the endpoint of the region where the source bucket is located.
# For example: https://oss-cn-hangzhou.aliyuncs.com
endpoint = 'https://oss-cn-hangzhou.aliyuncs.com'
source_bucket_name = 'srcbucket'
# The destination bucket must be in the same region as the source bucket.
target_bucket_name = 'destbucket'
# Specify the full object path if the object is not in the root directory.
# For example: example/example.jpg
source_image_name = 'example/example.jpg'
bucket = oss2.Bucket(auth, endpoint, source_bucket_name)
# Resize the image to 100x100 px (fixed dimensions).
style = 'image/resize,m_fixed,w_100,h_100'
target_image_name = 'exampledir/example.jpg'
# Append sys/saveas to write the output to the destination bucket.
process = "{0}|sys/saveas,o_{1},b_{2}".format(style,
oss2.compat.to_string(base64.urlsafe_b64encode(oss2.compat.to_bytes(target_image_name))),
oss2.compat.to_string(base64.urlsafe_b64encode(oss2.compat.to_bytes(target_bucket_name))))
result = bucket.process_object(source_image_name, process)
print(result)</details>
<details> <summary>Java</summary>
import com.aliyun.oss.*;
import com.aliyun.oss.common.auth.*;
import com.aliyun.oss.common.comm.SignVersion;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.common.utils.IOUtils;
import com.aliyun.oss.model.GenericResult;
import com.aliyun.oss.model.ProcessObjectRequest;
import java.util.Formatter;
public class Demo {
public static void main(String[] args) throws Throwable {
// The China (Hangzhou) region is used in this example. Specify the actual endpoint.
String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
// Specify the region ID that corresponds to the endpoint. For example, cn-hangzhou.
String region = "cn-hangzhou";
// Load credentials from environment variables to avoid hardcoding secrets.
EnvironmentVariableCredentialsProvider credentialsProvider = CredentialsProviderFactory.newEnvironmentVariableCredentialsProvider();
// Specify the source bucket name. For example, examplebucket.
String bucketName = "examplebucket";
// Specify the full object path within the bucket (no bucket name prefix).
String sourceImage = "exampleimage.png";
ClientBuilderConfiguration clientBuilderConfiguration = new ClientBuilderConfiguration();
// Use the V4 signature algorithm.
clientBuilderConfiguration.setSignatureVersion(SignVersion.V4);
OSS ossClient = OSSClientBuilder.create()
.endpoint(endpoint)
.credentialsProvider(credentialsProvider)
.clientConfiguration(clientBuilderConfiguration)
.region(region)
.build();
try {
// Resize the image to 100x100 px (fixed dimensions).
String styleType = "image/resize,m_fixed,w_100,h_100";
String targetImage = "example-resize.png";
// Append sys/saveas to write the output to the source bucket.
StringBuilder sbStyle = new StringBuilder();
Formatter styleFormatter = new Formatter(sbStyle);
styleFormatter.format("%s|sys/saveas,o_%s,b_%s", styleType,
BinaryUtil.toBase64String(targetImage.getBytes()),
BinaryUtil.toBase64String(bucketName.getBytes()));
ProcessObjectRequest request = new ProcessObjectRequest(bucketName, sourceImage, sbStyle.toString());
GenericResult processResult = ossClient.processObject(request);
String json = IOUtils.readStreamAsString(processResult.getResponse().getContent(), "UTF-8");
processResult.getResponse().getContent().close();
System.out.println(json);
} catch (OSSException oe) {
System.out.println("Error Message:" + oe.getErrorMessage());
System.out.println("Error Code:" + oe.getErrorCode());
System.out.println("Request ID:" + oe.getRequestId());
System.out.println("Host ID:" + oe.getHostId());
} catch (ClientException ce) {
System.out.println("Error Message:" + ce.getMessage());
} finally {
if (ossClient != null) {
ossClient.shutdown();
}
}
}
}</details>
<details> <summary>Go</summary>
package main
import (
"fmt"
"os"
"encoding/base64"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
)
func main() {
// Load credentials from environment variables.
provider, err := oss.NewEnvironmentVariableCredentialsProvider()
if err != nil {
fmt.Println("Error:", err)
os.Exit(-1)
}
// Replace with the endpoint of the bucket's region.
// For example: https://oss-cn-hangzhou.aliyuncs.com
client, err := oss.New("https://oss-cn-hangzhou.aliyuncs.com", "", "", oss.SetCredentialsProvider(&provider))
if err != nil {
fmt.Println("Error:", err)
os.Exit(-1)
}
bucketName := "srcbucket"
bucket, err := client.Bucket(bucketName)
if err != nil {
HandleError(err)
}
sourceImageName := "example/example.jpg"
// The destination bucket must be in the same region as the source bucket.
targetBucketName := "destbucket"
targetImageName := "exampledir/example.jpg"
// Resize to 100x100 px and append sys/saveas to write to the destination bucket.
style := "image/resize,m_fixed,w_100,h_100"
process := fmt.Sprintf("%s|sys/saveas,o_%v,b_%v", style,
base64.URLEncoding.EncodeToString([]byte(targetImageName)),
base64.URLEncoding.EncodeToString([]byte(targetBucketName)))
result, err := bucket.ProcessObject(sourceImageName, process)
if err != nil {
HandleError(err)
} else {
fmt.Println(result)
}
}</details>
<details> <summary>PHP</summary>
<?php
if (is_file(__DIR__ . '/../autoload.php')) {
require_once __DIR__ . '/../autoload.php';
}
if (is_file(__DIR__ . '/../vendor/autoload.php')) {
require_once __DIR__ . '/../vendor/autoload.php';
}
use OSS\OssClient;
// Load credentials from environment variables.
$accessKeyId = getenv("OSS_ACCESS_KEY_ID");
$accessKeySecret = getenv("OSS_ACCESS_KEY_SECRET");
// Replace with the endpoint of the region where the bucket is located.
// For example: https://oss-cn-hangzhou.aliyuncs.com
$endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
$bucket = "examplebucket";
$object = "exampledir/exampleobject.jpg";
$save_object = "example-new.jpg";
function base64url_encode($data)
{
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
// Resize to 100x100 px and rotate 90 degrees.
$style = "image/resize,m_fixed,w_100,h_100/rotate,90";
// Append sys/saveas to save the output to the source bucket.
$process = $style .
'|sys/saveas' .
',o_' . base64url_encode($save_object) .
',b_' . base64url_encode($bucket);
$result = $ossClient->processObject($bucket, $object, $process);
print($result);</details>
<details> <summary>Node.js</summary>
const OSS = require('ali-oss');
const client = new OSS({
// Replace with the region where the bucket is located.
// For example: oss-cn-hangzhou
region: 'oss-cn-hangzhou',
// Load credentials from environment variables.
accessKeyId: process.env.OSS_ACCESS_KEY_ID,
accessKeySecret: process.env.OSS_ACCESS_KEY_SECRET,
bucket: 'examplebucket'
});
const sourceImage = 'sourceObject.png';
const targetImage = 'targetObject.jpg';
// processObjectSave appends sys/saveas and writes the output to targetBucket.
// If targetBucket is omitted, the output goes to the source bucket.
async function processImage(processStr, targetBucket) {
const result = await client.processObjectSave(
sourceImage,
targetImage,
processStr,
targetBucket
);
console.log(result.res.status);
}
// Save a resized image to the source bucket.
processImage("image/resize,m_fixed,w_100,h_100");
// Save a cropped image to the source bucket.
processImage("image/crop,w_100,h_100,x_100,y_100,r_1");
// Save a rotated image to the source bucket.
processImage("image/rotate,90");
// Save a sharpened image to the source bucket.
processImage("image/sharpen,100");
// Save a watermarked image to the source bucket.
processImage("image/watermark,text_SGVsbG8g5Zu-54mH5pyN5YqhIQ");
// Save a format-converted image to the source bucket.
processImage("image/format,jpg");
// Save a format-converted image to a different bucket.
processImage("image/format,jpg", "target-bucket");</details>
<details> <summary>C++</summary>
#include <alibabacloud/oss/OssClient.h>
#include <sstream>
using namespace AlibabaCloud::OSS;
int main(void)
{
// Replace with the endpoint of the bucket's region.
// For example: https://oss-cn-hangzhou.aliyuncs.com
std::string Endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
std::string BucketName = "examplebucket";
// Specify the full object path if the object is not in the root directory.
// For example: example/example.jpg
std::string SourceObjectName = "example/example.jpg";
std::string TargetObjectName = "exampledir/example.jpg";
InitializeSdk();
ClientConfiguration conf;
// Load credentials from environment variables.
auto credentialsProvider = std::make_shared<EnvironmentVariableCredentialsProvider>();
OssClient client(Endpoint, credentialsProvider, conf);
// Resize to 100x100 px and append sys/saveas to write to the source bucket.
std::string Process = "image/resize,m_fixed,w_100,h_100";
std::stringstream ss;
ss << Process
<< "|sys/saveas"
<< ",o_" << Base64EncodeUrlSafe(TargetObjectName)
<< ",b_" << Base64EncodeUrlSafe(BucketName);
ProcessObjectRequest request(BucketName, SourceObjectName, ss.str());
auto outcome = client.ProcessObject(request);
ShutdownSdk();
return 0;
}</details>
Save processed files using the REST API
Call the PostObject operation directly for custom integrations. Pass x-oss-process in the request body and append sys/saveas to redirect the output to a bucket.
Synchronous operations (image processing): use
x-oss-processAsynchronous operations (video, audio, document conversion): use
x-oss-async-process
The following table lists all available scenarios. Each links to the corresponding example below.
| Media type | Method | Section |
|---|---|---|
| Image | Processing parameters | Images — processing parameters |
| Image | Style | Images — style |
| Document | Processing parameters | Documents — processing parameters |
| Document | Style | Documents — style |
| Video | Transcode — processing parameters | Videos — transcoding |
| Video | Transcode — style | Videos — transcoding |
| Video | Animated image — processing parameters | Videos — animated images |
| Video | Sprite — processing parameters | Videos — sprites |
| Video | Snapshot — processing parameters | Videos — snapshots |
| Video | Concatenation — processing parameters | Videos — concatenation |
| Audio | Transcode — processing parameters | Audio — transcoding |
| Audio | Concatenation — processing parameters | Audio — concatenation |
Images
Using processing parameters
POST /ObjectName?x-oss-process HTTP/1.1
Host: oss-example.oss.aliyuncs.com
Content-Length: 247
Date: Fri, 04 May 2012 03:21:12 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,AdditionalHeaders=content-length,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-process=image/resize,w_100|sys/saveas,o_dGVzdC5qcGc,b_dGVzdAResizes test.jpg to a width of 100 px (proportional) and saves it to the bucket test.
Using a style
POST /ObjectName?x-oss-process HTTP/1.1
Host: oss-example.oss.aliyuncs.com
Content-Length: 247
Date: Fri, 04 May 2012 03:22:13 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,AdditionalHeaders=content-length,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-process=style/examplestyle|sys/saveas,o_dGVzdC5qcGc,b_dGVzdAApplies examplestyle to test.jpg and saves it to the bucket test.
Documents
Using processing parameters — DOCX to PNG
| Detail | |
|---|---|
| Input | example.docx (DOCX) |
| Output | PNG files at oss://test-bucket/doc_images/ |
POST /exmaple.docx?x-oss-async-process HTTP/1.1
Host: doc-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=doc/convert,target_png,source_docx|sys/saveas,b_dGVzdC1idWNrZXQ,o_ZG9jX2ltYWdlcy97aW5kZXh9LnBuZwUsing a style
| Detail | |
|---|---|
| Input | example.docx (DOCX) |
| Output | Files at oss://test-bucket/doc_images/ |
POST /exmaple.docx?x-oss-async-process HTTP/1.1
Host: doc-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=style/examplestyle|sys/saveas,b_dGVzdC1idWNrZXQ,o_ZG9jX2ltYWdlcy97aW5kZXh9LnBuZwVideos
Transcoding
Using processing parameters — AVI to MP4
| Detail | |
|---|---|
| Input | example.avi (AVI) |
| Output format | MP4, video: H.265, 1920x1080, 30 fps, 2 Mbps; audio: AAC, 100 Kbps; subtitles: disabled |
| Output path | oss://outbucket/outobj.mp4 |
POST /exmaple.avi?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=video/convert,f_mp4,vcodec_h265,s_1920x1080,vb_2000000,fps_30,acodec_aac,ab_100000,sn_1|sys/saveas,o_b3V0b2JqLnthdXRvZXh0fQo,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQUsing a style
| Detail | |
|---|---|
| Input | example.avi (AVI) |
| Output | MP4 at oss://outbucket/outobjprefix.mp4 |
POST /exmaple.avi?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=style/examplestyle|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQAnimated images
Using processing parameters — MKV to GIF
| Detail | |
|---|---|
| Input | example.mkv |
| Output | GIF, 100x100, 1-second frame interval, saved to oss://outbucket/outobjprefix.gif |
POST /exmaple.mkv?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=video/animation,f_gif,w_100,h_100,inter_1000|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQUsing a style
| Detail | |
|---|---|
| Input | example.mkv |
| Output | GIF at oss://outbucket/outobjprefix.gif |
POST /example.mkv?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=style/examplestyle|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQSprites
Using processing parameters — MKV to JPG sprite
| Detail | |
|---|---|
| Input | example.mkv |
| Output | JPG sprite, 100x100 sub-images, 10-second frame interval, 10x10 grid, padding and margin both 0, saved to oss://outbucket/outobjprefix-%d.jpg |
POST /example.mkv?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=video/sprite,f_jpg,sw_100,sh_100,inter_10000,tw_10,th_10,pad_0,margin_0|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LXtpbmRleH0ue2F1dG9leHR9CgUsing a style
| Detail | |
|---|---|
| Input | example.mkv |
| Output | JPG sprite at oss://outbucket/outobjprefix-%d.jpg |
POST /example.mkv?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=style/examplestyle|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LXtpbmRleH0ue2F1dG9leHR9CgSnapshots
Using processing parameters — MKV to JPG snapshots
| Detail | |
|---|---|
| Input | example.mkv |
| Output | JPG snapshots, 100x100, 10-second interval, saved to oss://outbucket/outobjprefix-%d.jpg |
POST /example.mkv?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=video/snapshots,f_jpg,w_100,h_100,scaletype_crop,inter_10000|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LXtpbmRleH0ue2F1dG9leHR9CgUsing a style
| Detail | |
|---|---|
| Input | example.mkv |
| Output | JPG snapshots at oss://outbucket/outobjprefix-%d.jpg |
POST /example.mkv?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=style/examplestyle|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LXtpbmRleH0ue2F1dG9leHR9CgConcatenation
Using processing parameters — concatenate MKV, MOV files
| Detail | |
|---|---|
| Inputs | pre.mov (entire), example.mkv (from 10 s to end), sur.mov (0 to 10 s) |
| Output | MP4, video: H.264, 25 fps, 1 Mbps; audio: AAC, 48 kHz, 2 audio channels, 96 Kbps, saved to oss://outbucket/outobjprefix.mp4 |
POST /example.mkv?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=video/concat,ss_10000,f_mp4,vcodec_h264,fps_25,vb_1000000,acodec_aac,ab_96000,ar_48000,ac_2,align_1/pre,o_cHJlLm1vdgo/sur,o_c3VyLm1vdg,t_10000|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQAudio
Transcoding
Using processing parameters — MP3 to AAC
| Detail | |
|---|---|
| Input | example.mp3 |
| Clip | Start at 1,000 ms, duration 60,000 ms |
| Output | AAC, original sample rate and audio channels, 96 Kbps, saved to oss://outbucket/outobjprefix.aac |
POST /exmaple.mp3?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=audio/convert,ss_10000,t_60000,f_aac,ab_96000|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQUsing a style
| Detail | |
|---|---|
| Input | example.mp3 |
| Output | AAC at oss://outbucket/outobjprefix.aac |
POST /exmaple.mp3?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=style/examplestyle|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQConcatenation
Using processing parameters — concatenate MP3, WAV, AAC, WMA files
| Audio file | Order | Segment |
|---|---|---|
pre1.mp3 | 1 | Entire file |
pre2.wav | 2 | First 2 seconds |
example.mp3 | 3 | Entire file |
sur1.aac | 4 | 4 s to 10 s |
sur2.wma | 5 | 10 s to end |
Output: AAC, 48 kHz, 1 audio channel, 96 Kbps, saved to oss://outbucket/outobjprefix.aac
POST /exmaple.mp3?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
x-oss-async-process=audio/concat,f_aac,ab_96000,ar_48000,ac_1,align_2/pre,o_cHJlMS5tcDMK/pre,o_cHJlMi53YXYK,t_2000/sur,o_c3VyMS5hYWMK,ss_4000,t_10000/sur,o_c3VyMi53bWEK,ss_10000|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQWhat's next
Variables — use dynamic values in the
oandboptionsEncode watermarks — URL-safe Base64 encoding reference
Introduction to lifecycle rules — set object expiration policies
PostObject — full REST API reference