tencent cloud

Feedback

SearchMedia

Last updated: 2024-03-27 16:08:35

    1. API Description

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

    Search for media information, supporting multiple condition filtering, as well as sorting and filtering of returned results. This includes:

    • Specify a collection of file IDs (FileIds) to return media with any ID in the collection.

    • Fuzzy search based on multiple media file names (Names) or description information (Descriptions).

    • Search based on multiple file name prefixes (NamePrefixes).

    • Specify a collection of categories (ClassIds, see input parameters) to return media that meets any category in the collection. For example, media categories include movies, TV shows, variety shows, etc., and there are subcategories such as historical films, action films, and romance films under the movie category. If ClassIds specifies movies and TV shows, all subcategories under movies and TV shows will be returned; if ClassIds specifies historical films and action films, only media under these two subcategories will be returned.

    • Specify a collection of tags (Tags, see input parameters) to return media that meets any tag in the collection. For example, media tags include ACG, palace fighting, and ghost animal. If Tags specifies ACG and ghost animal, media that meets any of these two tags will be retrieved.

    • Specify a collection of file types (Categories, see input parameters) to return media that meets any type in the collection. For example, file types include Video (video), Audio (audio), and Image (image). If Categories specifies Video and Audio, media that meets these types will be retrieved.

    • Specify a collection of sources (SourceTypes, see input parameters) to return media that meets any source in the collection. For example, media sources include Record (live recording) and Upload (upload). If SourceTypes specifies Record and Upload, media that meets these sources will be retrieved.

    • Specify a collection of file container formats (MediaTypes, see input parameters) to return media that meets any container format in the collection. For example, container formats include MP4, AVI, MP3, etc. If MediaTypes specifies MP4 and MP3, media that meets these container formats will be retrieved.

    • Specify a collection of file statuses (Status, see input parameters) to return media that meets any status in the collection. For example, file statuses include Normal (normal), SystemForbidden (platform ban), and Forbidden (active ban). If Status specifies Normal and Forbidden, media that meets these statuses will be retrieved.

    • Specify a collection of file moderation results (ReviewResults, see input parameters) to return media that meets any status in the collection. For example, file moderation results include pass (passed) and block (not compliant). If ReviewResults specifies pass and block, media that meets these moderation results will be retrieved.

    • Filter live recorded media by specifying a collection of live streaming codes (StreamIds, see input parameters).

    • Filter media by specifying the creation time range of the media.

    • Filter media by specifying a collection of TRTC application IDs.

    • Filter media by specifying a collection of TRTC room IDs.

    • The above parameters can be combined in any way to search. For example, filter media created between 12:00:00 on December 1, 2018, and 12:00:00 on December 8, 2018, categorized as movies or TV shows, and tagged with palace fighting and suspense. Note that the search logic for elements of any parameter that supports array input is 'or'. The logical relationship between all parameters is 'and'

    • Allow to control the type of media information returned through Filters (default to return all information). Optional inputs include:

      1. Basic information (basicInfo): including media name, category, playback URL, cover image, etc.
      2. Metadata (metaData): including size, duration, video stream information, audio stream information, etc.
      3. Transcoding result information (transcodeInfo): including the media addresses, video stream parameters, audio stream parameters, etc., generated by transcoding the media into various specifications.
      4. Animated image result information (animatedGraphicsInfo): information on the animated image (such as gif) generated after converting the video.
        Sampled screenshot information (sampleSnapshotInfo): screenshot information after sampling the video.
      5. Image sprite information (imageSpriteInfo): image sprite information after generating the sprite from the video.
      6. Specified time point screenshot information (snapshotByTimeOffsetInfo): screenshot information after capturing the video at specified time points.
      7. Video timestamp info (keyFrameDescInfo): timestamp information set for the video.
      8. Adaptive Bitrate Streaming information (adaptiveDynamicStreamingInfo): including specifications, encryption types, muxing formats, and other relevant information.
    • Allow sorting the results by creation time and returning them in pages. Pagination is controlled by Offset and Limit (see input parameters).

    API result count limitation:
    - Offset and Limit both affect the number of results returned in a single page query. Please pay special attention: when both of these values are missing, this API will return a maximum of 10 query results. - Supports up to 5,000 search results, and queries beyond this limit are not supported. If the search result volume is too large, it is recommended to use more refined filtering conditions to reduce search results.


    Not recommended for conditional filtering:

    • (Not recommended: use Names, NamePrefixes, or Descriptions instead) Fuzzy search for media file names or description information with a single text (Text).
    • (Not recommended: use SourceTypes instead) Search for media files with a single source (SourceType).
    • (Not recommended: use StreamIds instead) Search for media files with a single live streaming code (StreamId).
    • (Not recommended: use CreateTime instead) Search for media files with a single start creation time (StartTime).
    • (Not recommended: use CreateTime instead) Search for media files with a single end creation time (EndTime).

    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: SearchMedia.
    Version Yes String Common Params. The value used for this API: 2018-07-17.
    Region No String Common Params. This parameter is not required.
    SubAppId No Integer The VOD application ID. For customers who activate VOD service from December 25, 2023, if they want to access resources in a VOD application (whether it's the default application or a newly created one), they must fill in this field with the application ID.
    FileIds.N No Array of String File ID set. Any element in the set can be matched.
  • Array length limit: 10.
  • ID length limit: 40 characters.
  • Names.N No Array of String The file names to use for fuzzy search, which are sorted by relevance in descending order.
  • Name length limit: 100 characters.
  • Array length limit: 10
  • NamePrefixes.N No Array of String The file name prefixes to search.
  • Prefix length limit: 100 characters.
  • Array length limit: 10.
  • Descriptions.N No Array of String File description set. Media file descriptions are fuzzily matched. The higher the match rate, the higher-ranked the result.
  • Length limit for a single description: 100 characters
  • Array length limit: 10
  • ClassIds.N No Array of Integer Category ID set. The categories of the specified IDs and all subcategories in the set are matched.
  • Array length limit: 10.
  • Tags.N No Array of String The tags to search. A file is considered a match if it has any of the tags specified.
  • Tag length limit: 32 characters.
  • Array length limit: 16.
  • Categories.N No Array of String File type. Any element in the set can be matched.
  • Video: video file
  • Audio: audio file
  • Image: image file
  • SourceTypes.N No Array of String Media file source set. For valid values, please see SourceType.
  • Array length limit: 10.
  • StreamIds.N No Array of String The live stream code array. A media file will be returned if it matches any element in the array.
  • Array length limit: 10
  • CreateTime No TimeRange Matches files created within the time period.
  • Includes specified start and end points in time.
  • ExpireTime No TimeRange Files whose expiration time points are within the specified time range will be returned. Expired files will not be returned.
  • The files whose expiration time points are on the start or end time of the specified range will also be returned.
  • StorageRegions.N No Array of String Regions where media files are stored, such as ap-chongqing. For more regions, see Storage Regions.
  • Length limit for a single region: 20 characters
  • Array length limit: 20
  • StorageClasses.N No Array of String An array of storage classes. Valid values:
  • STANDARD
  • STANDARD_IA
  • ARCHIVE
  • DEEP_ARCHIVE
  • MediaTypes.N No Array of String The file formats.
  • Array length limit: 10
  • Status.N No Array of String The file statuses.
  • Normal
  • SystemForbidden (blocked by VOD)
  • Forbidden (blocked by you)
  • ReviewResults.N No Array of String The types of moderation result.
  • pass
  • review (the content may be non-compliant and needs to be reviewed)
  • block (the content is non-compliant and should be blocked)
  • notModerated (the file hasn't been moderated yet)
  • TrtcSdkAppIds.N No Array of Integer The TRTC application IDs. Any file that matches one of the application IDs will be returned.
  • Array length limit: 10
  • TrtcRoomIds.N No Array of String The TRTC room IDs. Any file that matches one of the room IDs will be returned.
  • Element length limit: 64 characters.
  • Array length limit: 10.
  • Filters.N No Array of String Specifies information entry that needs to be returned for all media files. Multiple entries can be specified simultaneously. N starts from 0. If this field is left empty, all information entries will be returned by default. Valid values:
  • basicInfo (basic video information).
  • metaData (video metadata).
  • transcodeInfo (result information of video transcoding).
  • animatedGraphicsInfo (result information of animated image generating task).
  • imageSpriteInfo (image sprite information).
  • snapshotByTimeOffsetInfo (point-in-time screenshot information).
  • sampleSnapshotInfo (sampled screenshot information).
  • keyFrameDescInfo (timestamp information).
  • adaptiveDynamicStreamingInfo (information of adaptive bitrate streaming).
  • miniProgramReviewInfo (WeChat Mini Program audit information).
  • Sort No SortBy Sorting order.
  • Valid value of Sort.Field: CreateTime.
  • If Text, Names, or Descriptions is not empty, the Sort.Field field will not take effect, and the search results will be sorted by match rate.
  • Offset No Integer
    Start offset of a paged return. Default value: 0. Entries from No. "Offset" to No. "Offset + Limit - 1" will be returned.
  • Value range: "Offset + Limit" cannot be more than 5,000. (For more information, please see Limit on the Number of Results Returned by API)
  • Limit No Integer
    Number of entries returned by a paged query. Default value: 10. Entries from No. "Offset" to No. "Offset + Limit - 1" will be returned.
  • Value range: "Offset + Limit" cannot be more than 5,000. (For more information, please see Limit on the Number of Results Returned by API)
  • Text No String (This is not recommended. Names, NamePrefixes, or Descriptions should be used instead)
    Search text, which fuzzily matches the media file name or description. The more matching items and the higher the match rate, the higher-ranked the result. It can contain up to 64 characters.
    SourceType No String (This is not recommended. SourceTypes should be used instead)
    Media file source. For valid values, please see SourceType.
    StreamId No String (Not recommended. Consider using StreamIds instead.)
    The live stream code.
    StartTime No String (This is not recommended. CreateTime should be used instead)
    Start time in the creation time range.
  • After or at the start time.
  • If CreateTime.After also exists, it will be used first.
  • In ISO 8601 format. For more information, please see ISO Date Format.
  • EndTime No String (This is not recommended. CreateTime should be used instead)
    End time in the creation time range.
  • Before the end time.
  • If CreateTime.Before also exists, it will be used first.
  • In ISO 8601 format. For more information, please see ISO Date Format.
  • Vids.N No Array of String This parameter is invalid now.
    Vid No String This parameter is invalid now.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of eligible entries.
  • Maximum value: 5000. If the number of eligible entries is greater than 5,000, this field will return 5,000 instead of the actual number.
  • MediaInfoSet Array of MediaInfo Media file information 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 Search the recording files within a certain time range based on the push live broadcast code, and sort them in descending order by creation time

    Search for recording files whose live broadcast codes are StreamId_test1 and StreamId_test2 and whose creation time is between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z. Sort them in descending order by creation time. Only the first one that meets the conditions will be returned. files.

    Input Example

    POST / HTTP/1.1
    Host: vod.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Public Request Parameter>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "StreamIds": [
            "StreamId_test2",
            "StreamId_test1"
        ],
        "Limit": 1,
        "SourceTypes": [
            "Record"
        ],
        "Offset": 0,
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
                        "ClassName": "Test",
                        "ClassPath": "Test",
                        "CoverUrl": "http://xx.vod2.myqcloud.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://xx.vod2.myqcloud.com/xxx/xx/f0.mp4",
                        "TagSet": [
                            "tag1",
                            "tag2"
                        ],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "Category": "Image",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://125xx.vod2.myqcloud.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": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx1.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx2.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx3.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx4.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx5.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx6.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx7.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx8.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx9.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://xx.vod2.myqcloud.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://xx.vod2.myqcloud.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx1.jpg"
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx2.jpg"
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
                                "Content": "abc"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    Example2 Search files within a certain time range based on file name prefix and sort by creation time in descending order

    Search for files with filename prefix Sport and creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, and sort by creation time in descending order.

    Input Example

    POST / HTTP/1.1
    Host: vod.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Public Request Parameter>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "NamePrefixes": [
            "Sport"
        ],
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
                        "ClassName": "Test",
                        "ClassPath": "Test",
                        "CoverUrl": "http://xx.vod2.myqcloud.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://xx.vod2.myqcloud.com/xxx/xx/f0.mp4",
                        "TagSet": [],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "Category": "Video",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://125xx.vod2.myqcloud.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": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx1.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx2.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx3.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx4.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx5.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx6.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx7.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx8.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx9.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://xx.vod2.myqcloud.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://xx.vod2.myqcloud.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx1.jpg"
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx2.jpg"
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
                                "Content": "abc"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    Example3 Fuzzy search for files within a certain time range based on file names and sort by creation time in descending order

    Search for files whose file names match the keyword Sport and whose creation time is between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, and sort them in descending order by creation time.

    Input Example

    POST / HTTP/1.1
    Host: vod.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Public Request Parameter>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "Names": [
            "Sport"
        ],
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
                        "ClassName": "Test",
                        "ClassPath": "Test",
                        "CoverUrl": "http://xx.vod2.myqcloud.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://xx.vod2.myqcloud.com/xxx/xx/f0.mp4",
                        "TagSet": [],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "Category": "Video",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://125xx.vod2.myqcloud.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": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx1.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx2.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx3.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx4.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx5.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx6.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx7.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx8.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx9.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://xx.vod2.myqcloud.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://xx.vod2.myqcloud.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx1.jpg"
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx2.jpg"
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
                                "Content": "abc"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    Example4 Search uploaded files within a certain time range based on tags and sort them in descending order by creation time

    Search for files with tags tag1 and tag2, creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, and file source Upload, and sort them in descending order by creation time.

    Input Example

    POST / HTTP/1.1
    Host: vod.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Public Request Parameter>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        },
        "SourceTypes": [
            "Upload"
        ],
        "Tags": [
            "tag2",
            "tag1"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
                        "ClassName": "Test",
                        "ClassPath": "Test",
                        "CoverUrl": "http://xx.vod2.myqcloud.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://xx.vod2.myqcloud.com/xxx/xx/f0.mp4",
                        "TagSet": [
                            "tag1",
                            "tag2"
                        ],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "Category": "Image",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://125xx.vod2.myqcloud.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": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx1.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx2.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx3.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx4.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx5.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx6.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx7.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx8.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx9.png",
                                    "http://125xx.vod2.myqcloud.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://xx.vod2.myqcloud.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://xx.vod2.myqcloud.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx1.jpg"
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://xxxx.vod2.myqcloud.com/xx/xx/snapshotByTime/xx2.jpg"
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
                                "Content": "abc"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    Example5 Search image files within a certain time range based on classification, and only return basic file information, sorted by creation time in descending order

    Search for image files with a ClassId of 123 and a creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, sort them in descending order by creation time, and only return the basic information of the file.

    Input Example

    POST / HTTP/1.1
    Host: vod.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Public Request Parameter>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "Filters": [
            "basicInfo"
        ],
        "Categories": [
            "Image"
        ],
        "ClassIds": [
            123
        ],
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 2,
            "MediaInfoSet": [
                {
                    "FileId": "5285890811175706012",
                    "BasicInfo": {
                        "Name": "Fog",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:02:36Z",
                        "UpdateTime": "2020-12-11T07:02:37Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
                        "ClassName": "icon",
                        "ClassPath": "icon",
                        "CoverUrl": "",
                        "Type": "png",
                        "MediaUrl": "http://xxx.com/Tmf3xphxGoUA.png",
                        "TagSet": [],
                        "StorageRegion": "ap-shanghai",
                        "SourceInfo": {
                            "SourceType": "Upload",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "Vid": "5285890811175706012",
                        "Category": "Image",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id"
                            }
                        ]
                    },
                    "ReviewInfo": null,
                    "MetaData": null,
                    "TranscodeInfo": null,
                    "AnimatedGraphicsInfo": null,
                    "SampleSnapshotInfo": null,
                    "ImageSpriteInfo": null,
                    "SnapshotByTimeOffsetInfo": null,
                    "KeyFrameDescInfo": null,
                    "AdaptiveDynamicStreamingInfo": null,
                    "MiniProgramReviewInfo": null
                },
                {
                    "FileId": "5285890811175698692",
                    "BasicInfo": {
                        "Name": "partly cloudy",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:02:35Z",
                        "UpdateTime": "2020-12-11T07:02:36Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 737598,
                        "ClassName": "icon",
                        "ClassPath": "icon",
                        "CoverUrl": "",
                        "Type": "png",
                        "MediaUrl": "http://xxx/uAgVpElena0A.png",
                        "TagSet": [],
                        "StorageRegion": "ap-shanghai",
                        "SourceInfo": {
                            "SourceType": "Upload",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "Vid": "5285890811175698692",
                        "Category": "Image",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id"
                            }
                        ]
                    },
                    "ReviewInfo": null,
                    "MetaData": null,
                    "TranscodeInfo": null,
                    "AnimatedGraphicsInfo": null,
                    "SampleSnapshotInfo": null,
                    "ImageSpriteInfo": null,
                    "SnapshotByTimeOffsetInfo": null,
                    "KeyFrameDescInfo": null,
                    "AdaptiveDynamicStreamingInfo": null,
                    "MiniProgramReviewInfo": null
                }
            ]
        }
    }
    

    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.
    InvalidParameterValue.Categories Invalid file type.
    InvalidParameterValue.ClassIds Incorrect parameter value: invalid ClassIds.
    InvalidParameterValue.EndTime Incorrect parameter value: invalid EndTime.
    InvalidParameterValue.FileIds Incorrect FileIds parameter.
    InvalidParameterValue.NamePrefixes Invalid filename prefix.
    InvalidParameterValue.Names Too many elements in the Names array.
    InvalidParameterValue.Offset Incorrect parameter value: invalid Offset.
    InvalidParameterValue.Sort Incorrect parameter value: invalid Sort.
    InvalidParameterValue.SourceType Incorrect parameter value: invalid SourceType.
    InvalidParameterValue.SourceTypes Unknown media file source.
    InvalidParameterValue.StartTime Incorrect parameter value: invalid StartTime.
    InvalidParameterValue.StorageRegions Invalid StorageRegions.
    InvalidParameterValue.StreamIds Invalid stream ID.
    InvalidParameterValue.SubAppId Incorrect parameter value: subapplication ID
    InvalidParameterValue.Tags Incorrect parameter value: invalid Tags.
    InvalidParameterValue.Text Incorrect parameter value: search text.
    InvalidParameterValue.Types Invalid Types.
    InvalidParameterValue.Vids Invalid Vids.
    LimitExceeded Quota limit is exceeded.
    UnauthorizedOperation Unauthorized operation.