m7s
  1. global
m7s
  • global
    • replay
      • replay mp4
      • replay ts
      • replay rtp
    • insert SEI
      POST
    • 热更新配置
      GET
    • 修改配置
      GET
    • 获取流详情
      GET
    • 关闭一个流
      GET
    • 停止远端推流
      GET
    • 摘要信息包括流列表
      GET
    • 所有插件信息
      GET
    • 获取远端拉流列表
      GET
    • 获取远端推流列表
      GET
  1. global

获取流详情

GET
/api/stream
最后修改时间:2023-10-31 05:45:31
获取流的详细信息,包括该流的发布者和订阅者,轨道信息

请求参数

Query 参数
streamPath
string 
需要查看的流的地址
必需
示例值:
live/test

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://localhost:8080/api/stream?streamPath=live/test'

返回响应

🟢200成功
application/json
Body
StartTime
string 
创建时间
必需
PublishTimeout
integer 
发布超时时间
必需
如果长时间收不到发布者的数据则判定为超时,关闭流
DelayCloseTimeout
integer 
延迟关闭时间
必需
非 0 情况下代表当最后一个订阅者离开后多久关闭流
IdleTimeout
integer 
空闲超时
必需
当发布者发布后超过一定时间都没有订阅的话判定超时,关闭流
PauseTimeout
integer 
暂停超时
必需
当流处于暂停状态时,超过一定时间判定超时
NeverTimeout
boolean 
永不超时
必需
不判断超时,此时流一直存在
Path
string 
流路径
必需
流的唯一标识
Publisher
object 
发布者
必需
ID
string 
必需
Type
string 
类型
必需
通常指示某个插件
RemoteAddr
string 
必需
StartTime
string 
必需
Args
object 
必需
Config
object 
发布配置
必需
从配置文件中提取
StreamID
integer 
必需
State
enum<integer> 
流状态
必需
枚举值:
01234
SEHistory
array [object {3}] 
状态历史
必需
Time
string 
必需
Action
integer 
操作
必需
对流的操作
From
enum<integer> 
必需
枚举值:
01234
Subscribers
array [object {6}] 
订阅者
必需
ID
string 
可选
Type
string 
类型
可选
通常指示插件类型
RemoteAddr
string 
远程地址
可选
如果订阅者是网络请求则表示远端的 ip
StartTime
string 
订阅时间
可选
Args
object 
附加参数
可选
可用于订阅指定轨道,以及鉴权等
Config
object 
订阅配置
可选
从配置文件中提取
Tracks
array [object {37}] 
轨道集合
必需
Size
integer 
必需
LastValue
object 
最新帧数据
必需
Name
string 
必需
State
integer 
必需
BPS
integer 
码率
必需
FPS
integer 
帧率
必需
Drops
integer 
丢包数
必需
RawSize
integer 
裸数据大小
必需
RawPart
array[integer]
裸数据
必需
裸数据前若干字节
PayloadType
integer 
必需
SSRC
integer 
必需
SampleRate
integer 
采样率
必需
SequenceHeadSeq
integer 
序列头序号
必需
CodecID
integer 
必需
Channels
integer 
声道数
可选
SampleSize
integer 
可选
SizeLength
integer 
可选
IndexLength
integer 
可选
IndexDeltaLength
integer 
可选
AVCCHead
string 
可选
AudioObjectType
integer 
可选
SamplingFrequencyIndex
integer 
可选
ChannelConfiguration
integer 
可选
FrameLengthFlag
integer 
可选
DependsOnCoreCoder
integer 
可选
ExtensionFlag
integer 
可选
GOP
integer 
可选
ProfileIdc
integer 
可选
LevelIdc
integer 
可选
MbWidth
integer 
可选
MbHeight
integer 
可选
CropLeft
integer 
可选
CropRight
integer 
可选
CropTop
integer 
可选
CropBottom
integer 
可选
Width
integer 
可选
Height
integer 
可选
AppName
string 
应用名
必需
为流路径的第一级
StreamName
string 
流名称
必需
为流路径的最后一级
IsPause
boolean 
必需
示例
{
  "StartTime": "2023-05-29T21:14:09.655989+08:00",
  "PublishTimeout": 10000000000,
  "DelayCloseTimeout": 0,
  "IdleTimeout": 0,
  "NeverTimeout": false,
  "Path": "live/test",
  "Publisher": {
    "ID": "",
    "Type": "PS",
    "StartTime": "2023-05-29T21:14:09.656121+08:00",
    "Args": {},
    "Config": {
      "PubAudio": true,
      "PubVideo": true,
      "KickExist": true,
      "PublishTimeout": 10000000000,
      "WaitCloseTimeout": 0,
      "DelayCloseTimeout": 0,
      "IdleTimeout": 0,
      "BufferTime": 0,
      "Key": "",
      "SecretArgName": "secret",
      "ExpireArgName": "expire"
    },
    "DisableReorder": false
  },
  "State": 1,
  "SEHistory": [
    {
      "Time": "2023-05-29T21:14:09.656214+08:00",
      "Action": 0,
      "From": 0
    }
  ],
  "Subscribers": null,
  "Tracks": [
    {
      "Name": "pcma",
      "State": 0,
      "BPS": 8284,
      "FPS": 25,
      "Drops": 0,
      "RawSize": 320,
      "RawPart": [
        215,
        215,
        212,
        212,
        215,
        212,
        212,
        212,
        212,
        212
      ],
      "Size": 52,
      "MoveCount": 51,
      "LastValue": {
        "DeltaTime": 40,
        "WriteTime": "2023-05-29T21:14:12.995338+08:00",
        "Sequence": 50,
        "BytesIn": 320,
        "IFrame": false,
        "PTS": 2856753144,
        "DTS": 2856753144,
        "Timestamp": 3435856995
      },
      "PayloadType": 8,
      "SSRC": 230656,
      "SampleRate": 8000,
      "SequenceHeadSeq": 0,
      "CodecID": 7,
      "Channels": 1,
      "SampleSize": 8,
      "SizeLength": 0,
      "IndexLength": 0,
      "IndexDeltaLength": 0,
      "AVCCHead": "cg==",
      "AudioObjectType": 0,
      "SamplingFrequencyIndex": 0,
      "ChannelConfiguration": 0,
      "FrameLengthFlag": 0,
      "DependsOnCoreCoder": 0,
      "ExtensionFlag": 0
    },
    {
      "Name": "h264",
      "State": 0,
      "BPS": 389956,
      "FPS": 25,
      "Drops": 0,
      "RawSize": 13044,
      "RawPart": [
        33,
        224,
        2,
        0,
        2,
        228,
        172,
        108,
        162,
        132
      ],
      "Size": 251,
      "MoveCount": 87,
      "LastValue": {
        "DeltaTime": 40,
        "WriteTime": "2023-05-29T21:14:12.995386+08:00",
        "Sequence": 86,
        "BytesIn": 13048,
        "IFrame": false,
        "PTS": 2858910624,
        "DTS": 2858910624,
        "Timestamp": 3471081426
      },
      "PayloadType": 96,
      "SSRC": 17152,
      "SampleRate": 90000,
      "SequenceHeadSeq": 2,
      "CodecID": 7,
      "GOP": 50,
      "ProfileIdc": 100,
      "LevelIdc": 52,
      "MbWidth": 160,
      "MbHeight": 90,
      "CropLeft": 0,
      "CropRight": 0,
      "CropTop": 0,
      "CropBottom": 0,
      "Width": 2560,
      "Height": 1440
    },
    {
      "Name": "ps",
      "State": 0,
      "BPS": 0,
      "FPS": 0,
      "Drops": 0,
      "RawSize": 0,
      "RawPart": null,
      "Size": 20,
      "MoveCount": 2129,
      "LastValue": {
        "DeltaTime": 0,
        "WriteTime": "2023-05-29T21:14:13.128297+08:00",
        "Sequence": 2128,
        "BytesIn": 0,
        "Value": {
          "Value": "AAABwAFKjIAHJakbTMX/+NfU1NTU1NTU1NTU1NTV1dXV1dXV1dXV1dXV1dXV1dVVVVVV1VXV1VXVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFRUVFRUV1dXV1dXV1dXV1dXV1dXV1dXV1dXVFRUVFRUVFRUVFRUVFRUVFVVVVVVVVVVVVVVVVVVVVVVVdVVVdXVVdXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXVVdVVVVVV1VXVVVVVVVVVVVXV1VVVVdXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1VXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1NTU1NTU1NTU1NTX"
        }
      },
      "Flag": 0,
      "Locker": null
    }
  ],
  "AppName": "live",
  "StreamName": "test"
}
上一页
修改配置
下一页
关闭一个流
Built with