Tous les produits
Search
Centre de documentation

:BatchGetMediaInfos

Dernière mise à jour :Aug 05, 2026

Obtient les informations de base et les informations sur les fichiers source de plusieurs ressources multimédias par lot.

Description de l'opération

  • Vous pouvez récupérer des informations sur un maximum de 20 fichiers audio ou vidéo à la fois.

  • Une fois un fichier audio ou vidéo téléversé, ApsaraVideo VOD analyse le fichier source téléversé. Par conséquent, les informations sur les ressources multimédias sont générées de manière asynchrone. Vous pouvez configurer une notification d'événement pour l'événement AudioVideoAnalysisComplete. Après avoir reçu la notification de l'événement AudioVideoAnalysisComplete, appelez cette opération pour récupérer les informations audio ou vidéo.

Testez maintenant

Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.

Test

Autorisation RAM

Le tableau ci-dessous décrit les autorisations nécessaires pour appeler cette API. Vous pouvez les définir dans une politique Resource Access Management (RAM). Les colonnes du tableau sont détaillées ci-dessous :

  • Action : les actions peuvent être utilisées dans l'élément Action des instructions de politique de permissions RAM pour accorder les autorisations nécessaires à l'exécution de l'opération.

  • API : l'API que vous pouvez appeler pour exécuter l'action.

  • Niveau d'accès : le niveau d'accès prédéfini accordé pour chaque API. Valeurs valides : create, list, get, update et delete.

  • Type de ressource : le type de ressource qui prend en charge l'autorisation pour exécuter l'action. Il indique si l'action prend en charge les permissions au niveau de la ressource. La ressource spécifiée doit être compatible avec l'action. Sinon, la politique sera inefficace.

    • Pour les API avec permissions au niveau de la ressource, les types de ressource requis sont marqués d'un astérisque (*). Spécifiez l'Alibaba Cloud Resource Name (ARN) correspondant dans l'élément Resource de la politique.

    • Pour les API sans permissions au niveau de la ressource, la valeur All Resources est affichée. Utilisez un astérisque (*) dans l'élément Resource de la politique.

  • Clé de condition : les clés de condition définies par le service. La clé permet un contrôle granulaire, applicable aux actions seules ou aux actions associées à des ressources spécifiques. En plus des clés de condition propres au service, Alibaba Cloud fournit un ensemble de clés de condition communes applicables à tous les services pris en charge par RAM.

  • Action dépendante : les actions dépendantes requises pour exécuter l'action. Pour mener à bien l'opération, l'utilisateur RAM ou le rôle RAM doit disposer des permissions pour toutes les actions dépendantes.

vod:BatchGetMediaInfos

get

*All Resource

*

Aucune Aucune

Paramètres de requête

Paramètre

Type

Requis

Description

Exemple

MediaIds

string

Oui

Les identifiants des ressources multimédias, qui correspondent aux identifiants audio/vidéo (VideoId). Séparez plusieurs identifiants par des virgules (,). Vous pouvez spécifier jusqu'à 20 identifiants. Vous pouvez obtenir ces identifiants en utilisant les méthodes suivantes :

  • Pour les fichiers audio/vidéo téléversés via la console, connectez-vous à la console ApsaraVideo VOD et choisissez Fichiers multimédias > Audio/Vidéo pour afficher les identifiants audio/vidéo.

  • Lorsque vous appelez l'opération pour obtenir l'URL et les informations d'identification de téléversement des fichiers audio/vidéo, la valeur VideoId est renvoyée en tant que paramètre de réponse.

  • Une fois qu'un fichier audio/vidéo est téléversé, vous pouvez appeler l'opération SearchMedia pour récupérer la valeur VideoId dans la réponse.

61ccbdb06fa83012be4d8083f6****,7d2fbc380b0e08e55f****

ReferenceIds

string

Non

La liste des identifiants personnalisés. Séparez plusieurs identifiants personnalisés par des virgules (,). Vous pouvez spécifier jusqu'à 20 identifiants.

123-123,1234-1234

Éléments de réponse

Élément

Type

Description

Exemple

object

RequestId

string

L'identifiant de la requête.

9E290613-04F4-47F4-795D30732077****

NonExistMediaIds

array

La liste des identifiants de ressources média inexistants.

string

La liste des identifiants de ressources média inexistants.

["bbc65bba53f6ed90de118a7849****"]

NonExistReferenceIds

array

La liste des identifiants personnalisés inexistants.

string

La liste des identifiants personnalisés inexistants.

123-123

ForbiddenMediaIds

array

La liste des identifiants de ressources média interdits. Cela est généralement dû au fait que vous ne disposez pas des autorisations pour les opérations multi-applications. Pour plus d'informations, consultez Multi-application.

