All Products
Search
Document Center

ApsaraVideo VOD:GetMezzanineInfo

最終更新日:Sep 26, 2024

Queries the information about the mezzanine file of an audio or video. The information includes the mezzanine file URL, resolution, and bitrate of the audio or video.

Operation description

You can obtain complete information about the source file only after a stream is transcoded.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vod:GetMezzanineInfoget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
VideoIdstringYes

The ID of the video.

1f1a6fc03ca04814031b8a6559e****
AuthTimeoutlongNo

The validity period of the mezzanine file URL. Unit: seconds. Default value: 1800. Minimum value: 1.

  • If the OutputType parameter is set to cdn:

    • The mezzanine file URL has a validity period only if URL signing is enabled. Otherwise, the mezzanine file URL is permanently valid.
    • Minimum value: 1.
    • Maximum Value: unlimited.
    • Default value: If you do not set this parameter, the default validity period that is specified in URL signing is used.
  • If the OutputType parameter is set to oss:

    • The mezzanine file URL has a validity period only if the permissions on the Object Storage Service (OSS) bucket are private. Otherwise, the mezzanine file URL is permanently valid.
    • Minimum value: 1.
    • Maximum value: 2592000 (30 days). The maximum value is limited to reduce security risks of the origin.
    • Default value: If you do not set this parameter, the default value is 3600.
3600
OutputTypestringNo

The type of the mezzanine file URL. Valid values:

  • oss: OSS URL
  • cdn (default): Content Delivery Network (CDN) URL
Note If the mezzanine file is stored in a bucket of the in type, only an OSS URL is returned.
oss
AdditionTypestringNo

The type of additional information. Separate multiple values with commas (,). By default, only the basic information is returned. Valid values:

  • video: video stream information
  • audio: audio stream information
video

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

25818875-5F78-4AF6-D7393642CA58****
Mezzanineobject

The information about the source file.

CreationTimestring

The time when the file was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2017-11-14T09:15:50Z
Statusstring

The status of the file. Valid values:

  • Uploading: The file is being uploaded. This is the initial status.
  • Normal: The file is uploaded.
  • UploadFail: The file fails to be uploaded.
  • Deleted: The file is deleted.
Normal
FileURLstring

The URL of the file.

http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164h67f57ef-0005-6884-51a-1****.mp4
VideoIdstring

The ID of the video.

1f1a6fc03ca04814031b8a6559e****
Heightlong

The height of the file. Unit: pixel.

540
Bitratestring

The bitrate of the file. Unit: Kbit/s.

771.2280
FileNamestring

The name of the file.

27ffc438-164h67f57ef-0005-6884-51a-1****.mp4
OutputTypestring

The type of the mezzanine file URL. Valid values:

  • oss: OSS URL
  • cdn (default): CDN URL
Note If you specify an OSS URL for the video stream, the video stream must be in the MP4 format.
oss
PreprocessStatusstring

The preprocess status od the media.

UnPreprocess
Widthlong

The width of the file. Unit: pixel.

960
Sizelong

The size of the file. Unit: byte.

4096477
Durationstring

The duration of the file. Unit: seconds.

42.4930
Fpsstring

The frame rate of the file. Unit: frames per second.

25.0000
AudioStreamListarray<object>

The codec time base.

AudioStreamobject

The information about the audio stream.

Indexstring

The sequence number of the audio stream. The value indicates the position of the audio stream in all audio streams.

0
Timebasestring

The time base of the audio stream.

0.000000
SampleFmtstring

The sampling format.

fltp
SampleRatestring

The sampling rate of the audio stream.

44100
ChannelLayoutstring

The output layout of the sound channels. Valid values:

  • mono
  • stereo
mono
Langstring

The language.

und
CodecLongNamestring

The full name of the encoding format.

AAC (Advanced Audio Coding)
Channelsstring

The number of sound channels.

1
NumFramesstring

The total number of frames.

1
Bitratestring

The bitrate.

62.885
CodecTagStringstring

The tag string of the encoding format.

mp4a
StartTimestring

The beginning of the time range during which the data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2017-01-11T12:00:00Z
CodecNamestring

The short name of the encoding format.

aac
Durationstring

The duration of the audio file.

3.227574
CodecTagstring

The tag of the encoding format.

0x6134706d
CodecTimeBasestring

The codec time base.

1/44100
VideoStreamListarray<object>

The HDR type of the video stream.

VideoStreamobject

The information about the video stream.

Timebasestring

The time base of the audio stream.

0.000000
Indexstring

The sequence number of the video stream. The value indicates the position of the video stream in all video streams.

1
AvgFPSstring

The average frame rate.

30.0
PixFmtstring

The pixel format.

