返回提交历史
Modified
docs/live/live_replay.md
+56
-50
XFEstudio/bilibili-API-collect
直播回放接口添加因警告导致的变化
77a86f7
代码差异
1 个文件
+56
-50
@@ -41,6 +41,7 @@
41
41
| archive_flag | bool | (?) | 作用尚不明确 |
42
42
| can\_edit | num | (?) | 作用尚不明确 |
43
43
| can_upload | bool | (?) | 作用尚不明确 |
44
| has_third_platform_live| bool | (?) | 作用尚不明确 |
44
45
45
46
`data.replay_info` 数组中的对象:
46
47
@@ -63,6 +64,7 @@
63
64
| cover | str | 直播封面 | |
64
65
| live_time | num | 直播时间 | 同`data.replay_info[i].start_time` |
65
66
| live_type | num | 直播类型? | 作用尚不明确 |
67
| platform | str | 直播平台 | |
66
68
67
69
`data.replay_info[i].video_info` 对象:
68
70
@@ -112,65 +114,69 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/AnchorGetRepl
112
114
"data": {
113
115
"replay_info": [
114
116
{
115
"replay_id": 10707737,
117
"replay_id": 13517082,
116
118
"live_info": {
117
"title": "摆",
119
"title": "随缘摸鱼",
118
120
"cover": "https://i0.hdslb.com/bfs/live/59fc254c1f51a962dbf69ae85e4920f2f6fb8dcd.png",
119
"live_time": 1747509268,
120
"live_type": 1
121
"live_time": 1756479520,
122
"live_type": 1,
123
"platform": "android_link"
121
124
},
122
125
"video_info": {
123
"replay_status": 2,
126
"replay_status": -8,
124
127
"estimated_time": "1970-01-01 08:00:00",
125
"duration": 1820,
128
"duration": 9350,
126
129
"alert_code": 2,
127
130
"alert_message": "录像时长远小于开播时长,请关注直播时网络状况"
128
131
},
129
132
"alarm_info": {
130
"code": 2,
131
"message": "录像生成失败,请稍后再试",
132
"cur_time": 1747557808,
133
"code": -8,
134
"message": "直播内容存在违规片段",
135
"cur_time": 1756496581,
133
136
"is_ban_publish": false
134
137
},
135
"room_id": 18992371,
136
"live_key": "609043243693510451",
137
"start_time": 1747509268,
138
"end_time": 1747511088
138
"room_id": 1899237171,
139
"live_key": "637117671085969203",
140
"start_time": 1756479520,
141
"end_time": 1756488870
139
142
},
140
143
{
141
"replay_id": 10707664,
144
"replay_id": 13487274,
142
145
"live_info": {
143
"title": "摆",
146
"title": "随缘摸鱼",
144
147
"cover": "https://i0.hdslb.com/bfs/live/59fc254c1f51a962dbf69ae85e4920f2f6fb8dcd.png",
145
"live_time": 1747508293,
146
"live_type": 1
148
"live_time": 1756385910,
149
"live_type": 1,
150
"platform": "android_link"
147
151
},
148
152
"video_info": {
149
153
"replay_status": 2,
150
154
"estimated_time": "1970-01-01 08:00:00",
151
"duration": 206,
155
"duration": 14985,
152
156
"alert_code": 2,
153
157
"alert_message": "录像时长远小于开播时长,请关注直播时网络状况"
154
158
},
155
159
"alarm_info": {
156
160
"code": 2,
157
161
"message": "录像生成失败,请稍后再试",
158
"cur_time": 1747557808,
162
"cur_time": 1756496581,
159
163
"is_ban_publish": false
160
164
},
161
"room_id": 18992371,
162
"live_key": "609041817764368179",
163
"start_time": 1747508293,
164
"end_time": 1747508499
165
"room_id": 1899237171,
166
"live_key": "636823272552664883",
167
"start_time": 1756385910,
168
"end_time": 1756400895
165
169
}
166
170
],
167
171
"pagination": {
168
172
"page": 1,
169
173
"page_size": 2,
170
"total": 29
174
"total": 16
171
175
},
172
176
"archive_flag": false,
173
"can_edit": 1
177
"can_edit": 1,
178
"can_upload": false,
179
"has_third_platform_live": false
174
180
}
175
181
}
176
182
```
@@ -470,7 +476,7 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/DeleteSliceDr
470
476
471
477
鉴权方式: Cookie中`bili_jct`的值正确并与`csrf`相同
472
478
473
未生成整场直播回放时将进行生成。
479
是否生成回放取决于回放状态,处于可生成回放状态且未生成整场直播回放时将进行生成。
474
480
475
481
**正文参数( application/x-www-form-urlencoded ):**
476
482
@@ -635,7 +641,7 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetAnchorVide
635
641
636
642
</details>
637
643
638
## 轮询回放合成状态
644
## 轮询回放状态
639
645
640
646
> https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetAnchorVideoUidRecord
641
647
@@ -770,8 +776,8 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetAnchorVide
770
776
771
777
| 字段 | 类型 | 内容 | 备注 |
772
778
| --- | --- | --- | --- |
773
| list | arr | 直播回放视频列表 | 如果该场回放没有视频流将为`null` |
774
| ban_list | null | 不可发布的回放列表? | [需要验证] |
779
| list | arr 或 null | 直播回放视频列表 | 如果该场回放没有视频流将为`null` |
780
| ban_list | null 或 arr | 不可发布的回放时间 | 如果该场回放没有不可发布的时间将为`null` |
775
781
776
782
`data.list` 数组中的对象:
777
783
@@ -782,12 +788,19 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetAnchorVide
782
788
| stream | str | 直播回放视频流 | |
783
789
| type | num | 类型? | 2:一般回放? |
784
790
791
`data.ban_list` 数组中的对象:
792
793
| 字段 | 类型 | 内容 | 备注 |
794
| --- | --- | --- | --- |
795
| start_time | num | 不可发布片段的开始时间戳 | Unix秒时间戳 |
796
| end_time | num | 不可发布片段的结束时间戳 | Unix秒时间戳 |
797
785
798
**示例:**
786
799
787
800
获取某个场次的视频流
788
801
789
802
```shell
790
curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetSliceStream?live_key=607113721045847859&start_time=1746863101&end_time=1746879299' \
803
curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetSliceStream?live_key=637117671085969203&start_time=1756479520&end_time=1756488870' \
791
804
-b 'SESSDATA=xxx'
792
805
```
793
806
@@ -802,25 +815,18 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetSliceStrea
802
815
"data": {
803
816
"list": [
804
817
{
805
"start_time": 1746863103,
806
"end_time": 1746879246,
807
"stream": "https://bvc-live.bilivideo.com/hls-record-gateway/videoPlay?biz_id=live2vod-clip&end_time=1746879246&header_name=1746863103.m4s&host_id=edge-hls-bvc-self-cn-jsyz-ct-03-59-6d854b4bd8-gnlb7&no_end=0&schema=https&sign=12f649dd540096672745d60b84f18eda&start_time=1746863103&stream_name=live_438160221_32373699&ts=1752930893&version=2",
808
"type": 2
809
},
810
{
811
"start_time": 1746879267,
812
"end_time": 1746879269,
813
"stream": "https://bvc-live.bilivideo.com/hls-record-gateway/videoPlay?biz_id=live2vod-clip&end_time=1746879269&header_name=1746863104.m4s&host_id=edge-hls-bvc-self-cn-jsyz-ct-03-59-6d854b4bd8-gnlb7&no_end=0&schema=https&sign=5c63605f1fa88561a6257b6812725b4f&start_time=1746879267&stream_name=live_438160221_32373699&ts=1752930893&version=2",
814
"type": 2
815
},
816
{
817
"start_time": 1746879269,
818
"end_time": 1746879298,
819
"stream": "https://bvc-live.bilivideo.com/hls-record-gateway/videoPlay?biz_id=live2vod-clip&end_time=1746879298&header_name=1746863105.m4s&host_id=edge-hls-bvc-self-cn-jsyz-ct-03-59-6d854b4bd8-gnlb7&no_end=0&schema=https&sign=70929627354f4380b54b97fcdb69c8a2&start_time=1746879269&stream_name=live_438160221_32373699&ts=1752930893&version=2",
818
"start_time": 1756479528,
819
"end_time": 1756488870,
820
"stream": "https://bvc-live.bilivideo.com/hls-record-gateway/videoPlay?none=为了防止信息泄露,不提供完整链接。目前该视频流可以获取违规片段的视频。",
820
821
"type": 2
821
822
}
822
823
],
823
"ban_list": null
824
"ban_list": [
825
{
826
"start_time": 1756487070,
827
"end_time": 1756488870
828
}
829
]
824
830
}
825
831
}
826
832
```
@@ -840,8 +846,8 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/GetSliceStrea
840
846
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
841
847
| ----- | --- | ---- | ----- | --- |
842
848
| live_key | str | 标记直播场次的key | 必要 | |
843
| start_tm | str | 开始时间 | 必要 | 格式为`yyyy-mm-dd+HH:MM:SS`,时区为`UTC+08:00`(中国标准时间);取值对实际无影响 |
844
| end_tm | str | 开始时间 | 必要 | 格式为`yyyy-mm-dd+HH:MM:SS`,时区为`UTC+08:00`(中国标准时间);取值对实际无影响 |
849
| start_tm | str | 开始时间 | 必要 | 格式为`yyyy-mm-dd HH:MM:SS`,时区为`UTC+08:00`(中国标准时间);取值对实际无影响 |
850
| end_tm | str | 开始时间 | 必要 | 格式为`yyyy-mm-dd HH:MM:SS`,时区为`UTC+08:00`(中国标准时间);取值对实际无影响 |
845
851
| web_location | str | (?) | |
846
852
847
853
**json回复:**
@@ -1342,7 +1348,7 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/UserManualSav
1342
1348
1343
1349
| 字段 | 类型 | 内容 | 备注 |
1344
1350
| --- | --- | --- | --- |
1345
| code | num | 返回值 | -111:csrf校验失败<br />-101:未登录<br />0:成功<br />4000:时长过长<br />4001:操作太快<br />4002:片段已投稿<br />4003:请选择精彩片段再投稿哦<br />4006:标题已使用<br />4008:不被允许的视频倍速 |
1351
| code | num | 返回值 | -111:csrf校验失败<br />-101:未登录<br />0:成功<br />4000:时长过长<br />4001:操作太快<br />4002:片段已投稿<br />4003:请选择精彩片段再投稿哦<br />4006:标题已使用<br />4008:不被允许的视频倍速<br />4009:该片段存在违规内容,不允许投稿 |
1346
1352
| message | str | 错误信息 | |
1347
1353
| ttl | num | `1` | |
1348
1354
| data | obj | 信息本体 | 成功时有效 |
@@ -1397,7 +1403,7 @@ curl 'https://api.live.bilibili.com/xlive/app-blink/v1/anchorVideo/AnchorPublish
1397
1403
1398
1404
2. (可选)请求[获取回放的信息](#获取回放的信息)接口,生成合成进度页面;
1399
1405
1400
3. [轮询回放合成状态](#轮询回放合成状态),当状态变为`30`转到流程4,变为`-30`转到流程5;
1406
3. [轮询回放合成状态](#轮询回放状态),当状态变为`30`转到流程4,变为`-30`转到流程5;
1401
1407
1402
1408
4. 再次[请求整场直播回放下载链接](#请求整场直播回放下载链接),获取下载链接并下载。
1403
1409