string

La liste des identifiants de ressources média interdits. Cela est généralement dû au fait que vous ne disposez pas des autorisations pour les opérations multi-applications. Pour plus d'informations, consultez Multi-application.

["bbc65bba53f6ed90de118a7849****"]

MediaInfos

array<object>

La liste des ressources média.

array<object>

La liste des ressources média.

MediaId

string

L'identifiant de la ressource média.

10a5fa364a5b71ef89246733a78e****

MediaInfo

object

Les informations de base de la ressource média.

StorageLocation

string

The storage address of the audio/video file.

outin-***.oss-cn-shanghai.aliyuncs.com

CreationTime

string

The time when the audio/video file was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2017-11-14T09:15:50Z

Status

string

The video status. Valid values:

  • Uploading: The video is being uploaded.

  • UploadFail: The video failed to be uploaded.

  • UploadSucc: The video has been uploaded.

  • Transcoding: The video is being transcoded.

  • TranscodeFail: The video failed to be transcoded.

  • Blocked: The video is blocked.

  • Normal: The video is in a normal state.

Normal

CateId

integer

The category ID.

781111****

MediaId

string

The media asset ID.

7753d144efd74d6c45fe0570****

DownloadSwitch

string

The status of the offline download switch. After the offline download feature is enabled, mobile users can cache videos to their local devices for viewing by using ApsaraVideo Player. For more information, see Offline download. Valid values:

  • on: Offline download is enabled.

  • off: Offline download is disabled.

on

Tags

string

The tags of the audio/video file. Multiple tags are separated by commas (,).

tag1, tag2

ModificationTime

string

The last time when the audio/video file was updated. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2017-06-26T06:38:48Z

CateName

string

The category name.

cate1

Description

string

The description of the audio/video file.

Alibaba Cloud VOD video description

AppId

string

The application ID.

app-****

CoverURL

string

The thumbnail URL of the audio/video file.

https://example.aliyundoc.com/****.jpg

TemplateGroupId

string

The transcoding template group ID.

b4039216985f4312a5382a4ed****

Title

string

The title of the audio/video file.

Alibaba Cloud VOD Video Title

Snapshots

array

The video snapshot URL array.

string

The video snapshot URL array.

Remarque

This operation returns only the thumbnail snapshot data of the video. To query snapshot data of normal snapshots, sprites, sprite source images, or WebVTT snapshots captured by the video snapshot feature, call the ListSnapshots operation.

["http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****","http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****",...]

StorageClass

string

The storage class of the media asset. Valid values:

  • Standard: standard.

  • IA: Infrequent Access for media assets.

  • Archive: Archive for media assets.

  • ColdArchive: Cold Archive for media assets.

  • SourceIA: Infrequent Access for source files.

  • SourceArchive: Archive for source files.

  • SourceColdArchive: Cold Archive for source files.

  • Changing: The storage class of the media asset is being changed.

  • SourceChanging: The storage class of the source file is being changed.

Standard

RestoreStatus

string

The restoration status of the media asset. Valid values:

  • Processing: The media asset is being restored.

  • Success: The media asset is restored.

  • Failed: The media asset failed to be restored.

Success

RestoreExpiration

string

The expiration time of the media asset restoration.

2023-03-30T10:14:14Z

UserData

string

The custom parameter.

{"Extend":"xxx","MessageCallback":"xxx"}

ReferenceId

string

The custom ID. Only lowercase letters, uppercase letters, digits, hyphens, and underscores are supported. The ID must be 6 to 64 characters in length and is unique at the user level.

123-123

MezzanineInfo

object

Les informations du fichier source.

CreationTime

string

The time when the file was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2017-11-14T09:15:50Z

Status

string

The file status. Valid values:

  • Uploading: The file is being uploaded. This is the initial status of the file.

  • Normal: The file is uploaded.

  • UploadFail: The file failed to be uploaded.

  • Deleted: The file is deleted.

Normal

FileURL

string

The URL of the source file.

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

MediaId

string

The media asset ID.

1f1a6fc03ca04814031b8a6559e****

Height

integer

The height of the file. Unit: px.

540

Bitrate

string

The bitrate of the file. Unit: Kbps.

771.2280

FileName

string

The file name.

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

Width

integer

The width of the file. Unit: px.

960

Size

integer

The size of the file. Unit: bytes.

4096477

Duration

string

The duration of the file. Unit: seconds.

42.4930

Fps

string

The frame rate of the file, in frames per second.

25.0000

AudioStreamList

array<object>

The audio stream information.

object

The audio stream details.

Index

string

The sequence number of the audio stream, which identifies the position of the audio stream in the overall media stream.

0

Timebase

string

The time base.

