From fd1859779030e05c427fdac802ac38c658614c62 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 18:52:40 +0800 Subject: [PATCH 01/47] Update README.md --- Agora-LinuxServer-Recording/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Agora-LinuxServer-Recording/README.md b/Agora-LinuxServer-Recording/README.md index 638667e..9bf8414 100644 --- a/Agora-LinuxServer-Recording/README.md +++ b/Agora-LinuxServer-Recording/README.md @@ -1,6 +1,6 @@ # Agora Linux Server Recording -*Read this in other languages: [中文](README.zh.md)* +*Read this in other languages: [中文](README_zh.md)* This sample application for the Agora Recording SDK enables recording on your Linux server. @@ -97,10 +97,10 @@ cmds ./Record_local ``` ## Resources -- A detailed code walkthrough for this sample is available in [Steps to Create this Sample](./guide.md). +- A detailed code walkthrough for this sample is available in [Steps to Create this Sample](./guide.md). - See full API documentation in the [Document Center](https://docs.agora.io/en/) - [File bugs about this sample](https://github.com/AgoraIO/Basic-Recording/issues) - See [detailed Agora Linux Recording guides](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) ## License -This software is licensed under the MIT License (MIT). [View the license](LICENSE.md). \ No newline at end of file +This software is licensed under the MIT License (MIT). [View the license](LICENSE.md). From 4380439d7b17501d7d5c8b15e5e464d3d3015c46 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 18:54:51 +0800 Subject: [PATCH 02/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 4e22e55..da6d6c6 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -5,7 +5,7 @@ #详细信息请参考 [录制快速入门](https://docs.agora.io/cn/user_guide/communication/recording_qs.html) -##准备工作 +## 准备工作 请确保满足以下操作系统要求: @@ -17,14 +17,14 @@ CentOS 6.5 x64 或更高版本 #准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 -##编译运行 +## 编译运行 - 把lib下的库解压 - 进入samples 的路径下执行以下命令进行编译。 make -##运行 ./Record_local, 即可看到相关用法 +## 运行 ./Record_local, 即可看到相关用法 ## 联系我们 From f23f47f4816e86932572e18cebe115ac740b6dbb Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 18:56:00 +0800 Subject: [PATCH 03/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index da6d6c6..fe60ea6 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -8,13 +8,10 @@ ## 准备工作 请确保满足以下操作系统要求: - -Ubuntu 12.04 x64 或更高版本 -CentOS 6.5 x64 或更高版本 - -#请确保满足以下编译器要求: gcc 4.4 或更高版本。 - -#准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 +- Ubuntu 12.04 x64 或更高版本 +- CentOS 6.5 x64 或更高版本 +- 请确保满足以下编译器要求: gcc 4.4 或更高版本。 +- 准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 ## 编译运行 From dd160ab7378b5f8302b2f74b60d86ee2a0b400cb Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 18:58:43 +0800 Subject: [PATCH 04/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index fe60ea6..6daf6ad 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -3,7 +3,7 @@ *Read this in other languages: [English](README.md)* -#详细信息请参考 [录制快速入门](https://docs.agora.io/cn/user_guide/communication/recording_qs.html) +#详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) ## 准备工作 From 0484da547533dfb78ea521b838e4ab681ecc3a0b Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 19:54:46 +0800 Subject: [PATCH 05/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 6daf6ad..ca3088f 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -10,8 +10,12 @@ 请确保满足以下操作系统要求: - Ubuntu 12.04 x64 或更高版本 - CentOS 6.5 x64 或更高版本 -- 请确保满足以下编译器要求: gcc 4.4 或更高版本。 +- gcc 4.4 或更高版本。 +- 与公网互通,并能够访问qos.agoralab.co + +## 快速开始 - 准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 +- ## 编译运行 From 1a82b25481333081605a80e91db55b4cb6b7c3c7 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 19:57:53 +0800 Subject: [PATCH 06/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index ca3088f..bd0102a 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -14,9 +14,11 @@ - 与公网互通,并能够访问qos.agoralab.co ## 快速开始 -- 准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 +- [创建Agora账号并获取App ID](#创建Agora账号并获取App ID) - +## 创建Agora账号并获取App ID +准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 ## 编译运行 From 118ec824270c0e69c55b53e16825517e9e0834f1 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 19:58:40 +0800 Subject: [PATCH 07/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index bd0102a..9fbe47d 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -17,7 +17,7 @@ - [创建Agora账号并获取App ID](#创建Agora账号并获取App ID) - -## 创建Agora账号并获取App ID +### 创建Agora账号并获取App ID 准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 ## 编译运行 From 2c71ef308285ca04421c43c8ec612a694416a07b Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:00:31 +0800 Subject: [PATCH 08/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 9fbe47d..59f2b80 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -14,7 +14,7 @@ - 与公网互通,并能够访问qos.agoralab.co ## 快速开始 -- [创建Agora账号并获取App ID](#创建Agora账号并获取App ID) +- [创建Agora账号并获取App ID](#) - ### 创建Agora账号并获取App ID From 78697f40e82a0bae53cc0578ca682f905678366d Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:01:19 +0800 Subject: [PATCH 09/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 59f2b80..eb3f74b 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -14,7 +14,7 @@ - 与公网互通,并能够访问qos.agoralab.co ## 快速开始 -- [创建Agora账号并获取App ID](#) +- [创建Agora账号并获取App ID](###) - ### 创建Agora账号并获取App ID From a55149b2dde095f018dc8eb6bfdeffaaed892017 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:08:11 +0800 Subject: [PATCH 10/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index eb3f74b..d9fa928 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -18,7 +18,9 @@ - ### 创建Agora账号并获取App ID -准备一个 App ID,在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 AppID。 +1.在[声网开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 +2.在[我的主页]->[项目管理]创建自己的项目,获取到 AppID +3.该AppID用于运行sample应用和个人项目管理 ## 编译运行 From 07fb960d035f28e61c974b77660b85bf218e0ea5 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:09:02 +0800 Subject: [PATCH 11/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index d9fa928..c592917 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -18,9 +18,9 @@ - ### 创建Agora账号并获取App ID -1.在[声网开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 -2.在[我的主页]->[项目管理]创建自己的项目,获取到 AppID -3.该AppID用于运行sample应用和个人项目管理 +- 在[Agora开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 +- 在[我的主页]->[项目管理]创建自己的项目,获取到 AppID +- 该AppID用于运行Agora应用程序 ## 编译运行 From 6781da0031d895fff31c103cb83d64a27dffd28f Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:11:38 +0800 Subject: [PATCH 12/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index c592917..59c1369 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -21,6 +21,7 @@ - 在[Agora开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 - 在[我的主页]->[项目管理]创建自己的项目,获取到 AppID - 该AppID用于运行Agora应用程序 + **Note:** 该AppID请妥善保存,请勿外泄。 ## 编译运行 From 22158ec24335b9603e46755e397fee56099aa268 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:12:09 +0800 Subject: [PATCH 13/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 59c1369..ba3b6d5 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -21,6 +21,7 @@ - 在[Agora开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 - 在[我的主页]->[项目管理]创建自己的项目,获取到 AppID - 该AppID用于运行Agora应用程序 + **Note:** 该AppID请妥善保存,请勿外泄。 ## 编译运行 From c35d45be4ef993b88c06d55510d5238bdb3baa6f Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:26:56 +0800 Subject: [PATCH 14/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index ba3b6d5..c6d16d3 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -15,16 +15,29 @@ ## 快速开始 - [创建Agora账号并获取App ID](###) -- +- [下载Agora Recording SDK](###) +- [编译运行].(###) ### 创建Agora账号并获取App ID - 在[Agora开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 - 在[我的主页]->[项目管理]创建自己的项目,获取到 AppID - 该AppID用于运行Agora应用程序 - **Note:** 该AppID请妥善保存,请勿外泄。 - -## 编译运行 + **Note:** 该AppID用于运行你的Agora项目,请妥善保存,勿外泄。 + +### 下载Agora Recording SDK +- 下载[录制SDK](https://docs.agora.io/cn/Agora%20Platform/downloads) +- 解压下载的SDK包 +- 将解压后的文件/文件夹拷贝到相应的项目应用中 +SDK 路径|Sample 路径 + ----|---- + `bin/AgoraCoreService` 文件|拷贝到`bin` 文件夹 + `libs/librecorder.a` 文件|拷贝到 `libs` 文件夹 + `samples/agorasdk` 文件夹|拷贝到 `samples` 文件夹 + `samples/cpp` 文件夹|拷贝到 `samples` 文件夹 + `samples/java` 文件夹| 拷贝到 `samples` 文件夹 + +### 编译运行 - 把lib下的库解压 - 进入samples 的路径下执行以下命令进行编译。 From 8a61fbda0bd50084712e326e8b1b407bbf7034dd Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:27:29 +0800 Subject: [PATCH 15/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index c6d16d3..37b5e42 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -28,7 +28,8 @@ ### 下载Agora Recording SDK - 下载[录制SDK](https://docs.agora.io/cn/Agora%20Platform/downloads) - 解压下载的SDK包 -- 将解压后的文件/文件夹拷贝到相应的项目应用中 +- 将解压后的文件/文件夹拷贝到相应的项目应用中: + SDK 路径|Sample 路径 ----|---- `bin/AgoraCoreService` 文件|拷贝到`bin` 文件夹 From 39b80b182a9f2789713e1833646e55fcda25b70d Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:28:50 +0800 Subject: [PATCH 16/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 37b5e42..4113ea7 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -30,7 +30,7 @@ - 解压下载的SDK包 - 将解压后的文件/文件夹拷贝到相应的项目应用中: -SDK 路径|Sample 路径 + SDK 路径|Sample 路径 ----|---- `bin/AgoraCoreService` 文件|拷贝到`bin` 文件夹 `libs/librecorder.a` 文件|拷贝到 `libs` 文件夹 From 095af54c9d0b243139e58bc34db6315812fe4d6a Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 20:50:47 +0800 Subject: [PATCH 17/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 4113ea7..39a6d47 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -37,6 +37,12 @@ `samples/agorasdk` 文件夹|拷贝到 `samples` 文件夹 `samples/cpp` 文件夹|拷贝到 `samples` 文件夹 `samples/java` 文件夹| 拷贝到 `samples` 文件夹 + +- 将下面项目中下面的文件替换成下载的SDK包里的文件 + - `include` 文件夹 + - `tools` 文件夹 + - `base` 文件夹 + - 将`libs`文件夹内的`libRecordEngine.tar.gz`解压 ### 编译运行 From 5a072a02aefffba3afb028bf1527b5964c74b5f5 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 21:08:22 +0800 Subject: [PATCH 18/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 39a6d47..d1ed2b1 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -46,6 +46,22 @@ ### 编译运行 +1. 确保以下的UDP端口是打开的(这些端口用来与Agora服务器之间通信) + - 4001 + - 4030 + - 1080 + - 8000 + - 25000 + + 2. 确保本地端口没有被防火墙禁掉。如果打开了防火墙,可单独放开以下端口范围(端口是可变的,确保与录制API接口设置的对应) + + Port type|Setting + ----|---- + Receiving port|4000 - 41000 + Low UDP Port|40000 + High UDP Port|41000 + + - 把lib下的库解压 - 进入samples 的路径下执行以下命令进行编译。 From 535f9ba8328589ea0709404c645615614cb31360 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 21:20:24 +0800 Subject: [PATCH 19/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index d1ed2b1..cbaf0e2 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -53,21 +53,26 @@ - 8000 - 25000 - 2. 确保本地端口没有被防火墙禁掉。如果打开了防火墙,可单独放开以下端口范围(端口是可变的,确保与录制API接口设置的对应) - - Port type|Setting + 2. 确保本地端口没有被防火墙禁掉。如果打开了防火墙,可打开Agora设定的端口范围。你可以为多个录制进程统一配置较大的端口范围(Agora 建议 40000 ~ 41000 或更大)。此时,录制 SDK 会在指定范围内为每个录制进程分配端口,并避免端口的冲突。要设置端口范围,你需要配置参数 lowUdpPort 和highUdpPort。 + + 端口类型|范围 ----|---- - Receiving port|4000 - 41000 + 接收码流端口|40000 - 41000 Low UDP Port|40000 High UDP Port|41000 +3. 进入`samples/cpp`目录下,执行以下命令进行编译,编译成功后你讲看到`record_local`可执行程序 + `make` + +4. 运行`./record_local`,即可看到相关用法,填上相应的参数即可进行录制 -- 把lib下的库解压 -- 进入samples 的路径下执行以下命令进行编译。 + ``` + ./recorder_local --appId APPID --uid 0 --channel mychannel --appliteDir PATH-TO-PROJECT/bin/AgoraCoreService + ``` -make +## 快速通道 -## 运行 ./Record_local, 即可看到相关用法 +解压下载的录制SDK后,进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 ## 联系我们 From 4eaeacf6f6f199125b9dc832462b6864907e2184 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Thu, 9 May 2019 21:21:32 +0800 Subject: [PATCH 20/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index cbaf0e2..8e8ed20 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -14,9 +14,6 @@ - 与公网互通,并能够访问qos.agoralab.co ## 快速开始 -- [创建Agora账号并获取App ID](###) -- [下载Agora Recording SDK](###) -- [编译运行].(###) ### 创建Agora账号并获取App ID - 在[Agora开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 @@ -65,8 +62,7 @@ `make` 4. 运行`./record_local`,即可看到相关用法,填上相应的参数即可进行录制 - - ``` + ``` ./recorder_local --appId APPID --uid 0 --channel mychannel --appliteDir PATH-TO-PROJECT/bin/AgoraCoreService ``` From 55cfb09f769a45dadbde74885b3b34e2940c5961 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:12:21 +0800 Subject: [PATCH 21/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 8e8ed20..20f2906 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -68,7 +68,9 @@ ## 快速通道 -解压下载的录制SDK后,进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 +解压下载的录制SDK +- C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 +- Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 ## 联系我们 From 4480da785191abfe4799f11e275bfe81a67b7fe9 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:13:24 +0800 Subject: [PATCH 22/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 20f2906..1f1cc41 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -3,8 +3,6 @@ *Read this in other languages: [English](README.md)* -#详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) - ## 准备工作 请确保满足以下操作系统要求: @@ -70,7 +68,9 @@ 解压下载的录制SDK - C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 -- Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 +- Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 + +#详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) ## 联系我们 From c4afc80a64c3b92b359d0f2aa229c14d997b9c7f Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:13:42 +0800 Subject: [PATCH 23/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 1f1cc41..e20d458 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -70,7 +70,7 @@ - C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 - Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 -#详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) +# 详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) ## 联系我们 From 2f3ccef4567539b77598b7748e5e2a6988b3e7b5 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:14:00 +0800 Subject: [PATCH 24/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index e20d458..837ccc9 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -70,7 +70,7 @@ - C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 - Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 -# 详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) +## 详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) ## 联系我们 From b8a8d1c6ede942dad47019a39499f9a7ee482a7d Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:14:46 +0800 Subject: [PATCH 25/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 837ccc9..3d58b80 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -70,7 +70,7 @@ - C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 - Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 -## 详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) +### 详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) ## 联系我们 From 1fc41124470364a31d4d2f81214704797fa13abb Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:17:37 +0800 Subject: [PATCH 26/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 3d58b80..58805e9 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -48,7 +48,7 @@ - 8000 - 25000 - 2. 确保本地端口没有被防火墙禁掉。如果打开了防火墙,可打开Agora设定的端口范围。你可以为多个录制进程统一配置较大的端口范围(Agora 建议 40000 ~ 41000 或更大)。此时,录制 SDK 会在指定范围内为每个录制进程分配端口,并避免端口的冲突。要设置端口范围,你需要配置参数 lowUdpPort 和highUdpPort。 + 2. 确保本地端口没有被防火墙禁掉。如果启用了防火墙,则需要放开Agora录制SDK设定的端口范围。你可以为多个录制进程统一配置较大的端口范围(Agora 建议 40000 ~ 41000 或更大)。此时,录制 SDK 会在指定范围内分配录制端口。设置端口范围,你需要配置参数 lowUdpPort 和highUdpPort。 端口类型|范围 ----|---- From 5f43257435dc107620a887789992d0669d782385 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:18:53 +0800 Subject: [PATCH 27/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 58805e9..7d8e471 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -15,7 +15,7 @@ ### 创建Agora账号并获取App ID - 在[Agora开发者中心](https://dashboard.agora.io/cn/signup/) 注册账号 -- 在[我的主页]->[项目管理]创建自己的项目,获取到 AppID +- 在[我的主页]-->[项目管理]创建自己的项目,获取到 AppID - 该AppID用于运行Agora应用程序 **Note:** 该AppID用于运行你的Agora项目,请妥善保存,勿外泄。 From b8880e99176094a8dee083347eedff221d844c10 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 10:19:45 +0800 Subject: [PATCH 28/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 7d8e471..81fced2 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -9,7 +9,7 @@ - Ubuntu 12.04 x64 或更高版本 - CentOS 6.5 x64 或更高版本 - gcc 4.4 或更高版本。 -- 与公网互通,并能够访问qos.agoralab.co +- 与公网互通,并能够访问`qos.agoralab.co` ## 快速开始 From b5d8f0a2eafad7395cd8029eba329ae2a0447563 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 11:48:41 +0800 Subject: [PATCH 29/47] Update README.md --- Agora-LinuxServer-Recording/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-LinuxServer-Recording/README.md b/Agora-LinuxServer-Recording/README.md index 9bf8414..1330048 100644 --- a/Agora-LinuxServer-Recording/README.md +++ b/Agora-LinuxServer-Recording/README.md @@ -100,7 +100,7 @@ cmds ./Record_local - A detailed code walkthrough for this sample is available in [Steps to Create this Sample](./guide.md). - See full API documentation in the [Document Center](https://docs.agora.io/en/) - [File bugs about this sample](https://github.com/AgoraIO/Basic-Recording/issues) -- See [detailed Agora Linux Recording guides](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) +- See [detailed Agora Linux Recording guides](https://docs.agora.io/en/Recording/recording_integrate_cpp?platform=CPP) ## License This software is licensed under the MIT License (MIT). [View the license](LICENSE.md). From d9a38d12326c1b6c5768159ecbd9020ca2e73936 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 11:50:46 +0800 Subject: [PATCH 30/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 81fced2..80e6d7a 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -70,10 +70,9 @@ - C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 - Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 -### 详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) - ## 联系我们 +- 详细信息请参考 [录制快速入门](https://docs.agora.io/cn/Recording/product_recording?platform=All%20Platforms) - 完整的 API 文档见 [文档中心](https://docs.agora.io/cn/) - 如果在集成中遇到问题, 你可以到 [开发者社区](https://dev.agora.io/cn/) 提问 - 如果有售前咨询问题, 可以拨打 400 632 6626,或加入官方Q群 12742516 提问 From 444df7f9b51a14b08ba6681489a1a4fa665d2346 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 21:30:48 +0800 Subject: [PATCH 31/47] Create README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 150 ++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 Agora-Restful-Recording-Nodejs/README_zh.md diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md new file mode 100644 index 0000000..311bdf2 --- /dev/null +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -0,0 +1,150 @@ +# Agora Restful Recording Nodejs + +This sample application works as a simple restful server to manage recording in an easy way. + +## Prerequisites +- Ubuntu 12.04+ x64 or CentOS 6.5+ x64 (CentOS 7+ recommended) +- GCC 4.4+ +- ARS IP (public IP) +- 1MB+ bandwidth for each simultaneous recording channel +- Server access for `qos.agoralab.co` +- NodeJS 8.9+ + + **Note:** If server access is denied, the Agora SDK may fail to transfer the required data. + +## Architecture +![Architecture](https://github.com/AgoraIO/Basic-Recording/blob/master/Agora-Restful-Recording-Nodejs/architecture.png) + +## Quick Start +### Backgound Knowledge +This project presumes you have basic ideas of how Agora Recording SDK works, if not please read [here](https://github.com/AgoraIO/Basic-Recording/tree/master/Agora-LinuxServer-Recording) carefully before start. + +### Integrate the Agora Recording SDK + +The Agora Recording SDK is not included in the repository. To make everything work, you need to do the following, + +* Download the [Agora Recording SDK for Linux](https://www.agora.io/en/download/). +* Unzip the downloaded SDK package. +* Copy the unziped folder to `record/src/sdk` folder +* Run `npm install -g node-gyp` to install addon build tool +* In terminal change to `record` folder, run `build.sh` (run `build_debug.sh` for debugging purpose), if everything goes smoothly, you should see a file named `agorasdk.node` under `record` folder. + + +## Run Recording Sample +### Quick Start +* Change to `record` folder +* Ensure `agorasdk.node` has been properly compiled based on previous steps +* Change the code in `sdkdemo.js`, replace the placeholder with the appid you registered from Agora Official Website + +``` +fs.mkdir(storageDir, {recursive: true}, err => { + //join channel + rec.joinChannel(null, "agoratest", 0, YOUR_APP_ID, storageDir); +}) +``` +* Start a Video/Audio conversation using your Agora Video SDK integration with your appid, change the channel name to `agoratest` +* Run `node sdkdemo.js`, and you should see your recording files under `output` folder + +### Layout Adjustment +The Layout is controlled via function `setMixedLayout`. +In this demo we layout user images from top-left to bottom-right. + +The demo re-layout the images when new user arrives or existing user leaves. + +``` +rec.on("userjoin", function(uid) { + //rearrange layout when user leaves + console.log(`userleave ${uid}`); + layout.regions = layout.regions.filter(function(region){ + return region.uid !== uid + }) + rec.setMixLayout(layout); +}); +``` + +``` +rec.on("userleave", function(uid) { + //rearrange layout when user leaves + console.log(`userleave ${uid}`); + //... adding user to layout + rec.setMixLayout(layout); +}); +``` + +## Run Restful Server Sample +### Quick Start +* Ensure `agorasdk.node` in `record` folder has been properly compiled based on previous steps +* Change to `server` folder +* Run `npm install` to install server dependencies +* Run `node app.js` to start the restful server + +### Predefined APIs +#### Start Recording + +- `http://localhost:3000/recorder/v1/start` + +Method: + +- POST + +Parameters: + + +|Name|Mandatory|Type|Desc| +|:---- |:---|:----- |----- | +|appid |Y |string |agora appid | +|channel |Y |string | channel name | +|key |N |string | key if certificate is enalbed for your appid | + +Sample Response: + +``` +{ + "success": true, + "sid": "ec8711fb-cd98-4411-a430-a0e8de2c6e98" +} +``` + +Response Properties: + +|Name|Type|Desc| +|:----|:----- |----- | +|success |bool |operation result | +|sid |string | sid of this operation, need this to stop recorder| + +#### Stop Recording + +- `http://localhost:3000/recorder/v1/stop` + +Method: + +- POST + +Parameters: + + +|Name|Mandatory|Type|Desc| +|:---- |:---|:----- |----- | +|sid |Y |string |sid when you start the recorder | + +Sample Response: + +``` +{ + "success": true +} +``` + +Response Properties: + +|Name|Type|Desc| +|:----|:----- |----- | +|success |bool |operation result | + +## Resources +- See full API documentation in the [Document Center](https://docs.agora.io/en/) +- [File bugs about this sample](https://github.com/AgoraIO/Basic-Recording/issues) +- See [detailed Agora Linux Recording guides](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) + +## License +This software is licensed under the MIT License (MIT). [View the license](LICENSE.md). From ff42045fc4cd6d5f97840a5c13f0c966e8da2539 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 21:33:35 +0800 Subject: [PATCH 32/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index 311bdf2..aba794c 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -1,5 +1,7 @@ # Agora Restful Recording Nodejs +*Read this in other languages: [English](README.md)* + This sample application works as a simple restful server to manage recording in an easy way. ## Prerequisites From 258920368eacf9e5547009161787706f0afb4a60 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 21:34:54 +0800 Subject: [PATCH 33/47] Update README.md --- Agora-Restful-Recording-Nodejs/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Agora-Restful-Recording-Nodejs/README.md b/Agora-Restful-Recording-Nodejs/README.md index 311bdf2..cfb19db 100644 --- a/Agora-Restful-Recording-Nodejs/README.md +++ b/Agora-Restful-Recording-Nodejs/README.md @@ -1,5 +1,7 @@ # Agora Restful Recording Nodejs +*Read this in other languages: [中文](README_zh.md)* + This sample application works as a simple restful server to manage recording in an easy way. ## Prerequisites From ddc410ddcd264f5d051e06bb8ce344d2f6d76674 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 21:56:59 +0800 Subject: [PATCH 34/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 55 ++++++++++----------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index aba794c..1b0a39c 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -2,41 +2,37 @@ *Read this in other languages: [English](README.md)* -This sample application works as a simple restful server to manage recording in an easy way. +该文档介绍如何以Restful API的形式快速实现录制。 -## Prerequisites -- Ubuntu 12.04+ x64 or CentOS 6.5+ x64 (CentOS 7+ recommended) +## 准备工作 +请确保满足以下操作系统要求: +- Ubuntu 12.04 x64 或更高版本 或者 CentOS 6.5 x64 或更高版本(推荐CentOS 7) - GCC 4.4+ -- ARS IP (public IP) -- 1MB+ bandwidth for each simultaneous recording channel -- Server access for `qos.agoralab.co` - NodeJS 8.9+ +- 与公网互通,并且能够访问`qos.agoralab.co` +- 每一个录制频道至少1MB+的带宽 - **Note:** If server access is denied, the Agora SDK may fail to transfer the required data. +## 架构 +![架构](https://github.com/AgoraIO/Basic-Recording/blob/master/Agora-Restful-Recording-Nodejs/architecture.png) -## Architecture -![Architecture](https://github.com/AgoraIO/Basic-Recording/blob/master/Agora-Restful-Recording-Nodejs/architecture.png) +## 快速开始 +### 背景知识 +该项目依赖于你已经了解了如何使用Agora录制SDK。或者再开始之前阅读[这里](https://github.com/AgoraIO/Basic-Recording/tree/master/Agora-LinuxServer-Recording) -## Quick Start -### Backgound Knowledge -This project presumes you have basic ideas of how Agora Recording SDK works, if not please read [here](https://github.com/AgoraIO/Basic-Recording/tree/master/Agora-LinuxServer-Recording) carefully before start. +### 下载 Agora 录制 SDK -### Integrate the Agora Recording SDK +* 下载[Agora 录制 SDK](https://www.agora.io/en/download/). +* 解压下载的SDK包. +* 把解压后的子文件夹拷贝到目录 `record/src/sdk` +* 运行`npm install -g node-gyp` 安装编译工具 +* 切换到目录 `record`, 运行`build.sh` (运行`build_debug.sh`可编译debug版)。如果一切运行顺利,你会在`record`目录内看到`agorasdk.node` -The Agora Recording SDK is not included in the repository. To make everything work, you need to do the following, -* Download the [Agora Recording SDK for Linux](https://www.agora.io/en/download/). -* Unzip the downloaded SDK package. -* Copy the unziped folder to `record/src/sdk` folder -* Run `npm install -g node-gyp` to install addon build tool -* In terminal change to `record` folder, run `build.sh` (run `build_debug.sh` for debugging purpose), if everything goes smoothly, you should see a file named `agorasdk.node` under `record` folder. - - -## Run Recording Sample -### Quick Start -* Change to `record` folder -* Ensure `agorasdk.node` has been properly compiled based on previous steps -* Change the code in `sdkdemo.js`, replace the placeholder with the appid you registered from Agora Official Website +## 运行录制 Sample +### 快速开始 +* 进入目录`record` +* 确保 `agorasdk.node`已经正确的编译 +* 更改目录下文件 `sdkdemo.js`, 替换里面的App ID ``` fs.mkdir(storageDir, {recursive: true}, err => { @@ -44,11 +40,10 @@ fs.mkdir(storageDir, {recursive: true}, err => { rec.joinChannel(null, "agoratest", 0, YOUR_APP_ID, storageDir); }) ``` -* Start a Video/Audio conversation using your Agora Video SDK integration with your appid, change the channel name to `agoratest` -* Run `node sdkdemo.js`, and you should see your recording files under `output` folder +* 运行 `node sdkdemo.js`, 你会看到生成的`output`文件夹。该演示Demo仅运行50秒便退出声网频道 -### Layout Adjustment -The Layout is controlled via function `setMixedLayout`. +### 调整布局 +录制的布局通过方法 `setMixedLayout`调整 In this demo we layout user images from top-left to bottom-right. The demo re-layout the images when new user arrives or existing user leaves. From ef8d279fabbc73cd82f5c24b82a96e07dff0073e Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 22:08:49 +0800 Subject: [PATCH 35/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 70 ++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index 1b0a39c..7d41eb7 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -46,7 +46,7 @@ fs.mkdir(storageDir, {recursive: true}, err => { 录制的布局通过方法 `setMixedLayout`调整 In this demo we layout user images from top-left to bottom-right. -The demo re-layout the images when new user arrives or existing user leaves. +当有用户加入频道或者频道内用户退出时都会更新布局 ``` rec.on("userjoin", function(uid) { @@ -68,32 +68,32 @@ rec.on("userleave", function(uid) { }); ``` -## Run Restful Server Sample -### Quick Start -* Ensure `agorasdk.node` in `record` folder has been properly compiled based on previous steps -* Change to `server` folder -* Run `npm install` to install server dependencies -* Run `node app.js` to start the restful server +## 运行Restful Server +### 快速开始 +* 确保 `agorasdk.node` 在 `record` 已经被正确编译 +* 切换到`server` 目录 +* 运行 `npm install`安装依赖库 +* 运行 `node app.js` -### Predefined APIs -#### Start Recording +### 预定义 APIs +#### 开始录制 - `http://localhost:3000/recorder/v1/start` -Method: +方法: - POST -Parameters: +参数: -|Name|Mandatory|Type|Desc| +|参数名|是否必须|类型|描述| |:---- |:---|:----- |----- | -|appid |Y |string |agora appid | -|channel |Y |string | channel name | -|key |N |string | key if certificate is enalbed for your appid | +|appid |是 |string |Agora AppId | +|channel |是 |string | 频道名 | +|key |否 |string |取决于你是否开启了App ID Certificate | -Sample Response: +Sample 应答: ``` { @@ -102,29 +102,29 @@ Sample Response: } ``` -Response Properties: +应答 属性: -|Name|Type|Desc| +|名称|类型|描述| |:----|:----- |----- | -|success |bool |operation result | -|sid |string | sid of this operation, need this to stop recorder| +|success |bool |执行结果 | +|sid |string | 录制sessionId,用于结束录制 | -#### Stop Recording +#### 结束录制 - `http://localhost:3000/recorder/v1/stop` -Method: +方法: - POST -Parameters: +参数: -|Name|Mandatory|Type|Desc| +|名称|是否必须|类型|描述| |:---- |:---|:----- |----- | -|sid |Y |string |sid when you start the recorder | +|sid |是 |string |开启录制时的sessionId | -Sample Response: +Sample 应答: ``` { @@ -132,16 +132,16 @@ Sample Response: } ``` -Response Properties: +应答 属性: -|Name|Type|Desc| +|名称|类型|描述| |:----|:----- |----- | -|success |bool |operation result | +|success |bool |执行结果 | -## Resources -- See full API documentation in the [Document Center](https://docs.agora.io/en/) -- [File bugs about this sample](https://github.com/AgoraIO/Basic-Recording/issues) -- See [detailed Agora Linux Recording guides](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) +## 联系我们 +- 完整的 API 文档见 [文档中心](https://docs.agora.io/en/) +- [如果在集成中遇到问题, 你可以到](https://github.com/AgoraIO/Basic-Recording/issues)[提问] +- 详情请参考 [录制快速入门](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) -## License -This software is licensed under the MIT License (MIT). [View the license](LICENSE.md). +## 证书 +This software is licensed under the MIT License (MIT). [预览证书](LICENSE.md). From 0d88fee32f4f1b5a4b3173974f8b595cc2725ac3 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 22:09:46 +0800 Subject: [PATCH 36/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index 7d41eb7..40fe02f 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -140,7 +140,7 @@ Sample 应答: ## 联系我们 - 完整的 API 文档见 [文档中心](https://docs.agora.io/en/) -- [如果在集成中遇到问题, 你可以到](https://github.com/AgoraIO/Basic-Recording/issues)[提问] +- 如果在集成中遇到问题, 你可以到[开发者社区](https://github.com/AgoraIO/Basic-Recording/issues)提问 - 详情请参考 [录制快速入门](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) ## 证书 From 50d4331f6d019e574c0dafc44c8ae9a51ffa098e Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Fri, 10 May 2019 22:10:24 +0800 Subject: [PATCH 37/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index 40fe02f..3c82ecf 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -144,4 +144,4 @@ Sample 应答: - 详情请参考 [录制快速入门](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) ## 证书 -This software is licensed under the MIT License (MIT). [预览证书](LICENSE.md). +本软件是根据麻省理工学院许可协议(MIT)授权的. [预览证书](LICENSE.md). From 3b3953927eecd45cd6d73ec5fdae24d8fd392052 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 10:36:30 +0800 Subject: [PATCH 38/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index 3c82ecf..9702c28 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -43,8 +43,7 @@ fs.mkdir(storageDir, {recursive: true}, err => { * 运行 `node sdkdemo.js`, 你会看到生成的`output`文件夹。该演示Demo仅运行50秒便退出声网频道 ### 调整布局 -录制的布局通过方法 `setMixedLayout`调整 -In this demo we layout user images from top-left to bottom-right. +录制的布局通过方法 `setMixedLayout`调整。关于布局,详情参考:[video_mixing_layout](https://docs.agora.io/cn/Recording/API%20Reference/recording_cpp/structagora_1_1linuxsdk_1_1_video_mixing_layout.html) 当有用户加入频道或者频道内用户退出时都会更新布局 From a16cbdcf0178f5c724f12dcda2ed96dae8d4b571 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 10:38:27 +0800 Subject: [PATCH 39/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index 9702c28..8c74f2c 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -92,6 +92,11 @@ rec.on("userleave", function(uid) { |channel |是 |string | 频道名 | |key |否 |string |取决于你是否开启了App ID Certificate | +参考: +``` +curl -i -X POST -H "Content-type: application/json" --data '{"appid":"XXXXX","channel":"XXXX","key":"XXXX"}' 127.0.0.1:3000/recorder/v1/start +``` + Sample 应答: ``` From 877313fbe3f4f807ec291822f65d6b94b79ee14f Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 11:48:06 +0800 Subject: [PATCH 40/47] Update README.md --- Agora-LinuxServer-Recording/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Agora-LinuxServer-Recording/README.md b/Agora-LinuxServer-Recording/README.md index 1330048..dcea249 100644 --- a/Agora-LinuxServer-Recording/README.md +++ b/Agora-LinuxServer-Recording/README.md @@ -42,6 +42,7 @@ To open and build the sample application, first integrate the Agora SDK. `bin/AgoraCoreService` file|Copy to`bin` folder `libs/librecorder.a` file|Copy to `libs` folder `samples/agorasdk` folder|Copy to `samples` folder + `samples/base` folder|Copy to `samples` folder `samples/cpp` folder|Copy to `samples` folder `samples/java` folder| Copy to `samples` folder From 20c3ce63ca263b68644fd6b7597e09ff6e638a87 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 11:53:43 +0800 Subject: [PATCH 41/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 80e6d7a..d5a41fa 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -30,6 +30,7 @@ `bin/AgoraCoreService` 文件|拷贝到`bin` 文件夹 `libs/librecorder.a` 文件|拷贝到 `libs` 文件夹 `samples/agorasdk` 文件夹|拷贝到 `samples` 文件夹 + `samples/base` 文件夹|拷贝到 `samples` 文件夹 `samples/cpp` 文件夹|拷贝到 `samples` 文件夹 `samples/java` 文件夹| 拷贝到 `samples` 文件夹 From 0aee9b85d9e0b951f50356950997f381afefd7d6 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 11:59:32 +0800 Subject: [PATCH 42/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index d5a41fa..865fc58 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -38,7 +38,6 @@ - `include` 文件夹 - `tools` 文件夹 - `base` 文件夹 - - 将`libs`文件夹内的`libRecordEngine.tar.gz`解压 ### 编译运行 @@ -66,9 +65,12 @@ ``` ## 快速通道 +* 当前sample: + - 将`libs`文件夹内的`libRecordEngine.tar.gz`解压 + - 进入`samples`,执行`make`编译,然后运行编译生成的`./Record_local`, 即可看到相关用法 -解压下载的录制SDK -- C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的` ./Record_local`, 即可看到相关用法 +* 解压下载的最新版[录制SDK](https://docs.agora.io/cn/Agora%20Platform/downloads) +- C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的`./record_local`, 即可看到相关用法 - Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 ## 联系我们 From ba68d5fdebd49a238f7a82aef4905e03e39f0c1b Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 12:00:37 +0800 Subject: [PATCH 43/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 865fc58..8fa1644 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -65,11 +65,11 @@ ``` ## 快速通道 -* 当前sample: +** 当前sample ** - 将`libs`文件夹内的`libRecordEngine.tar.gz`解压 - 进入`samples`,执行`make`编译,然后运行编译生成的`./Record_local`, 即可看到相关用法 -* 解压下载的最新版[录制SDK](https://docs.agora.io/cn/Agora%20Platform/downloads) +** 解压下载的最新版[录制SDK](https://docs.agora.io/cn/Agora%20Platform/downloads) ** - C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的`./record_local`, 即可看到相关用法 - Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 From 11269e5f8b39bff1eed8892fb5f04fd70381e7d4 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 12:01:10 +0800 Subject: [PATCH 44/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 8fa1644..44c2745 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -65,11 +65,11 @@ ``` ## 快速通道 -** 当前sample ** +**当前sample** - 将`libs`文件夹内的`libRecordEngine.tar.gz`解压 - 进入`samples`,执行`make`编译,然后运行编译生成的`./Record_local`, 即可看到相关用法 -** 解压下载的最新版[录制SDK](https://docs.agora.io/cn/Agora%20Platform/downloads) ** +**解压下载的最新版[录制SDK](https://docs.agora.io/cn/Agora%20Platform/downloads)** - C++版:进入`samples/cpp`后,执行`make`编译,然后运行编译生成的`./record_local`, 即可看到相关用法 - Java版:进入`samples/java`后,按照文件夹中的ReadMe编译,编译生成的文件在目录`samples/java/bin`中,进入该目录执行`java -Djava.library.path=io/agora/recording/ RecordingSample`,即可看到相关用法 From ea4d0a7956b0625a1425b65b9f6536cc9f6154ce Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 12:03:04 +0800 Subject: [PATCH 45/47] Update README_zh.md --- Agora-LinuxServer-Recording/README_zh.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Agora-LinuxServer-Recording/README_zh.md b/Agora-LinuxServer-Recording/README_zh.md index 44c2745..fb9d6f7 100644 --- a/Agora-LinuxServer-Recording/README_zh.md +++ b/Agora-LinuxServer-Recording/README_zh.md @@ -10,6 +10,7 @@ - CentOS 6.5 x64 或更高版本 - gcc 4.4 或更高版本。 - 与公网互通,并能够访问`qos.agoralab.co` +- 每一个录制频道至少1MB+的带宽 ## 快速开始 From 753061b042245cb9abd5318ca7ff157694d595ed Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 12:04:03 +0800 Subject: [PATCH 46/47] Update README_zh.md --- Agora-Restful-Recording-Nodejs/README_zh.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Agora-Restful-Recording-Nodejs/README_zh.md b/Agora-Restful-Recording-Nodejs/README_zh.md index 8c74f2c..38106c3 100644 --- a/Agora-Restful-Recording-Nodejs/README_zh.md +++ b/Agora-Restful-Recording-Nodejs/README_zh.md @@ -147,5 +147,3 @@ Sample 应答: - 如果在集成中遇到问题, 你可以到[开发者社区](https://github.com/AgoraIO/Basic-Recording/issues)提问 - 详情请参考 [录制快速入门](https://docs.agora.io/en/2.3.1/addons/Recording/Quickstart%20Guide/recording_cpp?platform=C%2B%2B) -## 证书 -本软件是根据麻省理工学院许可协议(MIT)授权的. [预览证书](LICENSE.md). From 2a6df0816c904196a39758b0dff3be12721e8af8 Mon Sep 17 00:00:00 2001 From: Vincent <32958008+vincent3q@users.noreply.github.com> Date: Mon, 13 May 2019 12:05:50 +0800 Subject: [PATCH 47/47] Update README.md --- Agora-Restful-Recording-Nodejs/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Agora-Restful-Recording-Nodejs/README.md b/Agora-Restful-Recording-Nodejs/README.md index cfb19db..20215c4 100644 --- a/Agora-Restful-Recording-Nodejs/README.md +++ b/Agora-Restful-Recording-Nodejs/README.md @@ -98,6 +98,11 @@ Parameters: |channel |Y |string | channel name | |key |N |string | key if certificate is enalbed for your appid | +Example: +``` +curl -i -X POST -H "Content-type: application/json" --data '{"appid":"XXXXX","channel":"XXXX","key":"XXXX"}' 127.0.0.1:3000/recorder/v1/start +``` + Sample Response: ```