关于云端录制返回206,leavecode为24的问题

第一步,请求acquire:

url:

https://api.agora.io/v1/apps/7a63cf39ae634dfe98b9cdf58a74c4f5/cloud_recording/acquire

参数

{"uid":"80000581","cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","clientRequest":{}}

第二步,请求start:

url:

https://api.agora.io/v1/apps/7a63cf39ae634dfe98b9cdf58a74c4f5/cloud_recording/resourceid/LuwKlUHkl2K1C7_oKhBHMjYHOPT7wlwTPTMMkw1LD0GpoSxnNSlstVVPxMyB-j_54p4dsgpIOK_PEfAgOaAHcrjsUXIsFdXQ9ZNuVRkRCeD2v_bFX3y8yL2hwkvrhyw7vkLgZzQbUKt4-spgeQJMET8ckEgvhY33m_l-jBcVzdpMKa-sjBrYkMjwjiLhapkH0IuDOir3kpJnMJF50wxcoFuHRBfYCG2IJSO4bj63OO5M7oxLQkuJY9mfwp5PVzO7sriQDZFLQu9mZfLSfw4BdQ/mode/mix/start

参数

{"uid":"80000581","cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","clientRequest":{"storageConfig":{"bucket":"ty-shuangshi-records","secretKey":"保密","region":6,"accessKey":"保密","vendor":2},"recordingConfig":{"channelType":0,"maxIdleTime":10,"transcodingConfig":{"width":1920,"fps":36,"bitrate":3000,"height":1080},"audioProfile":0}}}

回调

{"noticeId":"97c9d13fc44e207628ddfe9db95bf8d3","notifyMs":1572428887501,"eventType":30,"sid":"97c9d13fc44e207628ddfe9db95bf8d3","payload":{"serviceType":2,"uid":"80000581","sequence":0,"sendts":1572428887468,"cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","details":{"status":0,"msgName":"uploader_started"},"sid":"1dc1bcd054496a01f76717946b713a52"},"productId":3}

第三步,调用stop

url:

https://api.agora.io/v1/apps/7a63cf39ae634dfe98b9cdf58a74c4f5/cloud_recording/resourceid/LuwKlUHkl2K1C7_oKhBHMjYHOPT7wlwTPTMMkw1LD0GpoSxnNSlstVVPxMyB-j_54p4dsgpIOK_PEfAgOaAHcrjsUXIsFdXQ9ZNuVRkRCeD2v_bFX3y8yL2hwkvrhyw7vkLgZzQbUKt4-spgeQJMET8ckEgvhY33m_l-jBcVzdpMKa-sjBrYkMjwjiLhapkH0IuDOir3kpJnMJF50wxcoFuHRBfYCG2IJSO4bj63OO5M7oxLQkuJY9mfwp5PVzO7sriQDZFLQu9mZfLSfw4BdQ/sid/1dc1bcd054496a01f76717946b713a52/mode/mix/stop

参数:

{"uid":"80000581","cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","clientRequest":{}}

返回结果

HttpResponseProxy{HTTP/1.1 206 0 [Content-Type: application/json, Content-Length: 412, Connection: keep-alive, Accept-Ranges: bytes, Access-Control-Allow-Origin: *, X-RateLimit-Remaining-second: 9, X-RateLimit-Limit-second: 10, X-Request-ID: d27d6b2e-11e3-4cd4-91dc-270672b6da0b, X-Kong-Upstream-Latency: 92, X-Kong-Proxy-Latency: 1, Via: kong/1.2.1] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 412,Chunked: false]}}

回调

{"noticeId":"8be3321cea4bc04075e8db918d219315","notifyMs":1572428944365,"eventType":41,"sid":"8be3321cea4bc04075e8db918d219315","payload":{"serviceType":1,"uid":"80000581","sequence":2,"sendts":1572428944345,"cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","details":{"msgName":"recorder_leave","leaveCode":24},"sid":"1dc1bcd054496a01f76717946b713a52"},"productId":3}

OSS上没有文件

“leaveCode”:24如何换算:cold_face:

{ "noticeId": "f0fd5ca0e140335cc00d2a8fb96f1c0e", "notifyMs": 1572431069058, "eventType": 33, "sid": "f0fd5ca0e140335cc00d2a8fb96f1c0e", "payload": { "serviceType": 2, "uid": "80000581", "sequence": 1, "sendts": 1572431069047, "cname": "f3925d16-ca26-433d-b9ae-3a2e8a49e11d", "details": { "msgName": "uploading_progress", "progress": 0 }, "sid": "dfde2c5dfc46841197ad8ebbb6362c7f" }, "productId": 3 }

每分钟的上传回调,progress总是0

你在 start 时是没有传入 token 吗?从后台看到你是有启用 app 证书的哦

此外,频道内已经有一个 web 端用户的 uid 是 80000581 了,那么云录制端用户的 uid 则不能再是 80000581 了,需要保证频道内 uid 的唯一性。

@Zhhhhh 非常感谢您的提醒,修改了一下
1、更改为单流模式
2、加入Token
3、修改了录制UID
4、修改了start传入的一些参数
但依然没有文件传上来,以下是日志

Step 1

url

https://api.agora.io/v1/apps/7a63cf39ae634dfe98b9cdf58a74c4f5/cloud_recording/acquire

param

{"uid":"581","cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","clientRequest":{}}

Step2

url(此处修改为单流模式)