0.000000

SampleFmt

string

The sample format.

fltp

SampleRate

string

The sample rate.

44100

ChannelLayout

string

The channel layout. Valid values:

  • mono: mono.

  • stereo: stereo.

mono

Lang

string

The language.

und

CodecLongName

string

The full name of the codec.

AAC (Advanced Audio Coding)

Channels

string

The number of sound channels.

1

NumFrames

string

The total number of frames.

1

Bitrate

string

The bitrate.

62.885

CodecTagString

string

The codec tag string.

mp4a

StartTime

string

The start time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2017-01-11T12:00:00Z

CodecName

string

The short name of the codec.

aac

Duration

string

The duration.

3.227574

CodecTag

string

The codec tag.

0x6134706d

CodecTimeBase

string

The codec time base.

1/44100

VideoStreamList

array<object>

The video stream information.

object

The video stream details.

Timebase

string

The time base.

0.000000

Index

string

The sequence number of the video stream, which identifies the position of the video stream in the overall media stream.

1

AvgFPS

string

The average frame rate.

30.0

PixFmt

string

The pixel format.

yuv420p

Lang

string

The language.

und

Sar

string

The sample aspect ratio.

0:1

Height

string

The height of the video resolution.

320

CodecLongName

string

The full name of the codec.

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

NumFrames

string

The total number of frames.

0

Bitrate

string

The bitrate of the file. Unit: Kbps.

500

Rotate

string

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

90

CodecTagString

string

The codec tag string.

avc1

HasBFrames

string

Indicates whether the video stream contains B-frames.

0

Profile

string

The codec profile.

Main

StartTime

string

The start time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2017-01-11T12:00:00Z

Dar

string

The display aspect ratio.

0:1

CodecName

string

The short name of the codec.

h264

Width

string

The width of the video resolution.

568

Duration

string

The duration.

3.166667

Fps

string

The target frame rate.

30.0

CodecTag

string

The codec tag.

0x31637661

CodecTimeBase

string

The codec time base.

1/60

Level

string

The codec level.

30

HDRType

string

The HDR type of the video stream.

HDR

FileMD5

string

PlayInfoList

array<object>

Les informations de lecture (informations de flux) du fichier audio/vidéo.

object

Les informations détaillées du fichier audio/vidéo.

CreationTime

string

The time when the stream was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2022-04-18T07:37:15Z

Status

string

The status of the media stream. Valid values:

  • Normal: The stream is in a normal state. This value indicates the status of the latest transcoded stream for each definition and format.

  • Invisible: The stream is invisible. When multiple duplicate transcoded streams exist for each definition and format, only the latest stream is marked as Normal, and the other streams are marked as Invisible.

Normal

Specification

string

The output specification of the audio/video transcoding. For more information about valid values and descriptions, see Output specifications: Specification.

H264.LD

NarrowBandType

string

The transcoding type. Valid values:

  • 0: standard transcoding.

  • 1.0: Narrowband HD 1.0 transcoding.

  • 2.0: Narrowband HD 2.0 transcoding.

0

Height

integer

The height of the media stream. Unit: px.

640

Bitrate

string

The bitrate of the media stream. Unit: Kbps.

450.878

ModificationTime

string

The time when the stream was last updated. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2022-04-20T06:32:19Z

WatermarkId

string

The watermark template ID associated with the current media stream.

dgfn26457856****

Encrypt

integer

Indicates whether the media stream is encrypted. Valid values:

  • 0: The stream is not encrypted.

  • 1: The stream is encrypted.

1

Definition

string

The definition of the video stream. Valid values:

  • FD: low definition.

  • LD: standard definition.

  • SD: high definition.

  • HD: ultra high definition.

  • OD: original quality.

  • 2K: 2K.

  • 4K: 4K.

  • SQ: standard sound quality.

  • HQ: high sound quality.

  • AUTO: adaptive bitrate streaming.

LD

EncryptType

string

The encryption type of the media stream. Valid values:

  • AliyunVoDEncryption: Alibaba Cloud video encryption.

  • HLSEncryption: HLS encryption.

Remarque

If the encryption type is AliyunVoDEncryption, only ApsaraVideo Player SDK can be used for playback.

AliyunVoDEncryption

EncryptMode

string

The encryption mode of the media stream. Valid values:

  • License: local decryption mode.

Remarque

If the encryption mode is License, only ApsaraVideo Player SDK can be used for playback.

License

StreamType

string

The type of the media stream. If the media stream is a video, the value is video. If the media stream is audio-only, the value is audio.

video

JobId

string

The job ID of the media stream transcoding. This value serves as the unique identifier of the media stream.

80e9c6580e754a798c3c19c59b16****

Size

integer

