tencent cloud

APIs

DescribeMediaInfos

Download
Focus Mode
Font Size
Last updated: 2026-05-19 15:02:05

1. API Description

Domain name for API request: vod.intl.tencentcloudapi.com.

  1. This API is used to get the information of multiple media files. Specifically, the information returned is as follows:
    1. basicInfo: Basic information including the file name, category, playback URL, and thumbnail.
    2. metaData: Metadata including the file size, duration, video stream information, and audio stream information.
    3. transcodeInfo: Transcoding information including the URLs, video stream parameters, and audio stream parameters of transcoding outputs.
    4. animatedGraphicsInfo: The information of the animated images (such as GIF images) generated.
    5. sampleSnapshotInfo: The information of the sampled screenshots generated.
    6. imageSpriteInfo: The information of the image sprites generated.
    7. snapshotByTimeOffsetInfo: The information of the time point screenshots generated.
    8. keyFrameDescInfo: The video timestamp information.
    9. adaptiveDynamicStreamingInfo: Adaptive bitrate information including the specifications, encryption type, and formats of the streams.
    10. reviewInfo: Moderation details for audio/video content and thumbnails.
  2. You can specify what information to return.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeMediaInfos.
Version Yes String Common Params. The value used for this API: 2018-07-17.
Region No String Common Params. This parameter is not required.
FileIds.N Yes Array of String

Media file ID list. N starts from 0 with a maximum of 19.

SubAppId No Integer

VOD application ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the application ID when accessing resources in on-demand applications (whether the default application or a newly created application).

Filters.N No Array of String

