调用GetVideo获取媒体集中一个视频的信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String GetVideo

操作接口名称,固定取值为GetVideo。

Project String immvideotest

项目名称。

SetId String videoset

媒体集的唯一标识。

VideoUri String oss://imm-test/testcases/video.mp4

视频的OSS URI。

OSS地址规则为oss://bucket/object,其中bucket为和当前项目处于同一区域的OSS Bucket名称,object为文件路径。

RegionId String cn-hangzhou

项目所在地域的ID。

地域Endpoint格式为imm.RegionId.aliyuncs.com,例如当RegionId为cn-hangzhou时,地域Endpoint为imm.cn-hangzhou.aliyuncs.com。

返回数据

名称 类型 示例值 描述
CreateTime String 2021-01-21T07:40:41.683Z

视频加入媒体集的时间。

ExternalId String externalId001

外部ID,用于和您的应用层的 ID (如果有)进行绑定。

FileSize Integer 25115517

文件大小,单位为字节。

ModifyTime String 2021-01-21T07:40:41.683Z

视频的修改时间。

添加视频到媒体集后,如果未修改过视频,则视频的修改时间和视频加入媒体集的时间相同。

ProcessFailReason String Timeout

视频处理的失败原因。

ProcessModifyTime String 2021-01-21T07:40:53.955Z

视频处理的更新时间。

ProcessStatus String Success

视频处理的状态。

RemarksA String AdminGroup/AdminUserA/

标记信息。

RemarksB String nas://path/to/file

标记信息。

RemarksC String remarkc

标记信息。

RemarksD String remarkd

标记信息。

RequestId String 5FC2B195-B43E-45ED-9BEC-169358550193

当次请求的Request ID。

SetId String videoset

媒体集的唯一标识。

SourcePosition String 00000000.010

视频中该图片帧处于源视频的时间轴位置。格式为00000000.010,即%8.3f。

SourceType String video

源数据的类型。

SourceUri String oss://imm-test/testcases/video.mp4

视频的OSS URI。

VideoDuration Float 15.263

视频时长,单位为秒。

VideoFacesFailReason String Timeout

视频人脸识别的失败原因。

VideoFacesModifyTime String 1970-01-01T00:00:00Z

视频人脸识别的更新时间。

VideoFacesStatus String Success

视频人脸识别的状态。

VideoFormat String mov,mp4,m4a,3gp,3g2,mj2

视频格式。

VideoFrameTagsFailReason String Timeout

视频帧标签识别的失败原因。

VideoFrameTagsModifyTime String 1970-01-01T00:00:00Z

视频帧标签识别的更新时间。

VideoFrameTagsStatus String Success

视频帧标签识别的状态。

VideoFrames Integer 462

帧数。

VideoHeight Integer 1920

视频画面的高度。

