Ops Parameter Format

최신 업데이트:2022-03-01 18:00:56

Audio/Video Processing

Example:

  1. Converts the original file into an flv-format file with an audio bit rate of 64k and video bit rate of 128k.
    1. avthumb/flv/ab/64k/vb/128k|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes avthumb (operation type - audio/video processing)
<format> Yes Outputted destination format, mp4 and flv are supported.
/ab/<BitRate> No Audio bit rate, unit: bit/s. Commonly used bit rates: 64k, 128k, 192k, 256k, 320k, etc.
/aq/<AudioQuality> No Audio quality, value range is 0–9 (mp3); the smaller the value, the higher the quality. 10–500 (AAC); the greater the value, the higher the quality. Only mp3 and AAC are supported. It cannot be used in conjunction with the audio bit rate parameter ab.
/ar/<SamplingRate> No Audio sampling rate, unit: Hz.
Commonly used sampling rates: 8000, 12050, 22050, 44100, etc.
NOTE: flv only supports 44100, 22050, and 11025
/r/<FrameRate> No Video frame rate, which is the number of frames displayed per second, unit: Hz.
Commonly used frame rates: 24, 25, 30, etc. The default value is typically used.
/vb/<VideoBitRate> No Video bit rate, unit: bits/s.
Commonly used video bit rates: 128k, 1.25m, 5m, etc.
/vcodec/<VideoCodec> No Video encoding scheme, schemes supported: libx265, libx264, libvpx, libtheora, libxvid, etc. Also supports copy parameter, and maintains the encoding schemes of the original video. NOTE: When vcodec has specified the video resolution in transcoding scenarios, vb will also need to configure the bit rate in order to transcode successfully. Otherwise, the source video is copied using the original encoding method by default.
/acodec/<AudioCodec> No Audio encoding scheme, schemes supported: libmp3lame, libfaac, libvorbis, libfdk_aac, opus, etc. Also supports copy parameter and maintains the encoding schemes of the original audio
/subtitle/<EncodeEntryURI> No Adds subtitles, supports: srt-format subtitles (UTF-8 encoding), mkv files with subtitles, and embed (embedding original video’s subtitle stream into the target video)
Wherein: EncodeEntryURI is used to specify bucket name and resource name
/ss/<SeekStart> No Specifies the start time of the video capture, unit: Seconds. It is used for video capture, i.e., capturing a segment of video from a video.
/t/<Duration> No Specifies the length of the captured video, unit: Seconds.
/multiSeeks/<MultiSeeks> No Specifies multiple capture time periods. The capture start time and capture duration are separated with a colon ':'. Different time periods are separated with the comma ','. -1 indicates the end of the file has been reached. Unit: s. If the time periods to be removed are from the 30s-mark to the 38s- mark, from the 120s-mark to the 129s-mark and from the 310s-mark to the 319s-mark, then multiSeeks can be expressed as 0:30,38:81,129:180,319:-1.
NOTE: multiSeeks cannot be used with ss and t at the same time.
/s/<Resolution> No Specifies video resolution, the format is wxh or a predefined value. For example: 640x480.
/autoscale/<Autoscale> No It is used in conjunction with the parameter /s/. When it is specified as 1, the video will be scaled according to the original proportion into the rectangular frame specified by /s/. When it is 0 or not specified, the video will be forced to scale to the corresponding resolution, which may result in video distortion.
/autofill/<Autofill> No It is used in conjunction with the parameter /s/. When it is specified as 1, the video will be scaled according to the original proportion into the rectangular frame specified by /s/ and displayed in the center with border of the excess parts at top, bottom, left, and right colored in black. When it is 0 or not specified, the video will be forced to scale to the corresponding resolution, which may result in video distortion.
/sar/<Sar> No Pixel aspect ratio, such as 1:1
/deinterlace/<Deinterlace> No Performs processing on interlaced video. 1 indicates changing interlaced scanning to progressive scanning. 0 indicates no processing. The default is no processing
/GOPInterval/<GOPInterval> No Specifies keyframe time interval, unit: ms.
/stripmeta/<StripMeta> No Whether or not to clear a file’s metadata, 1 indicates clear. 0 indicates retain.
/rotate/<Degree> No Specifies degrees of clockwise rotation. The value can be 90, 180, 270, and auto. The default is no rotation.
/wmImage2/<Encode(<bucket1>:<key1>,<bucket2>:<key2>...)> No Image and video watermark list. Multiple watermark image paths are separated with the comma ",". URL-Safe Base64 Encoding is required.
/wmGravity/<Gravity1>,<Gravity2>... No Image and video position list. See the Video Offset Parameter Table. Multiple watermark positions are separated with the comma (,).
/wmauto/<Wmauto> No Self-adaptive scaling of image and video watermark based on variations in video transcoding resolution. 1 indicates self-adaptive scaling of image and video watermark if resolution operation is performed during transcoding. Otherwise, it indicates the original image and video watermark size.
/wmInterval/<WmInterval> No Video file time interval of occurrence of image and video watermark transform, unit: Seconds.
/wmWidth/<WmWidth1>,<WmWidth2>... No Resolution width of image and video watermark. which can be pixels or percentage. Wherein, the percentage indicates the proportion of the watermark image in the size of the outputted video image.
For example: wmWidth=50%&wmHeight=20% indicates that the watermark width is half of the outputted image and the height is 1/5 of the outputted image. wmWidth=40&wmHeight=60 indicates that the watermark size resolution is 40x60 in unit of pixels. Remarks: When the value of wmWidth or wmHeight is 0 or less than 0, it indicates adaptive; when both wmWidth and wmHeight elements are 0 or negative, it indicates that the resolution setting function is not enabled for this watermark.
/wmHeight/<WmHeight1>,<WmHeight2>... No Resolution height of image and video watermark. which can be pixels or percentage. See the wmWidth parameter for examples and descriptions.
/wmDissolve/<alpha1>,<alpha2>... No Image and video watermark transparency; transform is supported; numeric type. Range is [0,100]. Wherein, 100 indicates opaque and 0 indicates completely transparent. When this range is exceeded. It is automatically limited to this range. For example, -4 is changed to 0, 120 is changed to 100. Default value: 100
/multiConvertTime/<ConvertTime1>,<ConvertTime2>... No List of video file time when watermark transform begins to occur, which are separated with the comma ",", unit: Seconds. It is suitable for scenarios where the watermark transform time interval varies and cannot be used together with wmInterval
/wmdx/<Wmdx1>,<Wmdx2>... No It is used to perform horizontal fine-tuning of the video image watermark position on the basis of the offset list. Offsets rightwards when this value is positive; otherwise leftwards. When this parameter is specified, wmGravity is required and the number of parameters must be consistent with wmGravity.
/wmdy/<Wmdy1>,<Wmdy2>... No It is used to perform vertical fine-tuning of the video image watermark position on the basis of the offset list. Offsets downwards when this value is positive; otherwise upwards. When this parameter is specified, wmGravity is required and the number of parameters must be consistent with wmGravity.
/wmText/Encode(<Text1>),Encode(<Text2>)... No Text list. If transform support is required, unlike image/video watermarks, text watermarks will require URL-Safe Base64 Encoding to be first performed on each string of text, and then the strings are joined together with the comma (note that text would contain commas). UTF-8 encoding is required for Chinese text. Otherwise, the code may be illegible.
/wmFont/<Encode(<Color1>,<Color2>,<Color3>...)> No Text watermark font name. If transform support is required, first use a comma to link the font name to the font name list, then perform URL-Safe Base64 Encoding. The font name can only include numbers, uppercase, and lowercase letters, spaces, and the minus sign (-).
/wmFontColor/<Encode(<Font1>,<Font2>,<Font3>...)> No Text watermark font color. If transform support is required, first use the comma to link the font color, then perform URL-Safe Base64 Encoding. Wherein, each color is a character string (case insensitive) like 0xrrggb or &Hrrggbb, which respectively represent color RGB components, and the 0x or &H prefix can be omitted as well. The font format must be correct. Default value: 0xffffff, i.e., white
/wmFontSize/<size1>,<size2>... No Text watermark font size; transform is supported. Integer type. A percent sign can be added after the integer. Two forms are available, i.e., pixel and percentage forms. A percent sign following a number indicates the proportion of the font in the outputted image height; otherwise, it indicates the absolute pixel size. For example, 10 indicates a height of 10 pixels, while 10% indicates the font height accounts for 10% of the outputted image height. The number of pixels, if used, must fall within the [5,2160] range. The percentage, if used, must fall within the [0,100%] range. Default value: 6%
/wmFontDissolve/<alpha1>,<alpha2>... No Text watermark text transparency; transform is supported; numeric type. Range is [0,100]. Wherein, 100 indicates opaque and 0 indicates completely transparent. No error will be reported when this range is exceeded. It is automatically limited to this range. For example, -4 is changed to 0, 120 is changed to 100. Default value: 100
/wmFontBorderWidth/<w1>,<w2>... No Text watermark font border; transform is supported; integer type. No border when this value is smaller than or equal to 0; otherwise with border. Default value: 0
/wmFontBorderColor/<Encode(<Color1>,<Color2>,<Color3>...)> No Text watermark font border color. If transform support is required, first use the comma to link the font border color, then perform URL-Safe Base64 Encoding. Format is identical to wmFontColor. Default value: 0x000000, i.e. black
/wmTextGravity/<gravity1>,<gravity2>... No Text watermark text position, character string type, case insensitive. If position transform support is required, separate preset positions using the comma. Format is identical to wmGravity. It must be one of the 9 preset values. Default value: top_right
/wmtextdx/<dx1>,<dx2>... No Horizontal offset on the basis of preset text watermark text position; transform is supported; integer type. Format and meaning are similar to wmdx. Default value: 0
/wmtextdy/<dy1>,<dy2>... No Vertical offset on the basis of preset text watermark text position; transform is supported; integer type. Format and meaning are similar to wmdy. Default value: 0
/wmTextInterval/<interval1>,<interval2>... No Time interval of text watermark switching; transform is supported, in unit of seconds, numeric type. Format and meaning are similar to wmInterval. It must be greater than or equal to 1.
/wmFontBold/<b1>,<b2>... No Whether or not text watermark font is boldface; transform is supported; integer type. 0 indicates text does not use boldface. Values other than 0 indicate text uses boldface. Default value: 0
/writeXing/<Xing> No Whether or not to write in xing header when transcoding to mp3. The default is 1, which indicates write in. Writing in may cause commands such as file and afinfo to recognize error bit rates. Its advantage is that it is only necessary to obtain the header when audio duration and frame count are needed.
/an/<AudioNo> No Whether or not to remove the audio stream. 0 indicates retain, and 1 indicates remove. The default value is 0.
/vn/<VideoNo> No Whether or not to remove the video stream. 0 indicates retain, and 1 indicates remove. The default value is 0.
/vprofile/<VideoProfile> No Sets profile level of video, for example: baseline, main, high, high10, high422 and high444.
/aprofile/<AudioProfile> No Sets profile level of audio. The default is aac_lc. Supports: aac_he. NOTE: It needs to be used in conjunction with the libfdk_aac encoding scheme, for example: avthumb/mp4/acodec/libfdk_aac/aprofile/aac_he
/level/<BitTorrentLevel> No Sets Level of bitstream. Value range is 1.0-5.1. It is used to tell the decoder what level of compatibility needs to be supported. (Valid only when the video encoder is libx264.)
/crf/<CRF> No Specifies constant quality mode. (Valid only when video encoder is libx264); value range is 0–51. The greater the value, the lower the image quality.
/maxrate/<Maxrate> No Delimits maximum bit rate at dynamic bit rate, such as 1000k
NOTE: This parameter is valid only when it is used together with the crf parameter. When this parameter is used, the bufsize parameter must be specified
/bufsize/<Bufsize> No Encoding buffer size, which is used together with maxrate, such as 1000k.
/fcomplex/<Fcomplex> No Complex filter, advanced video processing. It is not used together with parameters such as autoscale, autofill, rotate, crop, wmVideo2, wmImage, wmImage2, and subtitle. If they are used together, only fcomplex is valid, and other configured parameters are not valid.
/delogo/<x:y:w:h,x:y:w:h> No Specifies regional fuzzy processing. x is the horizontal coordinate and y the vertical coordinate. The top-left corner is the origin. The rightward direction is positive and leftward direction negative. The downward direction is positive and upward direction negative. Unit: Pixels. w indicates width and h height. Multiple positions are separated with commas. The sequence of parameters is fixed. The default is 0.
/ac/<AC> No sets number of channels. Wherein: 1 indicates mono-channel and 2 stereo.
/moovToFront/<MoovToFront> No Puts meta-information of mp4 file in the header. Default value is 0, i.e., do not adjust the position of the meta-information, while 1 indicates adjust.
/gravity/<Gravity> No See the [Video Offset Parameter Table] (#Video Offset Parameter Table). Only those crop offset parameters after it will be affected. The default is the top-left corner (TOP_LEFT).
/vcrop/<Vcrop> No See the [Video Cropping Operation Parameter Table] (#Video Cropping Operation Parameter Table). The default is no cropping.
/vsync/<Vsync> No Video synchronization, which supports the following parameter settings:
1.passthrough, where the timestamp is consistent with the source file;
2.cfr, the timestamp is generated based on the frame rate, i.e., the incremental timestamp of each frame is kept consistent;
3.vfr, the timestamp is consistent with the source file. When the timestamps of two frames are identical, decreasing the timestamp of the first frame will increase the timestamp;
Automatically chooses cfr or vfr based on the multiplexer’s capability by default.
/async/<Async> No Synchronizes processing audio timestamp. 1 indicates processing, 0 indicates no processing, and the default is no processing
/reverse/<reverse> No Whether or not to reverse order. 1 indicates reverse order, 0 indicates do not reverse order. The default is do not reverse order. Notes:
1. When used together with multiSeeks and multiSeeks has multiple parts, reverse corresponds to multiSeeks on a one-to-one basis, and multiple values are separated using the comma",".
2. The maximum duration of each part of the audio/video to have its order reserved may not exceed 5 minutes.
/speedup/<speedup> No Specifies playback speed. A value greater than 0 and smaller than 1 indicates decreasing playback speed; the smaller the value, the slower the playback speed. A value greater than 1 indicates increasing playback speed; the greater the value, the faster the playback speed. The value range of speedup: low speed range is (0.1,1) and high speed range is (1,10). Note: When used together with multiSeeks and multiSeeks has multiple parts, speedup corresponds to multiSeeks on a one-to-one basis, and multiple values are separated using the comma",".
/seiKeep/<seiKeep> No Whether or not to retain SEI during transcoding. 0 indicates do not retain and 1 indicates retain. The default value is 0. In particular, SEI is always defaulted to be retained when only rewrapping processing is performed.
/nbhd/<nbhd> No Whether or not to enable intelligent control high definition. 0 indicates do not enable and 1 indicate enable. The default value is 0
/map/<map> No Sets the input stream to map to the output. Only the first stream of the audio/video is taken by default. -map 0 indicates mapping all streams of the input file to the output.
|saveas/<Encode(bucket:filekey)> No Transcodes and saves video as a specified file. The value of [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter. . The transcoded file will be saved as the specified file

Video screenshot

Example:

  1. Captures file of the 10th second of the video and saves it as a jpg file.
    1. vframe/jpg/offset/10|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes vframe (operation type - video screenshot)
<format> Yes Outputted destination format, jpg, png, gif, webp, etc., are supported.
/offset/<Second> Yes Specifies the point in time of the video capture, unit: Seconds. When specifying interval, offsets, and vframeN to capture multiple images or sprite screenshots, this parameter is not required.
In particular,
1. When specifying the interval parameter to capture multiple images or sprite screenshots, this parameter indicates the point in time when video capture starts;
2. When specifying the format as gif and being used together with the t parameter, this parameter indicates the point in time when video capture starts
/mode/<Mode> No Scaling Mode
/w/<Width> No Thumbnail width; unit: Pixels (px); value range is 1–1920.
/h/<Height> No Thumbnail height; unit: Pixels (px); value range is 1–1080.
/t/<Duration> No Specifies captured video as the duration of the GIF image, unit: Seconds. The default is 5s
/r/<FrameRate> No Specifies captured video as frame rate of GIF image, unit: fps. The default is the source video's frame rate. (The maximum frame rate of the GIF image cannot exceed the source video frame rate.) Usage recommendation: Configure a small frame rate to reduce the size of the GIF image file
/rotate/<Degree> No Specifies degrees of clockwise rotation. The value can be 90, 180, 270, and auto. The default is no rotation.
/autofill/<Autofill> No It is used in conjunction with the parameters /w/ and /h/. When it is specified as 1, the image will be scaled according to the original proportion into the rectangular frame specified by /w/ and /h/, with the blank parts colored in black. When it is 0 or not specified, the image will be forced to scale to the corresponding resolution, which may result in video distortion. When the autofill parameter is specified, it cannot be used together with the mode parameter and both /w/ and /h/ must be specified
/offsets/<VframeList> No Specifies capturing multiple video images, unit: Seconds. Format: Specifies multiple images at different seconds, which are separated with the colon (:). For example: 1:3:10:20.
NOTE: All screenshots will be put together in a zip file. When the saveas parameter is specified as images:a.zip, the name of the zip file is a.zip; the screenshot file naming rule is in the form of serial number. For example: a_00001.jpg, a_00002.jpg.
/vframeN/<VframeN> No Specifies the average number of screenshot images; the range is 1, 2, 3, 4, etc.
NOTE: All screenshots will be put together in a zip file. When the saveas parameter is specified as images:a.zip, the name of the zip file is a.zip; the screenshot file naming rule is in the form of serial number. For example: a_00001.jpg, a_00002.jpg.
/interval/<Interval> No Specifies the time interval of consecutive screenshots, unit: Seconds.
NOTE: All screenshots will be put together in a zip file. When the saveas parameter is specified as images:a.zip, the name of the zip file is a.zip; the screenshot file naming rule is as follows: a_00001.jpg, and so on.
/isZip/<IsZip> No Specifies whether or not the output file of offsets, vframeN or interval is a zip package. 0 indicates it is not a zip package, and 1 indicates a zip package. The default is 1.
/sprite/<Sprite> No Image joining specification. For example, 4x5 indicates joining consecutively captured images into a big image of 4 rows and 5 columns.
This parameter is valid only when used together with other related parameters such as interval, offsets, and vframeN. The gif format cannot be used together with the sprite parameter.
When the saveas parameter is specified as images:a.zip, the image joining file naming rule is as follows: a_0000x.jpg; when only one joined image is generated, it is named as a_00001.jpg. If there are multiple joined image files, they are named as a_00001.jpg, a_00002.jpg, a_00003.jpg, and so on.
/reverse/<reverse> No Whether or not to reverse order. 1 indicates reverse order, 0 indicates do not reverse order. The default is do not reverse order. Note: The maximum duration of each part of the audio/video to have its order reserved may not exceed 5 minutes.
/speedup/<speedup> No Specifies playback speed. A value greater than 0 and smaller than 1 indicates decreasing playback speed; the smaller the value, the slower the playback speed. A value greater than 1 indicates increasing playback speed; the greater the value, the faster the playback speed. The value range of speedup: low speed range is (0.1,1) and high speed range is (1,10).
/contentDetect/<ContentDetect> No Content identification, currently supporting:
imagePorn - porn identification for images, imageTerror - terrorism identification for images, imagePolitical - politician identification.
NOTE: When compressing the image proportionally to fit within the shortest side, 256px is recommended.
/detectNotifyURL/<DetectNotifyURL> No Address for receiving the identification result notification, which must be a public network URL address that can normally respond with HTTP/1.1 200 OK. This address needs to be Url Encode encoded and then [URL-Safe Base64 Encoded] (#/help/details/31/3707). If this parameter is not configured, then the identification result will not be notified. For details on the content of the notification, see the Identification Notification Data Content Description
/detectNotifyRule/<DetectNotifyRule> No Sets identification notification rules, which will determine the identification result notified. It must be [URL-Safe Base64 Encoded] (#/help/details/31/3707).
all Notification on all images
porn Notification on pornographic images
sexy Notification on sexy images
normal Notification on normal images
exception Notification on images identified as exceptions
terror Notification on violent and terrorism images(Valid only when the identification type is imageTerror)
political Notification on identification of images of politicians (Valid only when the identification type is imagePolitical)
Parameters can be combined with each other and separated by the semicolon
For example:
<1>Encode(all) indicates notification on all results
<2>Encode(porn;exception) indicates notification when the type is pornographic images or images identified as exceptions
Remarks: The customer will not be notified if this parameter is not set.
|saveas/<Encode(bucket:filekey)> No Saves video screenshot as a specified file. The value of [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

Audio/video segmentation

Example:

  1. Converts the original file into a m3u8-format file.
    1. avthumb/m3u8|saveas/YnVja2V0OmtleQ==
  2. Use HLS preset set video_16x9_150k
    1. avthumb/m3u8/preset/video_16x9_150k|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes avthumb (operation type - audio/video processing)
<format> Yes Outputted destination format, i.e., m3u8.
/segtime/<SegSeconds> No Used to define the playback duration of each small segment of audio/video stream; unit: Seconds; value range: Integer between 1–120.
Note: Described below are scenarios where the default value is used without setting this parameter:
1. Input is non-m3u8 format, default value is 10s;
2. Input is m3u8 format, transcode parameter is not set, only text processing is performed on m3u8 file;
3. Input is m3u8 format, transcode parameter is set, segment duration is calculated automatically.
/hlsKey/<HlsKey> No Specifies key used when using AES-128 to encrypt video. To ensure security, this parameter must be RSA-encrypted.
1. The key must first be converted into the hexadecimal ASCII code form
2. Use OAEP padding for RSA encryption
3. URL-Safe Base64 Encoding must be performed
/hlsKeyUrl/<HlsKeyUrl> No Obtains URL of hlsKey. Please fill this URL in the parameter after performing URL-Safe Base64 Encoding. (This URL will be written into the #EXT-X-KEY tag of the m3u8 file’s content.)
/hlskeygen/<hlskeygen> No Used to specify whether or not to generate the key file. 1 indicates generate and upload the key file, and 0 indicates do not generate. The default is do not generate.
/preset/<Preset> No Name of [HLS Preset Set] (#HLS Preset Set) (Preset).
/fastStartSeg/<FastStartSeg> No Used to define that the duration of the first M ts-segments in m3u8 segmentation is N seconds, parameter format is MxNs.
For example: 5x3s indicates that the segmentation duration of the first 5 ts-segments is 3s.
/ab/<BitRate> No Audio bit rate, unit: bits/s. Commonly used bit rates: 64k, 128k, 192k, 256k, 320k, etc.
/aq/<AudioQuality> No Audio quality, value range is 0–9 (mp3); the smaller the value, the higher the quality. 10–500 (AAC); the greater the value, the higher the quality. Only mp3 and AAC are supported. It cannot be used together with the above bit rate parameter.
/ar/<SamplingRate> No Audio sampling rate, unit: Hz. Commonly used sampling rates: 8000, 12050, 22050, 44100, etc. (flv only supports 44100, 22050, and 11025)
/r/<FrameRate> No Video frame rate, which is the number of frames displayed per second, unit: Hz. Commonly used frame rates: 24, 25, 30, etc. The default value is typically used.
/vb/<VideoBitRate> No Video bit rate, unit: bits/s. Commonly used video bit rates: 128k, 1.25m, 5m, etc.
/vcodec/<VideoCodec> No Video encoding scheme, schemes supported: libx264, libvpx, libtheora, libxvid, etc. NOTE: When vcodec has specified the video resolution in transcoding scenarios, vb will also need to configure the bit rate in order to transcode successfully. Otherwise, the source video is copied using the original encoding method by default.
/acodec/<AudioCodec> No Audio encoding scheme, schemes supported: libmp3lame, libfaac, libvorbis, opus, etc.
/subtitle/<EncodeEntryURI> No Adds subtitles, supports: srt-format subtitles (UTF-8 encoding), mkv files with subtitles, and embed (embedding original video’s subtitle stream into the target video)
Wherein: EncodeEntryURI is used to specify bucket name and resource name
/ss/<SeekStart> No Specifies the start time of the video capture, unit: Seconds. It is used for video capture, i.e., capturing a segment of video from a video.
/t/<Duration> No Specifies the length of the captured video, unit: Seconds. It is used for video capture, i.e., capturing a segment of video from a video.
/multiSeeks/<MultiSeeks> No Specifies multiple capture time periods. The capture start time and capture duration are separated with a colon ':'. Different time periods are separated with the comma ','. -1 indicates the end of the file has been reached. Unit: s. If the time periods to be removed are from the 30s-mark to the 38s- mark, from the 120s-mark to the 129s-mark and from the 310s-mark to the 319s-mark, then multiSeeks can be expressed as 0:30,38:81,129:180,319:-1.
NOTE: multiSeeks cannot be used with ss and t at the same time.
/s/<Resolution> No Specifies video resolution, the format is wxh or a predefined value.
/autoscale/<Autoscale> No It is used in conjunction with the parameter /s/. When it is specified as 1, the video will be scaled according to the original proportion into the rectangular frame specified by /s/. When it is 0 or not specified, the video will be forced to scale to the corresponding resolution, which may result in video distortion.
/autofill/<Autofill> No It is used in conjunction with the parameter /s/. When it is specified as 1, the video will be scaled according to the original proportion into the rectangular frame specified by /s/ and displayed in the center with border of the excess parts at top, bottom, left, and right colored in black. When it is 0 or not specified, the video will be forced to scale to the corresponding resolution, which may result in video distortion.
/sar/<Sar> No Pixel aspect ratio, such as 1:1
/deinterlace/<Deinterlace> No Performs processing on interlaced video. 1 indicates changing interlaced scanning to progressive scanning. 0 indicates no processing. The default is no processing
/GOPInterval/<GOPInterval> No Specifies keyframe time interval, unit: ms.
/stripmeta/<StripMeta> No Whether or not to clear a file’s metadata, 1 indicates clear. 0 indicates retain.
/rotate/<Degree> No Specifies degrees of clockwise rotation. The value can be 90, 180, 270, and auto. The default is no rotation.
/delogo/<x:y:w:h,x:y:w:h> No Specifies regional fuzzy processing. x is the horizontal coordinate and y the vertical coordinate. The top-left corner is the origin. The rightward direction is positive and leftward direction negative. The downward direction is positive and upward direction negative. Unit: Pixels. w indicates width and h height. Multiple positions are separated with commas. The sequence of parameters is fixed. The default is 0.
/wmImage2/<Encode(<bucket1>:<key1>,<bucket2>:<key2>...)> No Image and video watermark list. Multiple watermark image paths are separated with the comma ",". URL-Safe Base64 Encoding is required.
/wmGravity/<Gravity1>,<Gravity2>... No Image and video watermark position list. See the [Video Offset Parameter Table] (#Video Offset Parameter Table). Multiple watermark positions are separated with the comma (,).
/wmauto/<Wmauto> No Self-adaptive scaling of image and video watermark based on variations in video transcoding resolution. 1 indicates self-adaptive scaling of image and video watermark if resolution operation is performed during transcoding. Otherwise, it indicates the original image and video watermark size.
/wmInterval/<WmInterval> No Video file time interval of occurrence of image and video watermark transform, unit: Seconds.
/wmWidth/<WmWidth1>,<WmWidth2>... No Resolution width of image and video watermark. which can be pixels or percentage. Wherein, the percentage indicates the proportion of the watermark image in the size of the outputted video image.
For example: wmWidth=50%&wmHeight=20% indicates that the watermark width is half of the outputted image and the height is 1/5 of the outputted image. wmWidth=40&wmHeight=60 indicates that the watermark size resolution is 40x60 in unit of pixels. Remarks: When the value of wmWidth or wmHeight is 0 or less than 0, it indicates adaptive; when both wmWidth and wmHeight elements are 0 or negative, it indicates that the resolution setting function is not enabled for this watermark.
/wmHeight/<WmHeight1>,<WmHeight2>... No Resolution height of image and video watermark. which can be pixels or percentage. See the wmWidth parameter for examples and descriptions.
/wmDissolve/<alpha1>,<alpha2>... No Image and video watermark transparency; transform is supported; numeric type. Range is [0,100]. Wherein, 100 indicates opaque and 0 indicates completely transparent. When this range is exceeded. It is automatically limited to this range. For example, -4 is changed to 0, 120 is changed to 100. Default value: 100
/multiConvertTime/<ConvertTime1>,<ConvertTime2>... No List of video file time when watermark transform begins to occur, which are separated with the comma ",", unit: Seconds. It is suitable for scenarios where the watermark transform time interval varies and cannot be used together with wmInterval
/wmdx/<Wmdx1>,<Wmdx2>... No It is used to perform horizontal fine-tuning of the video image watermark position on the basis of the offset list. Offsets rightwards when this value is positive; otherwise leftwards. When this parameter is specified, wmGravity is required and the number of parameters must be consistent with wmGravity.
/wmdy/<Wmdy1>,<Wmdy2>... No It is used to perform vertical fine-tuning of the video image watermark position on the basis of the offset list. Offsets downwards when this value is positive; otherwise upwards. When this parameter is specified, wmGravity is required and the number of parameters must be consistent with wmGravity.
/wmText/Encode(<Text1>),Encode(<Text2>)... No Text list. If transform support is required, unlike image/video watermarks, text watermarks will require URL-Safe Base64 Encoding to be first performed on each string of text, and then the strings are joined together with the comma (note that text would contain commas). UTF-8 encoding is required for Chinese text. Otherwise, the code may be illegible.
/wmFont/<Encode(<Color1>,<Color2>,<Color3>...)> No Text watermark font name. If transform support is required, first use a comma to link the font name to the font name list, then perform URL-Safe Base64 Encoding. The font name can only include numbers, uppercase, and lowercase letters, spaces, and the minus sign (-).
/wmFontColor/<Encode(<Font1>,<Font2>,<Font3>...)> No Text watermark font color. If transform support is required, first use the comma to link the font color, then perform URL-Safe Base64 Encoding. Wherein, each color is a character string (case insensitive) like 0xrrggb or &Hrrggbb, which respectively represent color RGB components, and the 0x or &H prefix can be omitted as well. The font format must be correct. Default value: 0xffffff, i.e., white
/wmFontSize/<size1>,<size2>... No Text watermark font size; transform is supported. Integer type. A percent sign can be added after the integer. Two forms are available, i.e., pixel and percentage forms. A percent sign following a number indicates the proportion of the font in the outputted image height; otherwise, it indicates the absolute pixel size. For example, 10 indicates a height of 10 pixels, while 10% indicates the font height accounts for 10% of the outputted image height. The number of pixels, if used, must fall within the [5,2160] range. The percentage, if used, must fall within the [0,100%] range. Default value: 6%
/wmFontDissolve/<alpha1>,<alpha2>... No Text watermark text transparency; transform is supported; numeric type. Range is [0,100]. Wherein, 100 indicates opaque and 0 indicates completely transparent. No error will be reported when this range is exceeded. It is automatically limited to this range. For example, -4 is changed to 0, 120 is changed to 100. Default value: 100
/wmFontBorderWidth/<w1>,<w2>... No Text watermark font border; transform is supported; integer type. No border when this value is smaller than or equal to 0; otherwise with border. Default value: 0
/wmFontBorderColor/<Encode(<Color1>,<Color2>,<Color3>...)> No Text watermark font border color. If transform support is required, first use the comma to link the font border color, then perform URL-Safe Base64 Encoding. Format is identical to wmFontColor. Default value: 0x000000, i.e. black
/wmTextGravity/<gravity1>,<gravity2>... No Text watermark text position, character string type, case insensitive. If position transform support is required, separate preset positions using the comma. Format is identical to wmGravity. It must be one of the 9 preset values. Default value: top_right
/wmtextdx/<dx1>,<dx2>... No Horizontal offset on the basis of preset text watermark text position; transform is supported; integer type. Format and meaning are similar to wmdx. Default value: 0
/wmtextdy/<dy1>,<dy2>... No Vertical offset on the basis of preset text watermark text position; transform is supported; integer type. Format and meaning are similar to wmdy. Default value: 0
/wmTextInterval/<interval1>,<interval2>... No Time interval of text watermark switching; transform is supported, in unit of seconds, numeric type. Format and meaning are similar to wmInterval. It must be greater than or equal to 1.
/wmFontBold/<b1>,<b2>... No Whether or not text watermark font is boldface; transform is supported; integer type. 0 indicates text does not use boldface. Values other than 0 indicate text uses boldface. Default value: 0
/an/<AudioNo> No Whether or not to remove the audio stream. 0 indicates retain, and 1 indicates remove. The default value is 0.
/vn/<VideoNo> No Whether or not to remove the video stream. 0 indicates retain, and 1 indicates remove. The default value is 0.
/vprofile/<VideoProfile> No Sets video parameters, such as baseline, main, high, high10, high422, and high444.
/aprofile/<AudioProfile> No Sets profile level of audio. The default is aac_lc. Supports: aac_he. NOTE: It needs to be used in conjunction with the libfdk_aac encoding scheme, for example: avthumb/mp4/acodec/libfdk_aac/aprofile/aac_he
/level/<BitTorrentLevel> No Sets Level of bitstream. Value range is 1.0-5.1. Default is 4.0. It is used to tell the decoder what level of compatibility needs to be supported. (Valid only when the video encoder is libx264.)
/crf/<CRF> No Specifies constant quality mode. (Valid only when video encoder is libx264); value range is 0–51. The greater the value, the lower the image quality.
/maxrate/<maxrate> No Specifies the maximum bit rate, such as 1000k.
NOTE: this parameter is valid only when it is used together with the crf parameter. When this parameter is used, the bufsize parameter must be specified
/bufsize/<Bufsize> No Specifies size of buffer, such as 1000k.
/fcomplex/<Fcomplex> No Complex filter, advanced video processing. It is not used together with parameters such as autoscale, autofill, rotate, crop, wmVideo2, wmImage, wmImage2, and subtitle. If they are used together, only fcomplex is valid, and other configured parameters are not valid.
/ac/<AC> No sets number of channels. Wherein: 1 indicates mono-channel and 2 stereo.
/pat_period/<Pat_period> No Used to define the PAT/PMT interval time, minimum specified parameter is 1, unit: Seconds.
/envBandWidth/<EnvBandWidth> No Bandwidth standard for switching between different code streams. Multiple network bandwidths are separated with the colon (:). Count range [2,5], value range [50000,30000000], unit: B/s, such as 50000:150000:500000. NOTE: The count must be consistent with the number of multi-parameter values existing and it is recommended that it be around the set bit rate value. Use the ascending method for bandwidth values.
/multiAb/<MultiAb> No It does not coexist with the ab parameter; unit: bits/s; multiple audio bit rates are separated with the colon (:); count range [2,5]. For example, 64k:128k:256k. NOTE: The number of bit rates must be consistent with the number of other multi-parameter values existing.
/multiVb/<MultiVb> No It does not coexist with the vb parameter; unit: bits/s; multiple video bit rates are separated with the colon (:); count range [2,5]. For example, 128k:600k:1.25m. NOTE: The number of bit rates must be consistent with the number of other multi-parameter values existing.
/multiResolution/<MultiResolution> No It does not coexist with the resolution parameter; the resolution format is wxh; multiple video resolutions are separated with the colon (:); count range [2,5]. For example, 320x240:640x480:1080x720. NOTE: It may change the display aspect ratio (DAR) of the video. The number of resolutions must be consistent with the number of other multi-parameter values existing.
/addlivetime/<addlivetime> No Whether or not to obtain currenttime in onMetaData during change from VOD flv to hls, convert this time into EXT-X-PROGRAM-DATE-TIME format of m3u8 and write it into a file. 1 indicates enable, 0 indicates do not enable, and the default is do not enable.
/duration_flag/<Duration_Flag> No 1) Used for WCT to add a custom tag in the m3u8 file, named as follows: #EXT-X-FILEDURATION, unit: Seconds. 2) EXT-X-FILEDURATION is the sum of durations of all ts files: a) Optional values of this parameter are 0 and 1. b) Default is 0; 1 indicates add this tag.
/reverse/<reverse> No Whether or not to reverse order. 1 indicates reverse order, 0 indicates do not reverse order. The default is do not reverse order. Notes:
1. When used together with multiSeeks and multiSeeks has multiple parts, reverse corresponds to multiSeeks on a one-to-one basis, and multiple values are separated using the comma",".
2. The maximum duration of each part of the audio/video to have its order reserved may not exceed 5 minutes.
/speedup/<speedup> No Specifies playback speed. A value greater than 0 and smaller than 1 indicates decreasing playback speed; the smaller the value, the slower the playback speed. A value greater than 1 indicates increasing playback speed; the greater the value, the faster the playback speed. The value range of speedup: low speed range is (0.1,1) and high speed range is (1,10). Note: When used together with multiSeeks and multiSeeks has multiple parts, speedup corresponds to multiSeeks on a one-to-one basis, and multiple values are separated using the comma",".
/seiKeep/<seiKeep> No Whether or not to retain SEI during transcoding. 0 indicates do not retain and 1 indicates retain. The default value is 0. In particular, SEI is always defaulted to be retained when only rewrapping processing is performed.
/nbhd/<nbhd> No Whether or not to enable intelligent control high definition. 0 indicates do not enable and 1 indicate enable. The default value is 0
/map/<map> No Sets the input stream to map to the output. Only the first stream of the audio/video is taken by default. -map 0 indicates mapping all streams of the input file to the output.
|saveas/<Encode(bucket:filekey)> No Saves the transcoded file as the specified file. The value of [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

HLS preset set

Audio/video Preset set Descriptions
Audio audio_32k Audio with bit rate of 32k.
Audio audio_48k Audio with bit rate of 48k .
Audio audio_64k Audio with bit rate of 64k.
Video video_16x9_150k Bit rate is 150K, aspect ratio is 16x9. Resolution400x224
Video video_16x9_240k Bit rate is 240K, aspect ratio is 16x9. Resolution400x224
Video video_16x9_440k Bit rate is 440K, aspect ratio is 16x9. Resolution400x224
Video video_16x9_640k Bit rate is 640K, aspect ratio is 16x9. Resolution400x224
Video video_4x3_150k Bit rate is 150K, aspect ratio is 4x3. Resolution400x300
Video video_4x3_240k Bit rate is 240K, aspect ratio is 4x3. Resolution400x300
Video video_4x3_440k Bit rate is 440K, aspect ratio is 4x3. Resolution400x300
Video video_4x3_640k Bit rate is 640K, aspect ratio is 4x3. Resolution400x300
Video video_150k Bit rate is 150K, use source video settings for aspect ratio.
Video video_240k Bit rate is 240K, use source video settings for aspect ratio.
Video video_440k Bit rate is 440K, use source video settings for aspect ratio.
Video video_640k Bit rate is 640K, use source video settings for aspect ratio.
Video video_1000k Bit rate is 1000K, use source video settings for aspect ratio.
Video video_1500k Bit rate is 1500K, use source video settings for aspect ratio.

Audio/Video Stitching

Example:

  1. Join the files fileA, fileB, and fileC with the original file into an flv-format file in the mode=1 method.
    1. avcontact/flv/mode/1/ZmlsZUE=/ZmlsZUI=/ZmlsZUM=|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes avconcat (operation type - audio/video stitching)
<format> Yes Outputted destination format, such as mp4, flv, and m3u8.
/mode/<Mode> Yes Stitching mode, which is 1 or 2:
When the video encoding schemes for stitched files are the same, use mode 1; for audio file stitching, use mode=1, i.e., only supports audio stitching of the same audio encoding scheme.
When the video encoding schemes for stitched files are different, use mode 2.
/segtime/<Segtime> No Used to define the playback duration of each small segment of audio/video stream when the output destination format is m3u8, unit: Seconds, integer in the value range of 1–120.
Note: Described below are scenarios where the default value is used without setting this parameter:
1. Input includes non-m3u8 format or encoding schemes, resolutions, or sar, audio/video parameters are inconsistent, default value is 10s;
2. All inputs are of m3u8 format, transcode parameter is not set, only text stitching is performed on m3u8 file;
3. All inputs are of m3u8 format, transcode parameter is set, segment duration is calculated automatically.
/concatorder/<Concatorder> No Stitching sequence of files, which are separated with the hyphen -, such as 2-1-4-3.
/ab/<BitRate> No Audio bit rate, unit: bits/s. Commonly used bit rates: 64k, 128k, 192k, 256k, 320k, etc.
/aq/<AudioQuality> No Audio quality, value range is 0–9 (mp3); the smaller the value, the higher the quality. 10–500 (AAC); the greater the value, the higher the quality. Only mp3 and AAC are supported. It cannot be used together with the above bit rate parameter.
/ar/<SamplingRate> No Audio sampling rate, unit: Hz. Commonly used sampling rates: 8000, 12050, 22050, 44100, etc. (flv only supports 44100, 22050, and 11025)
/r/<FrameRate> No Video frame rate, which is the number of frames displayed per second, unit: Hz. Commonly used frame rates: 24, 25, 30, etc. The default value is typically used.
/vb/<VideoBitRate> No Video bit rate, unit: bits/s. Commonly used video bit rates: 128k, 1.25m, 5m, etc.
/vcodec/<VideoCodec> No Video encoding scheme, schemes supported: libx264, libvpx, libtheora, libxvid, etc. NOTE: When vcodec has specified the video resolution in transcoding scenarios, vb will also need to configure the bit rate in order to transcode successfully. Otherwise, the source video is copied using the original encoding method by default.
/acodec/<AudioCodec> No Audio encoding scheme, schemes supported: libmp3lame, libfaac, libvorbis, etc.
/s/<Resolution> No Specifies video resolution, the format is wxh or a predefined value.
/rotate/<Degree> No Specifies degrees of clockwise rotation. The value can be 90, 180, 270, and auto. The default is no rotation.
/wmImage2/<Encode(<bucket1>:<key1>)> No Watermark image address, which must be URL-safe Base64 encoded.
/wmVideo2/<Encode(<bucket1>:<key1>)> No Watermark video address, which does not coexist with wmImage2 and must be URL-safe Base64 encoded.
/moovToFront/<MoovToFront> No Puts meta-information of mp4 file in the header. The default value is 0, i.e., do not adjust the position of the meta-information, while 1 indicates adjust.
/<encodeUrl1>/<encodeUrl2>/.../<encodeUrlN> Yes Specifies the names of files that need to be stitched, which must be [URL-Safe Base64 Encoded] (#/help/details/31/3707), multiple files encoded are separated with the forward slash (/), and all files must belong to the same bucket; 5 files are supported at the maximum.
|saveas/Encode(<bucket:filekey>) No Saves the transcoded file as the specified file. The value of [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

Obtain Album Image

Example:

  1. Obtains album image and saves it as a jpg-format file.
    1. getapic/jpg|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes getapic (operation type - obtain MP3 album image)
<format> Yes Output format of image, for example: jpg and png
|saveas/Encode(<bucket:filekey>) No Saves the extracted image as the specified file. The value of the [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

Unzipping

Example:

  1. Unzips a zip-format file, and deletes original zip file upon successful decompression.
    1. decompression/zip/crush/2|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes decompression (operation type - file unzipping)
<format> Yes Unzipped file format, zip, tar, gzip, 7z, and rar are supported.
/dir/<encode(bucket:dir)> No Unzips a file into a specified directory. The value of the [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:directory" must be filled in this parameter. The default is unzipping under the directory of the current package
/crush/ No Operations upon successful unzipping:
2 - Delete the unzipped file and do not create a list file upon successful unzipping.
1 - Delete the unzipped file and retain the list file upon successful unzipping.
0 - Retain the unzipped file and retain the list file upon successful unzipping.
|saveas/Encode(<bucket:filekey>) No Saves the list generated during unzipping as the specified file. The value of the [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter. The default is saving under the directory of the current package, with the following naming: random number+timestamp+package name.list

Image Processing

Example:

  1. Proportionally scales the image with centered cropping to process image into a jpg image of 200px * 100px.
    1. imageView2/jpg/mode/1/width/200/height/100|saveas/YnVja2V0OmtleQ==

    Image Scaling

    Notes:
Parameter Required Description
<op> Yes imageView2 (operation type - image scaling)
<format> Yes Output format of new image, value range: jpg, gif, png, etc.
If this is set to auto, image will be outputted in the format of the original image.
/mode/<Mode> Yes [Scaling Mode] (#Scaling mode)
/width/<Width> No Scaling width (Unit: px)
/height/<Height> No Scaling height (Unit: px)
/quality/<Quality> No Quality of the new image, value range: 1–100, default is 85;
If the original image quality is lower than the specified value, output according to the original value.
|saveas/<Encode(bucket:filekey)> No Saves processed file as the specified file. The value of the [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

Scaling mode

Mode Descriptions
/mode/1 Delimits a thumbnail’s width as at least and height is at least , proportional scaling, and centered cropping. The converted thumbnail is often just as big as x. (The excess sections beyond the rectangular frame will be trimmed, when one side is scaled.) If only the width parameter or only the height parameter is specified, it represents proportional scaling in which the width is at least or the height is at least .
/mode/2 Delimits a thumbnail’s width as at most and height as at most , proportional scaling, and no cropping. Specifying only the width parameter indicates fit to width (with adaptive height). Specifying only the height parameter indicates fit to height (with adaptive width).
/mode/3 Delimits a thumbnail’s width as at least and height as at least , proportional scaling, and no cropping.

Image Watermark

Example:

  1. Adds image watermark in the top center position and outputs in jpg format.
    1. watermark/jpg/mode/1/gravity/TOP_CENTER/image/aHR0cDovL2ltYWdldXJsLmNvbQ==|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes watermark (operation type - watermark operation)
<format> Yes Output format of new image, value range: jpg, gif, png, etc.
If this is set to auto, image will be outputted in the format of the original image.
/mode/<Mode> Yes mode=1 indicates image watermark mode.
/dissolve/<Dissolve> No Transparency, value range of 1–100, default is 100 (completely opaque).
/gravity/<Gravity> No Watermark position, values include "TOP_LEFT",
"TOP_CENTER", "TOP_RIGHT",
"CENTER_LEFT", "CENTER",
"CENTER_RIGHT", "BOTTOM_LEFT",
"BOTTOM_CENTER", "BOTTOM_RIGHT",
default is "BOTTOM_RIGHT"
/dx/<Dx> No Horizontal axis margin, unit: Pixels (px), default value is 10
/dy/<Dy> No Vertical axis margin, unit: Pixels (px), default value is 10
/image/<Image> No Watermark image address (accessible over public network), which has been [URL-Safe Base64 Encoded] (#/help/details/31/3707);
image= Encode (image address)
NOTE: Original image will be returned if this field is left blank.
|saveas/Encode(<bucket:filekey>) Yes Saves processed file as the specified file. The value of the [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

Text Watermark

Example:

  1. Adds text watermark in the top center position and outputs in jpg format.
    1. watermark/jpg/mode/2/gravity/TOP_CENTER/text/dGhpcyBpcyBhIHRlc3Q=|saveas/YnVja2V0OmtleQ==

Notes:

Parameter Required Description
<op> Yes watermark (operation type - watermark operation)
<format> Yes Output format of new image, value range: jpg, gif, png, etc.
If this is set to auto, image will be outputted in the format of the original image.
/mode/<Mode> Yes mode=2 indicates text watermark mode
/text/<Text> Yes Watermark text content (which has been [URL-Safe Base64 Encoded] (#/help/details/31/3707))
/font/<Font> No Watermark text font ([URL-Safe Base64 Encoded] (#/help/details/31/3707)). Default is boldface.
Fonts such as Simsun, KaiTi, Microsoft Yahei, and symbols etc. are supported.
/fontsize/<Fontsize> No Watermark text size, unit: Points, default value is 30 (default size)
/fill/<Fill> No Watermark text color (which has been [URL-Safe Base64 Encoded] (#/help/details/31/3707)), RGB format, can be either the color name (such as red) or the hexadecimal (such as #FF0000). Refer to the RGB color code chart. Default is white (#FFFFFF).
/dissolve/<Dissolve> No Transparency, value range of 1-100, default is 100 (completely opaque).
/gravity/<Gravity> No Watermark position, values include "TOP_LEFT",
"TOP_CENTER", "TOP_RIGHT",
"CENTER_LEFT", "CENTER",
"CENTER_RIGHT", "BOTTOM_LEFT",
"BOTTOM_CENTER", "BOTTOM_RIGHT",
default is "BOTTOM_RIGHT"
/dx/<Dx> No Horizontal axis margin, unit: Pixels (px), default value is 10
/dy/<Dy> No Vertical axis margin, unit: Pixels (px), default value is 10
|saveas/Encode(<bucket:filekey>) Yes Saves processed file as the specified file. The value of the [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

Advanced Image Processing

Format:

Notes:

Parameter Required Description
<op> Yes imageMogr2 (operation type - advanced processing)
<format> Yes Image format, jpg, gif, png, etc., are supported.
If this is set to auto, image will be outputted in the format of the original image.
/auto-orient/<Auto-Orient> No true indicates automatically rotate upright based on the original image’s EXIF information to facilitate subsequent processing. We recommend that this be performed first.
/thumbnail/<Thumbnail> No Refer to the [Scaling Operation Parameter Table] (#Scaling Operation Parameter Table). The default is no scaling.
/gravity/<Gravity> No See the [Video Offset Parameter Table] (#Video Offset Parameter Table). Only those crop offset parameters after it will be affected. The default is the top-left corner (TOP_LEFT).
/crop/<Crop> No See the [Cropping Operation Parameter Table] (#Cropping Operation Parameter Table). The default is no cropping.
/quality/<Quality> No Image quality, value range is 1–100, default is 85.
The original image quality is used if the original image quality is less than the specified quality.
/rotate/<Rotate> No Rotation angle, value range of 1–360, default is no rotation.
/extend/<Extend> No Value range of 1–10000, extend image, image will be center-cropped when requested size is smaller than source file.
Parameter format is width x height
extend=200x300
/square/<Square> No true indicates cropping an image into a square shape according to the shortest side of the original image.
/enlarge/<Enlarge> No true indicates enlarging an image according to longest side of the original image.
NOTE: This parameter is valid only when used together with the square parameter.
|saveas/<Encode(bucket:filekey)> Yes Saves processed file as the specified file. The value of the [URL-Safe Base64 Encoded] (#/help/details/31/3707) "bucket:file name" must be filled in this parameter.

Scaling Operation Parameter Table

Parameter Description
!<Scale>p Scales by the specified percentage based on the original image size.
!<Scale>px Specifies target image width in percentage, and proportionally scales the image height to fit within the width.
!x<Scale>p Specifies target image height in percentage, and proportionally scales the image width to fit within the height.
<Width>x Specifies target image width, and proportionally scales the image height to fit within the width.
x<Height> Specifies target image height, and proportionally scales the image width to fit within the height.
<Width>x<Height> Self-adaptive scaling of short side to fit within a given long side, and fits the target image within the specified width and height frame.
<Width>x<Height>! Ignores original image’s width-height ratio when force resizing the image to given width and height values, and may distort the target image .
<Width>x<Height>> Shrinks image according to the specified width or height values when original image size is larger than specified width or height.
<Width>x<Height>< Enlarges image according to the specified width or height values when original image size is smaller than specified width or height.
<Area>@ Proportionally scales the image according to the original image’s height-width ratio, where the number of pixels after scaling does not exceed the specified value.

Example:
1.URI?op=imageMogr2&thumbnail=!60p // scales image to 60% of the original image.
2.URI?op=imageMogr2&thumbnail=!60px // scales width to 60% of that of the original image, proportionally scales height to fit within the width.
3.URI?op=imageMogr2&thumbnail=!x60p // scales height to 60% of that of the original image, proportionally scales width to fit within the height.
4.URI?op=imageMogr2&thumbnail=200x // specifies width as 200px, proportionally scales height to fit within the width.
5.URI?op=imageMogr2&thumbnail=x100 // specifies height as 100px, proportionally scales width to fit within the height.*

Cropping operation parameter table

Parameter Description
<Width>x Specifies the width of the target image, with the height unchanged. Value range of 0–10000.
x<Height> Specifies target image height, with the width unchanged. Value range of 0–10000.
<Width>x<Height> Specifies target image width and height at the same time. Value range of 0–10000.
!{cropSize}a<dx>a<dy> Offsets rightwards by dx pixels relative to the offset anchor point, and offsets downwards by dy pixels at the same time.

Example:
/crop/300x400 indicates cropping a 300x400 sub-image from the coordinates point of x:0,y:0 in the source image.
/crop/!300x400a10a10 indicates cropping a 300x400 sub-image from the coordinates point of x:10,y:10 in the source image.

Cropping Offset Parameter Table

Parameter Description
TOP_LEFT The top-left corner is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom. This is also the default value.
TOP_CENTER The top-middle position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom.
TOP_RIGHT The top-right corner position is the origin of the coordinates, with the x axis pointing from right to left, and the y axis pointing from top to bottom.
CENTER_LEFT The left-side-middle position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom.
CENTER The center position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom.
CENTER_RIGHT The right-side-middle position is the origin of the coordinates, with the x axis pointing from right to left, and the y axis pointing from top to bottom.
BOTTOM_LEFT The bottom-lower corner is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from bottom to top.
BOTTOM_CENTER The bottom-side-middle position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from bottom to top.
BOTTOM_RIGHT The bottom-right corner is the origin of the coordinates, with the x axis pointing from right to left, and the y axis pointing from bottom to top.

Video Offset Parameter Table

Parameter Description
TOP_LEFT The top-left corner is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom.
TOP_CENTER The top-middle position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom.
TOP_RIGHT The top-right corner position is the origin of the coordinates, with the x axis pointing from right to left, and the y axis pointing from top to bottom. This is also the default value.
CENTER_LEFT The left-side-middle position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom.
CENTER The center position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from top to bottom.
CENTER_RIGHT The right-side-middle position is the origin of the coordinates, with the x axis pointing from right to left, and the y axis pointing from top to bottom.
BOTTOM_LEFT The bottom-lower corner is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from bottom to top.
BOTTOM_CENTER The bottom-side-middle position is the origin of the coordinates, with the x axis pointing from left to right, and the y axis pointing from bottom to top.
BOTTOM_RIGHT The bottom-right corner is the origin of the coordinates, with the x axis pointing from right to left, and the y axis pointing from bottom to top.

Video Cropping Operation Parameter Table

Parameter Description
&vcrop=<Width>x Specifies the width of the target video, with the height unchanged. Value range of 0–10000.
&vcrop=!{vcropSize}a<dx>a<dy> Offsets rightwards by dx pixels relative to the offset anchor point, and offsets downwards by dy pixels at the same time.
&vcrop=x<Height> Specifies the height of the target video, with the width unchanged. Value range of 0–10000.
&vcrop=<Width>x<Height> Specifies target video width and height at the same time. Value range of 0–10000.
이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.