Information to be returned for all specified media files. Multiple information can be specified simultaneously, with N starting from 0. If this field is not filled in, default return all information. Options:

  • basicInfo (video basic information).
  • metaData (video metadata).
  • transcodeInfo (video transcoding result information).
  • animatedGraphicsInfo (video motion graphic result information).
  • imageSpriteInfo (video thumbnail information).
  • snapshotByTimeOffsetInfo (video screenshot by specified time point).
  • sampleSnapshotInfo (sampling screenshot information).
  • keyFrameDescInfo (Dotting Information).
  • adaptiveDynamicStreamingInfo (Adaptive Bitrate Streaming information).
  • miniProgramReviewInfo (miniProgramReviewInfo).
  • subtitleInfo (subtitle information).
  • reviewInfo (review information).
  • mpsAiMediaInfo (Intelligent Media Assets information).
  • 3. Output Parameters

    Parameter Name Type Description
    MediaInfoSet Array of MediaInfo

    Media file information list.

    NotExistFileIdSet Array of String

    Non-existent file ID list.

    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Only get media basic information

    Only get media basic information, Filters specify basicInfo.

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeMediaInfos
    <Common request parameters>
    
    {
        "Filters": [
            "basicInfo"
        ],
        "FileIds": [
            "5285485487985271488",
            "5285485487985271487"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "test file",
                        "Description": "",
                        "CreateTime": "2017-01-23T07:25:52Z",
                        "UpdateTime": "2017-01-23T07:25:52Z",
                        "ExpireTime": "2017-03-23T07:25:52Z",
                        "ClassId": 1,
    "ClassName": "Sports",
    "ClassPath": "Track and Field"
                        "StoragePath": "/xx/xx/f0.mp4",
                        "CoverUrl": "http://example.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://example.com/xx/xx/f0.mp4",
                        "TagSet": [],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": null,
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "Category": "Video",
                        "Vid": "",
                        "StorageClass": "STANDARD",
                        "StorageRegion": "gzp",
                        "Status": "Normal"
                    },
                    "MetaData": null,
                    "TranscodeInfo": null,
                    "AdaptiveDynamicStreamingInfo": null,
                    "AnimatedGraphicsInfo": null,
                    "SampleSnapshotInfo": null,
                    "ImageSpriteInfo": null,
                    "MiniProgramReviewInfo": null,
                    "SubtitleInfo": null,
                    "SnapshotByTimeOffsetInfo": null,
                    "KeyFrameDescInfo": null,
                    "ReviewInfo": null
                }
            ],
            "NotExistFileIdSet": [
                "5285485487985271488"
            ]
        }
    }
    

    Example2 Retrieve media detailed information

    Retrieve all media information without specifying Filters.

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeMediaInfos
    <Common request parameters>
    
    {
        "FileIds": [
            "5285485487985271488",
            "5285485487985271487"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "test file",
                        "Description": "",
                        "CreateTime": "2017-01-23T07:25:52Z",
                        "UpdateTime": "2017-01-23T07:25:52Z",
                        "ExpireTime": "2017-03-23T07:25:52Z",
                        "ClassId": 1,
    "ClassName": "Sports",
    "ClassPath": "Track and Field"
                        "StoragePath": "/xx/xx/f0.mp4",
                        "CoverUrl": "http://example.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://example.com/xx/xx/f0.mp4",
                        "TagSet": [],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": null,
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "Category": "Video",
                        "Vid": "",
                        "StorageClass": "STANDARD",
                        "StorageRegion": "gzp",
                        "Status": "Normal"
                    },
                    "MetaData": {
                        "AudioDuration": 3601,
                        "VideoDuration": 3601,
                        "Md5": "",
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "Fps": 222,
                                "CodecTag": "",
                                "DynamicRangeInfo": {
                                    "Type": "SDR",
                                    "HDRType": ""
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://example.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "DigitalWatermarkType": "None",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "Fps": 222,
                                        "CodecTag": "",
                                        "DynamicRangeInfo": {
                                            "Type": "SDR",
                                            "HDRType": ""
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "CopyRightWatermarkText": ""
                            },
                            {
                                "Url": "http://example.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "DigitalWatermarkType": "None",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "Fps": 222,
                                        "CodecTag": "",
                                        "DynamicRangeInfo": {
                                            "Type": "SDR",
                                            "HDRType": ""
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "CopyRightWatermarkText": ""
                            },
                            {
                                "Url": "http://example.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "DigitalWatermarkType": "None",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "Fps": 24,
                                        "CodecTag": "",
                                        "DynamicRangeInfo": {
                                            "Type": "SDR",
                                            "HDRType": ""
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "CopyRightWatermarkText": ""
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://example.com/xx/xx/f20000.gif",
                                "Definition": 20000,
                                "Container": "gif",
                                "Height": 480,
                                "Width": 640,
                                "Bitrate": 1000000,
                                "Size": 600000,
                                "Md5": "bfcf7c6f154b1842a661f9e80b07a1d0",
                                "StartTimeOffset": 10,
                                "EndTimeOffset": 15
                            }
                        ]
                    },
                    "SampleSnapshotInfo": {
                        "SampleSnapshotSet": [
                            {
                                "Definition": 10,
                                "SampleType": "percent",
                                "WaterMarkDefinition": [],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/shotup/xx1.png",
                                    "http://example.com/xx/xx/shotup/xx2.png",
                                    "http://example.com/xx/xx/shotup/xx3.png",
                                    "http://example.com/xx/xx/shotup/xx4.png",
                                    "http://example.com/xx/xx/shotup/xx5.png",
                                    "http://example.com/xx/xx/shotup/xx6.png",
                                    "http://example.com/xx/xx/shotup/xx7.png",
                                    "http://example.com/xx/xx/shotup/xx8.png",
                                    "http://example.com/xx/xx/shotup/xx9.png",
                                    "http://example.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://example.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "WaterMarkDefinition": [
                                            725562
                                        ],
                                        "TimeOffset": 0,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx1.jpg"
                                    },
                                    {
                                        "WaterMarkDefinition": [
                                            725562
                                        ],
                                        "TimeOffset": 1000,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx2.jpg"
                                    }
                                ]
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "http://example.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "ReviewResult": "pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "m4a",
                                    "AudioDuration": 0,
                                    "VideoDuration": 3601,
                                    "Md5": "",
                                    "VideoStreamSet": [
                                        {
                                            "Bitrate": 246000,
                                            "Height": 480,
                                            "Width": 640,
                                            "Codec": "h264",
                                            "Fps": 222,
                                            "CodecTag": "",
                                            "DynamicRangeInfo": {
                                                "Type": "SDR",
                                                "HDRType": ""
                                            }
                                        }
                                    ],
                                    "Bitrate": 563477,
                                    "Height": 378,
                                    "Width": 672,
                                    "Duration": 3601,
                                    "Size": 10502,
                                    "AudioStreamSet": [
                                        {
                                            "Codec": "aac",
                                            "SamplingRate": 44100,
                                            "Bitrate": 35
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Definition": 0,
                                "Package": "HLS",
                                "DrmType": "",
                                "Url": "http://example.com/xx/xx/master_playlist.m3u8",
                                "Size": 0,
                                "DigitalWatermarkType": "",
                                "CopyRightWatermarkText": "",
                                "SubStreamSet": []
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
    "Content": "Path"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Id": "subtitleId",
                                "Name": "English",
                                "Language": "en-US",
                                "Format": "vtt",
                                "Url": "http://example.com/vodgzp123/15517123183853310575/subtitles/subtitleId.vtt",
                                "Source": "UserUploaded"
                            }
                        ]
                    },
                    "ReviewInfo": {
                        "MediaReviewInfo": {
                            "Definition": 10,
                            "Suggestion": "pass",
                            "TypeSet": [],
                            "ReviewTime": "2022-10-08T10:00:00Z"
                        },
                        "CoverReviewInfo": null
                    }
                }
            ],
            "NotExistFileIdSet": [
                "5285485487985271488"
            ]
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation Operation failed.
    FailedOperation.InvalidVodUser The VOD service is not activated.
    InternalError Internal error.
    InternalError.GetMediaListError Internal error: an error occurred while getting the media list.
    InvalidParameter Parameter error.
    InvalidParameterValue.AppId No on-demand service is enabled.
    InvalidParameterValue.FileIds Incorrect FileIds parameter.
    InvalidParameterValue.FileIdsEmpty The FileIds array is empty.
    InvalidParameterValue.FileIdsOverLimit FileIds array exceeds the limit
    UnauthorizedOperation Unauthorized operation.

    Help and Support

    Was this page helpful?

    Help us improve! Rate your documentation experience in 5 mins.

    Feedback