跳到主要内容
版本:3.4.4

查询服务端转储媒体文件

GET /strm/record

当打开流媒体时(POST /strm/open)指定的fmt(客户端协议)为0(FLV)且record(同时存储到服务端)属性为true时,服务将在推流到客户端的同时将流转储为音视频文件(目前仅支持客户端协议为FLV时存储为flv文件)。 本接口用于查询这些在服务端存储的音视频文件。 本接口有两种查询方式:

  • 一种是按reqId查询,此时查询条件中只需要提供reqId参数。
  • 另一种是按时间段和终端通讯手机号组合查询,此时查询条件中需至少提供startTm参数。 可选指定endTm, appIdsimNo参数。不指定endTm参数时,以当前服务器时间作为endTm。时间段的时间跨度不能超过100天。

请求

GET https://n11.gratour.info:7011/strm/record?startTm=2022-07-15 00:00:00&endTm=2022-07-16 00:00:00&__limit=20&__page=1
Authorization: Basic YWRtaW46YWRtaW4

查询参数

参数数据类型必要说明
reqIdstring?打开流媒体( POST /strm/open )时返回的请求ID。reqId查询时必要。
startTmstring?时间范围的开始时间。时间格式:yyyy-mm-dd HH:mm:ssyyyy-mm-ddTHH:mm:ssZ。使用前者格式时,时区默认为服务器时区。按时间段和终端通讯手机号组合查询时必要。
endTmstring时间范围的开始时间。时间格式:yyyy-mm-dd HH:mm:ssyyyy-mm-ddTHH:mm:ssZ。使用前者格式时,时区默认为服务器时区。按时间段和终端通讯手机号组合查询时可选。指定了startTm但不指定endTm参数时,以当前服务器时间作为endTm。
appIdstring应用ID。可选。
simNostring终端识别号。仅用于按时间段和终端通讯手机号组合查询时。可选。
__pageint分页的第几页,从1开始。不指定时,值视为1
__limitint分页每页记录数,必须大于等于1,小于等于2000。不指定时,值视为20

应答实体