https://api.agora.io/v1/apps/7a63cf39ae634dfe98b9cdf58a74c4f5/cloud_recording/resourceid/LuwKlUHkl2K1C7_oKhBHMjYHOPT7wlwTPTMMkw1LD0GpoSxnNSlstVVPxMyB-j_54p4dsgpIOK_PEfAgOaAHcrjsUXIsFdXQ9ZNuVRkRCeD2v_bFX3y8yL2hwkvrhyw7c_d73h6E8tyHD10T_G2nh0jIbVYiArD4lkU4qdpOdsCe2o_QJyVdQaAiwLmn7JKVne0eiaZ6Xthv-xnP269rqOqY3UEzxAly8_Eh88qsjq7eNr-9DSviYuM2pR6NWl4R5-_bVZRGK_rg500GF6tnIw/mode/individual/start

param

{"uid":"581","cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","clientRequest":{"storageConfig":{"bucket":"ty-shuangshi-records","secretKey":"保密","region":6,"accessKey":"保密","vendor":2},"recordingConfig":{"streamTypes":2,"subscribeAudioUids":["80000581"],"channelType":1,"maxIdleTime":10,"subscribeVideoUids":["80000581"],"subscribeUidGroup":0},"token":"0067a63cf39ae634dfe98b9cdf58a74c4f5IAD5hcKxkvdjUMjjpX6kCJwlww5C0Ha0Xa55EEzTj6DkOb9gP+SoQqCbCgAE5zVuk8q7XQAA"}}

callback1

{"noticeId":"2e1796b5fe47b29fdb4853a60e4a00e3","notifyMs":1572501779763,"eventType":30,"sid":"2e1796b5fe47b29fdb4853a60e4a00e3","payload":{"serviceType":2,"uid":"581","sequence":0,"sendts":1572501779696,"cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","details":{"status":0,"msgName":"uploader_started"},"sid":"8f7a3b31fa481d7dd3fb8da33ed70cc1"},"productId":3}

callback2

{"noticeId":"71c37c15e04235f43da3b0814e15cad1","notifyMs":1572501779892,"eventType":40,"sid":"71c37c15e04235f43da3b0814e15cad1","payload":{"serviceType":1,"uid":"581","sequence":1,"sendts":1572501779821,"cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","details":{"status":0,"msgName":"recorder_started"},"sid":"8f7a3b31fa481d7dd3fb8da33ed70cc1"},"productId":3}

callback3

{"noticeId":"c777fc85374f68f74318ebb3e34bc55f","notifyMs":1572501911047,"eventType":33,"sid":"c777fc85374f68f74318ebb3e34bc55f","payload":{"serviceType":2,"uid":"581","sequence":4,"sendts":1572501910973,"cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","details":{"msgName":"uploading_progress","progress":0},"sid":"8f7a3b31fa481d7dd3fb8da33ed70cc1"},"productId":3}

callback4

{"noticeId":"083ca7bd1949e6ac7cfd379f59c913f3","notifyMs":1572502031074,"eventType":33,"sid":"083ca7bd1949e6ac7cfd379f59c913f3","payload":{"serviceType":2,"uid":"581","sequence":6,"sendts":1572502030976,"cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","details":{"msgName":"uploading_progress","progress":0},"sid":"8f7a3b31fa481d7dd3fb8da33ed70cc1"},"productId":3}

step3

url

https://api.agora.io/v1/apps/7a63cf39ae634dfe98b9cdf58a74c4f5/cloud_recording/resourceid/LuwKlUHkl2K1C7_oKhBHMjYHOPT7wlwTPTMMkw1LD0GpoSxnNSlstVVPxMyB-j_54p4dsgpIOK_PEfAgOaAHcrjsUXIsFdXQ9ZNuVRkRCeD2v_bFX3y8yL2hwkvrhyw7c_d73h6E8tyHD10T_G2nh0jIbVYiArD4lkU4qdpOdsCe2o_QJyVdQaAiwLmn7JKVne0eiaZ6Xthv-xnP269rqOqY3UEzxAly8_Eh88qsjq7eNr-9DSviYuM2pR6NWl4R5-_bVZRGK_rg500GF6tnIw/sid/8f7a3b31fa481d7dd3fb8da33ed70cc1/mode/individual/stop

param

{"uid":"581","cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","clientRequest":{}}

httpresponse

HttpResponseProxy{HTTP/1.1 206 0 [Content-Type: application/json, Content-Length: 412, Connection: keep-alive, Accept-Ranges: bytes, Access-Control-Allow-Origin: *, X-RateLimit-Remaining-second: 9, X-RateLimit-Limit-second: 10, X-Request-ID: c956a66a-1911-4f65-8c4f-0d83df72f778, X-Kong-Upstream-Latency: 12, X-Kong-Proxy-Latency: 7, Via: kong/1.2.1] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 412,Chunked: false]}}

callback

{"noticeId":"d1091af3e74cf8a51806cf901c62b5c0","notifyMs":1572502184274,"eventType":41,"sid":"d1091af3e74cf8a51806cf901c62b5c0","payload":{"serviceType":1,"uid":"581","sequence":9,"sendts":1572502184173,"cname":"f3925d16-ca26-433d-b9ae-3a2e8a49e11d","details":{"msgName":"recorder_leave","leaveCode":24},"sid":"8f7a3b31fa481d7dd3fb8da33ed70cc1"},"productId":3}

稍等,我查一下


你 web 端用的是 string 型的 uid 对吗?我们云录制还不支持 string uid。麻烦请将 web 端的 uid 替换为 int 型的。

收到,确实如此,我试一下:laughing:感谢

不客气。有问题随时联系。

试了Safari,VLC,都无法正常播放这两个文件:rofl:
视频文件
音频文件

单流模式下,Web 端选择 VP8 编码时,云端录制生成的切片文件为 WebM 文件。其他情况下生成的切片文件均为 TS 文件。此时必须转码后才能播放:
https://docs.agora.io/cn/cloud-recording/cloud_recording_merge_files?platform=All%20Platforms

好滴,尝试转码中