VideoInfo String {"MediaStreams":{"VideoStreams":[{"Index":0,"Language":"eng","CodecName":"h264","CodecLongName":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","Profile":"Baseline","CodecTimeBase":"1373627/83160000","CodecTagString":"avc1","CodecTag":"0x31637661","Width":1080,"Height":1920,"SampleAspectRatio":"1:1","DisplayAspectRatio":"9:16","PixelFormat":"yuv420p","Level":40,"FrameRrate":"90000/1","AverageFrameRate":"41580000/1373627","TimeBase":"1/90000","StartTime":"0.000000","Duration":"15.262522","Bitrate":"13091201","Frames":"462"}],"AudioStreams":[],"SubtitleStreams":[]},"MediaFormat":{"NumberStreams":2,"FormatName":"mov,mp4,m4a,3gp,3g2,mj2","FormatLongName":"QuickTime / MOV","Size":"25115517","Duration":"15.263000","StartTime":"0.000000","Bitrate":"13164131","CreationTime":"2020-10-25T09:16:09.000000Z","Address":{},"Tag":{}}}

视频信息。

VideoOCRFailReason String Timeout

OCR识别的失败原因。

VideoOCRModifyTime String 1970-01-01T00:00:00Z

OCR识别的更新时间。

VideoOCRStatus String Success

OCR识别的状态。

VideoSTTFailReason String Timeout

语音转文字的失败原因。

VideoSTTModifyTime String 2021-01-21T07:40:53.95Z

语音转文字的更新时间。

VideoSTTStatus String Success

语音转文字的状态。

VideoTags Array of VideoTags

视频标签处理结果。

ParentTagName String 内部场景

父级标签名称。

TagConfidence Float 0.8933850526809692

标签置信度。

TagLevel Integer 2

标签级别,取值范围为1~4。

TagName String 大型超市

标签名称。

VideoTagsFailReason String Timeout

视频标签处理的失败原因。

VideoTagsModifyTime String 2021-01-21T07:40:53.95Z

视频标签处理的更新时间。当VideoTagsStatus更改时更新。

VideoTagsStatus String Success

视频标签处理的状态,包括如下选项:

  • NotProcessed:未处理
  • Processing:处理中
  • Success:成功
  • Failed :失败

您可以根据该状态决定读取结果、等待或重试。

VideoUri String oss://imm-test/testcases/video.mp4

视频的OSS URI。

VideoWidth Integer 1080

视频画面的宽度。

示例

请求示例

http(s)://[Endpoint]/?Action=GetVideo
&Project=immvideotest
&SetId=videoset
&VideoUri=oss://imm-test/testcases/video.mp4
&<公共请求参数>

正常返回示例

XML格式

<ModifyTime>2021-01-21T07:40:41.683Z</ModifyTime>
<ProcessStatus>Success</ProcessStatus>
<VideoWidth>1080</VideoWidth>
<SourceUri>oss://imm-test/testcases/video.mp4</SourceUri>
<SourceType>video</SourceType>
<VideoInfo>{"MediaStreams":{"VideoStreams":[{"Index":0,"Language":"eng","CodecName":"h264","CodecLongName":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","Profile":"Baseline","CodecTimeBase":"1373627/83160000","CodecTagString":"avc1","CodecTag":"0x31637661","Width":1080,"Height":1920,"SampleAspectRatio":"1:1","DisplayAspectRatio":"9:16","PixelFormat":"yuv420p","Level":40,"FrameRrate":"90000/1","AverageFrameRate":"41580000/1373627","TimeBase":"1/90000","StartTime":"0.000000","Duration":"15.262522","Bitrate":"13091201","Frames":"462"}],"AudioStreams":[{"Index":1,"CodecName":"aac","CodecLongName":"AAC (Advanced Audio Coding)","CodecTimeBase":"1/44100","CodecTagString":"mp4a","CodecTag":"0x6134706d","SampleFormat":"fltp","SampleRate":"44100","Channels":1,"ChannelLayout":"mono","TimeBase":"1/44100","StartTime":"0.000000","Duration":"15.256803","Bitrate":"64003","Frames":"656","Language":"eng"}],"SubtitleStreams":[]},"MediaFormat":{"NumberStreams":2,"FormatName":"mov,mp4,m4a,3gp,3g2,mj2","FormatLongName":"QuickTime / MOV","Size":"25115517","Duration":"15.263000","StartTime":"0.000000","Bitrate":"13164131","CreationTime":"2020-10-25T09:16:09.000000Z","Address":{},"Tag":{"CreationTime":"2020-10-25T09:16:09.000000Z"}}}</VideoInfo>
<VideoFrameTagsModifyTime>1970-01-01T00:00:00Z</VideoFrameTagsModifyTime>
<RemarksA>AdminGroup/AdminUserA/</RemarksA>
<RemarksB>nas://path/to/file</RemarksB>
<VideoFacesStatus>Success</VideoFacesStatus>
<VideoOCRModifyTime>1970-01-01T00:00:00Z</VideoOCRModifyTime>
<RemarksC>remarkc</RemarksC>
<RemarksD>remarkd</RemarksD>
<VideoHeight>1920</VideoHeight>
<SourcePosition>0.01</SourcePosition>
<VideoFrameTagsStatus>Success</VideoFrameTagsStatus>
<VideoTagsModifyTime>2021-01-21T07:40:53.95Z</VideoTagsModifyTime>
<VideoOCRStatus>Success</VideoOCRStatus>
<VideoFrames>462</VideoFrames>
<RequestId>5FC2B195-B43E-45ED-9BEC-169358550193</RequestId>
<VideoSTTModifyTime>2021-01-21T07:40:53.95Z</VideoSTTModifyTime>
<ProcessModifyTime>2021-01-21T07:40:53.955Z</ProcessModifyTime>
<ExternalId>externalId001</ExternalId>
<CreateTime>2021-01-21T07:40:41.683Z</CreateTime>
<VideoUri>oss://imm-test/testcases/video.mp4</VideoUri>
<VideoFormat>mp4</VideoFormat>
<VideoSTTStatus>Success</VideoSTTStatus>
<VideoFacesModifyTime>1970-01-01T00:00:00Z</VideoFacesModifyTime>
<VideoTags>
    <TagName>内部场景</TagName>
    <TagConfidence>0.9230213165283203</TagConfidence>
    <TagLevel>1</TagLevel>
</VideoTags>
<VideoTags>
    <TagName>大型超市</TagName>
    <TagConfidence>0.8933850526809692</TagConfidence>
    <TagLevel>2</TagLevel>
    <ParentTagName>内部场景</ParentTagName>
</VideoTags>
<VideoDuration>15.263</VideoDuration>
<SetId>videoset</SetId>
<VideoTagsStatus>Success</VideoTagsStatus>
<FileSize>25115517</FileSize>

JSON格式

{
    "ModifyTime": "2021-01-21T07:40:41.683Z",
    "ProcessStatus": "Success",
    "VideoWidth": 1080,
    "SourceUri": "oss://imm-test/testcases/video.mp4",
    "SourceType": "video",
    "VideoInfo": "{\"MediaStreams\":{\"VideoStreams\":[{\"Index\":0,\"Language\":\"eng\",\"CodecName\":\"h264\",\"CodecLongName\":\"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10\",\"Profile\":\"Baseline\",\"CodecTimeBase\":\"1373627/83160000\",\"CodecTagString\":\"avc1\",\"CodecTag\":\"0x31637661\",\"Width\":1080,\"Height\":1920,\"SampleAspectRatio\":\"1:1\",\"DisplayAspectRatio\":\"9:16\",\"PixelFormat\":\"yuv420p\",\"Level\":40,\"FrameRrate\":\"90000/1\",\"AverageFrameRate\":\"41580000/1373627\",\"TimeBase\":\"1/90000\",\"StartTime\":\"0.000000\",\"Duration\":\"15.262522\",\"Bitrate\":\"13091201\",\"Frames\":\"462\"}],\"AudioStreams\":[{\"Index\":1,\"CodecName\":\"aac\",\"CodecLongName\":\"AAC (Advanced Audio Coding)\",\"CodecTimeBase\":\"1/44100\",\"CodecTagString\":\"mp4a\",\"CodecTag\":\"0x6134706d\",\"SampleFormat\":\"fltp\",\"SampleRate\":\"44100\",\"Channels\":1,\"ChannelLayout\":\"mono\",\"TimeBase\":\"1/44100\",\"StartTime\":\"0.000000\",\"Duration\":\"15.256803\",\"Bitrate\":\"64003\",\"Frames\":\"656\",\"Language\":\"eng\"}],\"SubtitleStreams\":[]},\"MediaFormat\":{\"NumberStreams\":2,\"FormatName\":\"mov,mp4,m4a,3gp,3g2,mj2\",\"FormatLongName\":\"QuickTime / MOV\",\"Size\":\"25115517\",\"Duration\":\"15.263000\",\"StartTime\":\"0.000000\",\"Bitrate\":\"13164131\",\"CreationTime\":\"2020-10-25T09:16:09.000000Z\",\"Address\":{},\"Tag\":{\"CreationTime\":\"2020-10-25T09:16:09.000000Z\"}}}",
    "VideoFrameTagsModifyTime": "1970-01-01T00:00:00Z",
    "RemarksA": "AdminGroup/AdminUserA/",
    "RemarksB": "nas://path/to/file",
    "VideoFacesStatus": "Success",
    "VideoOCRModifyTime": "1970-01-01T00:00:00Z",
    "RemarksC": "remarkc",
    "RemarksD": "remarkd",
    "VideoHeight": 1920,
    "SourcePosition": 0.01,
    "VideoFrameTagsStatus": "Success",
    "VideoTagsModifyTime": "2021-01-21T07:40:53.95Z",
    "VideoOCRStatus": "Success",
    "VideoFrames": 462,
    "RequestId": "5FC2B195-B43E-45ED-9BEC-169358550193",
    "VideoSTTModifyTime": "2021-01-21T07:40:53.95Z",
    "ProcessModifyTime": "2021-01-21T07:40:53.955Z",
    "ExternalId": "externalId001",
    "CreateTime": "2021-01-21T07:40:41.683Z",
    "VideoUri": "oss://imm-test/testcases/video.mp4",
    "VideoFormat": "mp4",
    "VideoSTTStatus": "Success",
    "VideoFacesModifyTime": "1970-01-01T00:00:00Z",
    "VideoTags": [
		{
			"TagName": "内部场景",
			"TagConfidence": "0.9230213165283203",
			"TagLevel": 1
		},
		{
			"TagName": "大型超市",
			"TagConfidence": "0.8933850526809692",
			"TagLevel": 2,
			"ParentTagName": "内部场景"
		}
	],
    "VideoDuration": 15.263,
    "SetId": "videoset",
    "VideoTagsStatus": "Success",
    "FileSize": 25115517
}