yuv420p
Langstring

The language.

und
Sarstring

The sample aspect ratio (SAR) of the video stream.

0:1
Heightstring

The height of the video stream.

320
CodecLongNamestring

The full name of the encoding format.

H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
NumFramesstring

The total number of frames.

0
Bitratestring

The bitrate. Unit: Kbit/s.

500
Rotatestring

The rotation angle of the video. Valid values: [0,360).

90
CodecTagStringstring

The tag string of the encoding format.

avc1
HasBFramesstring

Indicates whether the video stream contains B-frames.

0
Profilestring

The codec profile.

Main
StartTimestring

The beginning of the time range during which the data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2017-01-11T12:00:00Z
Darstring

The display aspect ratio (DAR) of the video stream.

0:1
CodecNamestring

The short name of the encoding format.

h264
Widthstring

The width of the video in pixels.

568
Durationstring

The duration of the audio file.

3.166667
Fpsstring

The frame rate of the output file.

30.0
CodecTagstring

The tag of the encoding format.

0x31637661
CodecTimeBasestring

The codec time base.

1/60
Levelstring

The codec level.

30
HDRTypestring

The HDR type of the video stream.

HDR
StorageClassstring

The storage class of the audio file. Valid values:

  • Standard: All media resources are stored as Standard objects.
  • IA: All media resources are stored as IA objects.
  • Archive: All media resources are stored as Archive objects.
  • ColdArchive: All media resources are stored as Cold Archive objects.
  • SourceIA: Only the source files are IA objects.
  • SourceArchive: Only the source files are Archive objects.
  • SourceColdArchive: Only the source files are Cold Archive objects.
  • Changing: The storage class of the audio file is being changed.
  • SourceChanging: The storage class of the source file is being changed.
Standard
RestoreStatusstring

The restoration status of the audio or video file. Valid values:

  • Processing
  • Success
  • Failed
Success
RestoreExpirationstring

The period of time in which the object remains in the restored state.

2023-03-30T10:14:14Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
  "Mezzanine": {
    "CreationTime": "2017-11-14T09:15:50Z",
    "Status": "Normal",
    "FileURL": "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164h67f57ef-0005-6884-51a-1****.mp4",
    "VideoId": "1f1a6fc03ca04814031b8a6559e****",
    "Height": 540,
    "Bitrate": "771.2280",
    "FileName": "27ffc438-164h67f57ef-0005-6884-51a-1****.mp4",
    "OutputType": "oss",
    "PreprocessStatus": "UnPreprocess",
    "Width": 960,
    "Size": 4096477,
    "Duration": "42.4930",
    "Fps": "25.0000",
    "AudioStreamList": [
      {
        "Index": "0",
        "Timebase": "0.000000",
        "SampleFmt": "fltp",
        "SampleRate": "44100",
        "ChannelLayout": "mono",
        "Lang": "und",
        "CodecLongName": "AAC (Advanced Audio Coding)",
        "Channels": "1",
        "NumFrames": "1",
        "Bitrate": "62.885",
        "CodecTagString": "mp4a",
        "StartTime": "2017-01-11T12:00:00Z",
        "CodecName": "aac",
        "Duration": "3.227574",
        "CodecTag": "0x6134706d",
        "CodecTimeBase": "1/44100"
      }
    ],
    "VideoStreamList": [
      {
        "Timebase": "0.000000",
        "Index": "1",
        "AvgFPS": "30.0",
        "PixFmt": "yuv420p",
        "Lang": "und",
        "Sar": "0:1",
        "Height": "320",
        "CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
        "NumFrames": "0",
        "Bitrate": "500",
        "Rotate": "90",
        "CodecTagString": "avc1",
        "HasBFrames": "0",
        "Profile": "Main",
        "StartTime": "2017-01-11T12:00:00Z",
        "Dar": "0:1",
        "CodecName": "h264",
        "Width": "568",
        "Duration": "3.166667",
        "Fps": "30.0",
        "CodecTag": "0x31637661",
        "CodecTimeBase": "1/60",
        "Level": "30",
        "HDRType": "HDR"
      }
    ],
    "StorageClass": "Standard",
    "RestoreStatus": "Success",
    "RestoreExpiration": "2023-03-30T10:14:14Z"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-02The response structure of the API has changedView Change Details
2023-04-11The response structure of the API has changedView Change Details
2021-11-16The response structure of the API has changedView Change Details

Common errors

The following table describes the common errors that this operation can return.

Error codeError messageHTTP status codeDescription
InvalidVideo.NotFoundThe video does not exist.404The error message returned because the specified video ID does not exist.
InvalidFile.NotFoundThe file does not exist.404The error message returned because the specified video mezzanine file does not exist.