{
"data": [
{
"reqId": "EPViRDWNR4S_VmtgAf_WRA",
"reqTm": "2022-07-20T15:55:15+08:00",
"simNo": "8888000001",
"chan": 1,
"live": true,
"path": "2022/07/20/01/8888000001/EPViRDWNR4S_VmtgAf_WRA.flv",
"ext": "flv",
"sz": 5910063,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/01/8888000001/EPViRDWNR4S_VmtgAf_WRA.flv",
"mediaTyp": "av"
},
{
"reqId": "5vd6u9ZtRoWRamwqdXYu2w",
"reqTm": "2022-07-20T15:55:16+08:00",
"simNo": "8888000001",
"chan": 2,
"live": true,
"path": "2022/07/20/01/8888000001/5vd6u9ZtRoWRamwqdXYu2w.flv",
"ext": "flv",
"sz": 6595447,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/01/8888000001/5vd6u9ZtRoWRamwqdXYu2w.flv",
"mediaTyp": "av"
},
{
"reqId": "QxJvRfRrT6W-GSP1wWdCRg",
"reqTm": "2022-07-20T15:55:17+08:00",
"simNo": "8888000001",
"chan": 3,
"live": true,
"path": "2022/07/20/01/8888000001/QxJvRfRrT6W-GSP1wWdCRg.flv",
"ext": "flv",
"sz": 4610791,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/01/8888000001/QxJvRfRrT6W-GSP1wWdCRg.flv",
"mediaTyp": "av"
},
{
"reqId": "7Tyv8cHjS-ypVWwX3cdTBQ",
"reqTm": "2022-07-20T15:55:18+08:00",
"simNo": "8888000001",
"chan": 4,
"live": true,
"path": "2022/07/20/01/8888000001/7Tyv8cHjS-ypVWwX3cdTBQ.flv",
"ext": "flv",
"sz": 2934602,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/01/8888000001/7Tyv8cHjS-ypVWwX3cdTBQ.flv",
"mediaTyp": "av"
},
{
"reqId": "vcdVo9PxR7ew6Qkm_g_DDA",
"reqTm": "2022-07-20T15:55:19+08:00",
"simNo": "8888000004",
"chan": 1,
"live": true,
"path": "2022/07/20/04/8888000004/vcdVo9PxR7ew6Qkm_g_DDA.flv",
"ext": "flv",
"sz": 34045118,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/04/8888000004/vcdVo9PxR7ew6Qkm_g_DDA.flv",
"mediaTyp": "av"
},
{
"reqId": "QvPqpxtiStCTvrcHhGaoXQ",
"reqTm": "2022-07-20T15:55:20+08:00",
"simNo": "8888000004",
"chan": 2,
"live": true,
"path": "2022/07/20/04/8888000004/QvPqpxtiStCTvrcHhGaoXQ.flv",
"ext": "flv",
"sz": 5832808,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/04/8888000004/QvPqpxtiStCTvrcHhGaoXQ.flv",
"mediaTyp": "av"
},
{
"reqId": "1bpGOovOS2KRTd7oQEJgkg",
"reqTm": "2022-07-20T15:55:22+08:00",
"simNo": "8888000004",
"chan": 4,
"live": true,
"path": "2022/07/20/04/8888000004/1bpGOovOS2KRTd7oQEJgkg.flv",
"ext": "flv",
"sz": 4491442,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/04/8888000004/1bpGOovOS2KRTd7oQEJgkg.flv",
"mediaTyp": "av"
},
{
"reqId": "ePt4efjDR6eQ5xsSmpiLnA",
"reqTm": "2022-07-20T15:55:23+08:00",
"simNo": "8888000003",
"chan": 1,
"live": true,
"path": "2022/07/20/03/8888000003/ePt4efjDR6eQ5xsSmpiLnA.flv",
"ext": "flv",
"sz": 2860086,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/03/8888000003/ePt4efjDR6eQ5xsSmpiLnA.flv",
"mediaTyp": "av"
},
{
"reqId": "f3WN7cThSTavrWyI-yk__A",
"reqTm": "2022-07-20T15:55:24+08:00",
"simNo": "8888000003",
"chan": 2,
"live": true,
"path": "2022/07/20/03/8888000003/f3WN7cThSTavrWyI-yk__A.flv",
"ext": "flv",
"sz": 33207107,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/03/8888000003/f3WN7cThSTavrWyI-yk__A.flv",
"mediaTyp": "av"
},
{
"reqId": "081l-LLDQkO9VYlND_08zg",
"reqTm": "2022-07-20T22:57:23+08:00",
"simNo": "8888000001",
"chan": 1,
"live": true,
"path": "2022/07/20/01/8888000001/081l-LLDQkO9VYlND_08zg.flv",
"ext": "flv",
"sz": 363375,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/01/8888000001/081l-LLDQkO9VYlND_08zg.flv",
"mediaTyp": "av"
},
{
"reqId": "c4hoqAfTSqmedU8_RH9c_g",
"reqTm": "2022-07-20T22:57:29+08:00",
"simNo": "8888000001",
"chan": 4,
"live": true,
"path": "2022/07/20/01/8888000001/c4hoqAfTSqmedU8_RH9c_g.flv",
"ext": "flv",
"sz": 83064,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/01/8888000001/c4hoqAfTSqmedU8_RH9c_g.flv",
"mediaTyp": "av"
},
{
"reqId": "SG9X5h6LTUmGhwyK1jSFCA",
"reqTm": "2022-07-20T22:57:29+08:00",
"simNo": "8888000001",
"chan": 2,
"live": true,
"path": "2022/07/20/01/8888000001/SG9X5h6LTUmGhwyK1jSFCA.flv",
"ext": "flv",
"sz": 156133,
"url": "https://dev.gratour.info:18288/strm/fs/2022/07/20/01/8888000001/SG9X5h6LTUmGhwyK1jSFCA.flv",
"mediaTyp": "av"
}
],
"count": 12,
"errCode": 0,
"message": "成功。"
}

应答实体属性

属性数据类型必要说明
errCodeintY错误码。
messagestringY错误信息。
dataarray[StoredAv]返回的结果对象数组。元素为StoredAv类型,见下
countint返回的记录数

StoredAv

属性数据类型必要说明
reqIdstringY媒体所对应的打开流媒体( POST /strm/open )时返回的请求ID。
reqTmstringY打开流媒体的请求时间。格式:yyyy-mm-ddTHH:mm:ssZ
appIdstringY应用ID。
simNostringY终端识别号。
chanintY当时所请求的音视频逻辑通道号。参见JT/T 1078标准定义的车载视频逻辑通道号定义表。
livebooleanY当时请求的是否实时音视频播放。为false表示当时请求的是远程录像回放。
pathstringY文件存储的相对路径。
extstringY文件的扩展名,指出文件的封闭格式:。
szlongY文件的大小。单位:字节。
urlstringY文件的访问URL。访问此URL时,使用与API相同的鉴权机制。
mediaTypstring文件的媒体类型:
  • av: 音视频
  • a: 仅音频
  • v: 仅视频
无法识别时无此属性。