The size of the media stream. Unit: bytes.

418112

Width

integer

The width of the media stream. Unit: px.

360

Fps

string

The frame rate of the media stream. Unit: frames per second.

25

Duration

string

The duration of the media stream. Unit: seconds.

9.0464

PlayURL

string

The playback URL of the video stream.

https://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8

Format

string

The format of the media stream.

  • If the media file is a video, valid values are mp4 and m3u8.

  • If the media file is audio-only, the value is mp3.

m3u8

HDRType

string

The HDR type of the media stream. Valid values:

  • HDR

  • HDR10

  • HLG

  • DolbyVision

  • HDRVivid

  • SDR+

HLG

BitDepth

integer

The color bit depth. The value is an integer.

8

JobType

integer

The digital watermarking type. Valid values:

  • 1: tracing watermark.

  • 2: copyright watermark.

2

JobExt

string

The custom watermark information of the copyright watermark. This field is returned only when JobType is 2.

CopyrightMarkTest

CodecName

string

The short name of the codec.

h264

TemplateId

string

The transcoding template ID.

a86a4338dd2e83da45154004a541****

TemplateGroupId

string

The transcoding template group ID.

fb0716154b21a4ecb5b70a26ccc8****

Exemples

JSON format

{
  "RequestId": "9E290613-04F4-47F4-795D30732077****",
  "NonExistMediaIds": [
    "[\"bbc65bba53f6ed90de118a7849****\"]"
  ],
  "NonExistReferenceIds": [
    "123-123"
  ],
  "ForbiddenMediaIds": [
    "[\"bbc65bba53f6ed90de118a7849****\"]"
  ],
  "MediaInfos": [
    {
      "MediaId": "10a5fa364a5b71ef89246733a78e****",
      "MediaInfo": {
        "StorageLocation": "outin-***.oss-cn-shanghai.aliyuncs.com",
        "CreationTime": "2017-11-14T09:15:50Z",
        "Status": "Normal",
        "CateId": 0,
        "MediaId": "7753d144efd74d6c45fe0570****",
        "DownloadSwitch": "on",
        "Tags": "tag1, tag2",
        "ModificationTime": "2017-06-26T06:38:48Z",
        "CateName": "cate1",
        "Description": "Alibaba Cloud VOD video description",
        "AppId": "app-****",
        "CoverURL": "https://example.aliyundoc.com/****.jpg",
        "TemplateGroupId": "b4039216985f4312a5382a4ed****",
        "Title": "Alibaba Cloud VOD Video Title",
        "Snapshots": [
          "[\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****\",\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****\",...]"
        ],
        "StorageClass": "Standard",
        "RestoreStatus": "Success",
        "RestoreExpiration": "2023-03-30T10:14:14Z",
        "UserData": "{\"Extend\":\"xxx\",\"MessageCallback\":\"xxx\"}",
        "ReferenceId": "123-123"
      },
      "MezzanineInfo": {
        "CreationTime": "2017-11-14T09:15:50Z",
        "Status": "Normal",
        "FileURL": "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164h67f57ef-0005-6884-51a-1****.mp4",
        "MediaId": "1f1a6fc03ca04814031b8a6559e****",
        "Height": 540,
        "Bitrate": "771.2280",
        "FileName": "27ffc438-164h67f57ef-0005-6884-51a-1****.mp4\n",
        "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)\n",
            "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"
          }
        ],
        "FileMD5": ""
      },
      "PlayInfoList": [
        {
          "CreationTime": "2022-04-18T07:37:15Z\n",
          "Status": "Normal",
          "Specification": "H264.LD",
          "NarrowBandType": "0",
          "Height": 640,
          "Bitrate": "450.878",
          "ModificationTime": "2022-04-20T06:32:19Z",
          "WatermarkId": "dgfn26457856****",
          "Encrypt": 1,
          "Definition": "LD",
          "EncryptType": "AliyunVoDEncryption",
          "EncryptMode": "License",
          "StreamType": "video",
          "JobId": "80e9c6580e754a798c3c19c59b16****",
          "Size": 418112,
          "Width": 360,
          "Fps": "25",
          "Duration": "9.0464",
          "PlayURL": "https://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8",
          "Format": "m3u8",
          "HDRType": "HLG",
          "BitDepth": 8,
          "JobType": 2,
          "JobExt": "CopyrightMarkTest",
          "CodecName": "h264",
          "TemplateId": "a86a4338dd2e83da45154004a541****",
          "TemplateGroupId": "fb0716154b21a4ecb5b70a26ccc8****"
        }
      ]
    }
  ]
}

Codes d'erreur

Consultez Codes d'erreur pour la liste complète.

Notes de version

Consultez Notes de version pour la liste complète.