关于录制的问题

  1. 本地服务器录制和云端录制是不是都相当于在频道中加入一个客户端,然后与每个推流端建立一条链接进行录制?

  2. 云端录制文档中有一句话

    同 Agora 本地服务端录制相比,Agora 云端录制无需部署 Linux 服务器,减轻了研发和运维的压力,更轻量便捷。

    这句话是什么意思?云端录制API是要集成在哪里?云服务是需要自行购买还是由声网代理购买?

  3. 本地服务器录制错误,根据Basic-Recording/On-Premise-Recording-Nodejs文档build出agorasdk.node后,开始录制报错。

    setting mix layout…
    joinChannel…
    appliteDir /…/record/src/sdk/bin/
    Segmentation fault

  4. 本地服务录制/云端录制在一个频道上有多个主播的时候,是合并到一个视频流里?能不能分开一个个文件?

1、对,可以这么理解,相当于一个哑客户端加入频道。

2、集成在你自己的 java 项目里啊,第三方云存储服务需要你自行购买。
ps:请确保满足以下要求:

  • 打开 TCP 端口:4447、8913、9700。
  • 打开 UDP 端口:53、4444。
  • 运行环境(物理或虚拟):
    • Ubuntu Linux 14.04+ LTS 64 位
    • CentOS 6.5+(推荐 7.0)64 位
  • 安装 Java 环境,建议安装 OpenJDK 1.6 或以上版本。
  • 联系 sales@agora.io 开通云端录制服务。
  • 开通第三方云存储服务,目前支持七牛云、阿里云(推荐)和 Amazon S3。

3、是部署在了 Linux 环境下吗?有没有完整的log文件?我们更建议使用官网 java 版或 C++ 版的录制 SDK。

4、可以通过参数配置来选择单流或合流模式的,具体请参考:
https://docs.agora.io/cn/Recording/recording_voice_video?platform=All%20Platforms#录制文件

3、是部署在了 Linux 环境下吗?有没有完整的log文件?

centos 6.5demo上好像没日志,build出来的agorasdk.node的日志不知道在哪里。

4、可以通过参数配置来选择单流或合流模式的

云端录制也可以吗,我在本地录制API的RecordingConfig里面找到isMixingEnabled,但是在云端录制RecordingConfig里面没找到

3、build 编译报错,没有具体的报错码吗?
4、不好意思云录制目前不支持单流录制模式,只能对频道内所有用户的音视频进行合流录制。

3、build 编译报错,没有具体的报错码吗?

有很多warning但是没有error,应该是成功的。

[root@sz-local-vm185 src]# node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@4.0.0
gyp info using node@10.13.0 | linux | x64
gyp info spawn make
gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
make: Entering directory /opt/agora/On-Premise-Recording-Nodejs/record/src/build' CXX(target) Release/obj.target/agorasdk/agora_node_ext/AgoraSdk.o In file included from ../agora_node_ext/node_async_queue.h:24:0, from ../agora_node_ext/AgoraSdk.cpp:12: ../agora_node_ext/node_log.h:37:0: warning: "LOG_WARNING" redefined [enabled by default] #define LOG_WARNING(format, ...) log(LOG_LEVEL_WARNING, format, ##__VA_ARGS__) ^ In file included from /usr/include/syslog.h:1:0, from ../sdk/include/base/log.h:12, from ../agora_node_ext/AgoraSdk.h:14, from ../agora_node_ext/AgoraSdk.cpp:11: /usr/include/sys/syslog.h:55:0: note: this is the location of the previous definition #define LOG_WARNING 4 /* warning conditions */ ^ In file included from ../agora_node_ext/node_async_queue.h:24:0, from ../agora_node_ext/AgoraSdk.cpp:12: ../agora_node_ext/node_log.h:42:0: warning: "LOG_INFO" redefined [enabled by default] #define LOG_INFO(format, ...) log(LOG_LEVEL_INFO, format, ##__VA_ARGS__) ^ In file included from /usr/include/syslog.h:1:0, from ../sdk/include/base/log.h:12, from ../agora_node_ext/AgoraSdk.h:14, from ../agora_node_ext/AgoraSdk.cpp:11: /usr/include/sys/syslog.h:57:0: note: this is the location of the previous definition #define LOG_INFO 6 /* informational */ ^ In file included from ../agora_node_ext/AgoraSdk.cpp:10:0: ../sdk/include/IAgoraRecordingEngine.h: In constructor ‘agora::recording::RecordingConfig::RecordingConfig()’: ../sdk/include/IAgoraRecordingEngine.h:288:43: warning: ‘agora::recording::RecordingConfig::channelProfile’ will be initialized after [-Wreorder] agora::linuxsdk::CHANNEL_PROFILE_TYPE channelProfile; ^ ../sdk/include/IAgoraRecordingEngine.h:168:10: warning: ‘bool agora::recording::RecordingConfig::isAudioOnly’ [-Wreorder] bool isAudioOnly; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:275:9: warning: ‘agora::recording::RecordingConfig::idleLimitSec’ will be initialized after [-Wreorder] int idleLimitSec; ^ ../sdk/include/IAgoraRecordingEngine.h:241:12: warning: ‘char* agora::recording::RecordingConfig::appliteDir’ [-Wreorder] char * appliteDir; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:280:9: warning: ‘agora::recording::RecordingConfig::captureInterval’ will be initialized after [-Wreorder] int captureInterval; ^ ../sdk/include/IAgoraRecordingEngine.h:260:40: warning: ‘agora::linuxsdk::AUDIO_FORMAT_TYPE agora::recording::RecordingConfig::decodeAudio’ [-Wreorder] agora::linuxsdk::AUDIO_FORMAT_TYPE decodeAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:260:40: warning: ‘agora::recording::RecordingConfig::decodeAudio’ will be initialized after [-Wreorder] agora::linuxsdk::AUDIO_FORMAT_TYPE decodeAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:254:40: warning: ‘agora::linuxsdk::VIDEO_FORMAT_TYPE agora::recording::RecordingConfig::decodeVideo’ [-Wreorder] agora::linuxsdk::VIDEO_FORMAT_TYPE decodeVideo; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:254:40: warning: ‘agora::recording::RecordingConfig::decodeVideo’ will be initialized after [-Wreorder] agora::linuxsdk::VIDEO_FORMAT_TYPE decodeVideo; ^ ../sdk/include/IAgoraRecordingEngine.h:188:42: warning: ‘agora::linuxsdk::MIXED_AV_CODEC_TYPE agora::recording::RecordingConfig::mixedVideoAudio’ [-Wreorder] agora::linuxsdk::MIXED_AV_CODEC_TYPE mixedVideoAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../agora_node_ext/AgoraSdk.cpp: In member function ‘void agora::AgoraSdk::onAudioVolumeIndication_node(const agora::linuxsdk::AudioVolumeInfo*, unsigned int)’: ../agora_node_ext/AgoraSdk.cpp:383:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < speakerNumber; i++) { ^ ../agora_node_ext/AgoraSdk.cpp: In member function ‘virtual void agora::AgoraSdk::onAudioVolumeIndication(const agora::linuxsdk::AudioVolumeInfo*, unsigned int)’: ../agora_node_ext/AgoraSdk.cpp:401:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < speakerNum; i++) { ^ CXX(target) Release/obj.target/agorasdk/agora_node_ext/agora_node_recording.o In file included from ../agora_node_ext/agora_node_recording.cpp:3:0: ../agora_node_ext/agora_node_recording.h:62:52: warning: backslash and newline separated by space [enabled by default] #define napi_get_native_this(args, native) \ ^ ../agora_node_ext/agora_node_recording.cpp:13:0: warning: "NODE_UID_TYPE" redefined [enabled by default] #define NODE_UID_TYPE ^ In file included from ../agora_node_ext/agora_node_recording.h:6:0, from ../agora_node_ext/agora_node_recording.cpp:3: ../agora_node_ext/node_uid.h:20:0: note: this is the location of the previous definition #define NODE_UID_TYPE int32 ^ In file included from ../agora_node_ext/./AgoraSdk.h:11:0, from ../agora_node_ext/agora_node_recording.h:7, from ../agora_node_ext/agora_node_recording.cpp:3: ../sdk/include/IAgoraRecordingEngine.h: In constructor ‘agora::recording::RecordingConfig::RecordingConfig()’: ../sdk/include/IAgoraRecordingEngine.h:288:43: warning: ‘agora::recording::RecordingConfig::channelProfile’ will be initialized after [-Wreorder] agora::linuxsdk::CHANNEL_PROFILE_TYPE channelProfile; ^ ../sdk/include/IAgoraRecordingEngine.h:168:10: warning: ‘bool agora::recording::RecordingConfig::isAudioOnly’ [-Wreorder] bool isAudioOnly; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:275:9: warning: ‘agora::recording::RecordingConfig::idleLimitSec’ will be initialized after [-Wreorder] int idleLimitSec; ^ ../sdk/include/IAgoraRecordingEngine.h:241:12: warning: ‘char* agora::recording::RecordingConfig::appliteDir’ [-Wreorder] char * appliteDir; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:280:9: warning: ‘agora::recording::RecordingConfig::captureInterval’ will be initialized after [-Wreorder] int captureInterval; ^ ../sdk/include/IAgoraRecordingEngine.h:260:40: warning: ‘agora::linuxsdk::AUDIO_FORMAT_TYPE agora::recording::RecordingConfig::decodeAudio’ [-Wreorder] agora::linuxsdk::AUDIO_FORMAT_TYPE decodeAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:260:40: warning: ‘agora::recording::RecordingConfig::decodeAudio’ will be initialized after [-Wreorder] agora::linuxsdk::AUDIO_FORMAT_TYPE decodeAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:254:40: warning: ‘agora::linuxsdk::VIDEO_FORMAT_TYPE agora::recording::RecordingConfig::decodeVideo’ [-Wreorder] agora::linuxsdk::VIDEO_FORMAT_TYPE decodeVideo; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:254:40: warning: ‘agora::recording::RecordingConfig::decodeVideo’ will be initialized after [-Wreorder] agora::linuxsdk::VIDEO_FORMAT_TYPE decodeVideo; ^ ../sdk/include/IAgoraRecordingEngine.h:188:42: warning: ‘agora::linuxsdk::MIXED_AV_CODEC_TYPE agora::recording::RecordingConfig::mixedVideoAudio’ [-Wreorder] agora::linuxsdk::MIXED_AV_CODEC_TYPE mixedVideoAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../agora_node_ext/agora_node_recording.cpp: In static member function ‘static void agora::recording::NodeRecordingSdk::joinChannel(const v8::FunctionCallbackInfo<v8::Value>&)’: ../agora_node_ext/agora_node_recording.cpp:132:38: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] config.mixResolution = "640,480,15,500"; ^ ../agora_node_ext/agora_node_recording.cpp: In static member function ‘static void agora::recording::NodeRecordingSdk::setMixLayout(const v8::FunctionCallbackInfo<v8::Value>&)’: ../agora_node_ext/agora_node_recording.cpp:200:79: warning: ‘v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const’ is deprecated (declared at /root/.node-gyp/10.13.0/include/node/v8.h:2445): Use maybe version [-Wdeprecated-declarations] Local<Object> layoutData = args[0]->ToObject(args.GetIsolate()); ^ ../agora_node_ext/agora_node_recording.cpp: In static member function ‘static void agora::recording::NodeRecordingSdk::release(const v8::FunctionCallbackInfo<v8::Value>&)’: ../agora_node_ext/agora_node_recording.cpp:335:29: warning: unused variable ‘status’ [-Wunused-variable] napi_status status = napi_ok; ^ CXX(target) Release/obj.target/agorasdk/agora_node_ext/node_async_queue.o CXX(target) Release/obj.target/agorasdk/agora_node_ext/node_log.o CXX(target) Release/obj.target/agorasdk/agora_node_ext/node_napi_api.o ../agora_node_ext/node_napi_api.cpp: In function ‘int napi_get_value_string_utf8_(const v8::Local<v8::Value>&, char*, uint32_t)’: ../agora_node_ext/node_napi_api.cpp:20:45: warning: ‘int v8::String::Utf8Length() const’ is deprecated (declared at /root/.node-gyp/10.13.0/include/node/v8.h:2587): Use Isolate version instead [-Wdeprecated-declarations] return str.As<String>()->Utf8Length(); ^ ../agora_node_ext/node_napi_api.cpp:24:134: warning: ‘int v8::String::WriteUtf8(char*, int, int*, int) const’ is deprecated (declared at /root/.node-gyp/10.13.0/include/node/v8.h:2658): Use Isolate* version [-Wdeprecated-declarations] int copied = str.As<String>()->WriteUtf8(buffer, len - 1, nullptr, String::REPLACE_INVALID_UTF8 | String::NO_NULL_TERMINATION); ^ ../agora_node_ext/node_napi_api.cpp: In function ‘napi_status napi_get_value_uint32_(const v8::Local<v8::Value>&, uint32_t&)’: ../agora_node_ext/node_napi_api.cpp:34:33: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /root/.node-gyp/10.13.0/include/node/v8.h:2477): Use maybe version [-Wdeprecated-declarations] result = value->Uint32Value(); ^ ../agora_node_ext/node_napi_api.cpp: In function ‘napi_status napi_get_value_bool_(const v8::Local<v8::Value>&, bool&)’: ../agora_node_ext/node_napi_api.cpp:42:34: warning: ‘bool v8::Value::BooleanValue() const’ is deprecated (declared at /root/.node-gyp/10.13.0/include/node/v8.h:2474): Use maybe version [-Wdeprecated-declarations] result = value->BooleanValue(); ^ ../agora_node_ext/node_napi_api.cpp: In function ‘napi_status napi_get_value_int32_(const v8::Local<v8::Value>&, int32_t&)’: ../agora_node_ext/node_napi_api.cpp:50:32: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /root/.node-gyp/10.13.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations] result = value->Int32Value(); ^ ../agora_node_ext/node_napi_api.cpp: In function ‘napi_status napi_get_value_double_(const v8::Local<v8::Value>&, double&)’: ../agora_node_ext/node_napi_api.cpp:59:33: warning: ‘double v8::Value::NumberValue() const’ is deprecated (declared at /root/.node-gyp/10.13.0/include/node/v8.h:2475): Use maybe version [-Wdeprecated-declarations] result = value->NumberValue(); ^ CXX(target) Release/obj.target/agorasdk/agora_node_ext/node_uid.o CXX(target) Release/obj.target/agorasdk/agora_node_ext/agora_node_ext.o In file included from ../agora_node_ext/agora_node_ext.cpp:2:0: ../agora_node_ext/agora_node_recording.h:62:52: warning: backslash and newline separated by space [enabled by default] #define napi_get_native_this(args, native) \ ^ In file included from ../agora_node_ext/./AgoraSdk.h:11:0, from ../agora_node_ext/agora_node_recording.h:7, from ../agora_node_ext/agora_node_ext.cpp:2: ../sdk/include/IAgoraRecordingEngine.h: In constructor ‘agora::recording::RecordingConfig::RecordingConfig()’: ../sdk/include/IAgoraRecordingEngine.h:288:43: warning: ‘agora::recording::RecordingConfig::channelProfile’ will be initialized after [-Wreorder] agora::linuxsdk::CHANNEL_PROFILE_TYPE channelProfile; ^ ../sdk/include/IAgoraRecordingEngine.h:168:10: warning: ‘bool agora::recording::RecordingConfig::isAudioOnly’ [-Wreorder] bool isAudioOnly; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:275:9: warning: ‘agora::recording::RecordingConfig::idleLimitSec’ will be initialized after [-Wreorder] int idleLimitSec; ^ ../sdk/include/IAgoraRecordingEngine.h:241:12: warning: ‘char* agora::recording::RecordingConfig::appliteDir’ [-Wreorder] char * appliteDir; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:280:9: warning: ‘agora::recording::RecordingConfig::captureInterval’ will be initialized after [-Wreorder] int captureInterval; ^ ../sdk/include/IAgoraRecordingEngine.h:260:40: warning: ‘agora::linuxsdk::AUDIO_FORMAT_TYPE agora::recording::RecordingConfig::decodeAudio’ [-Wreorder] agora::linuxsdk::AUDIO_FORMAT_TYPE decodeAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:260:40: warning: ‘agora::recording::RecordingConfig::decodeAudio’ will be initialized after [-Wreorder] agora::linuxsdk::AUDIO_FORMAT_TYPE decodeAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:254:40: warning: ‘agora::linuxsdk::VIDEO_FORMAT_TYPE agora::recording::RecordingConfig::decodeVideo’ [-Wreorder] agora::linuxsdk::VIDEO_FORMAT_TYPE decodeVideo; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ ../sdk/include/IAgoraRecordingEngine.h:254:40: warning: ‘agora::recording::RecordingConfig::decodeVideo’ will be initialized after [-Wreorder] agora::linuxsdk::VIDEO_FORMAT_TYPE decodeVideo; ^ ../sdk/include/IAgoraRecordingEngine.h:188:42: warning: ‘agora::linuxsdk::MIXED_AV_CODEC_TYPE agora::recording::RecordingConfig::mixedVideoAudio’ [-Wreorder] agora::linuxsdk::MIXED_AV_CODEC_TYPE mixedVideoAudio; ^ ../sdk/include/IAgoraRecordingEngine.h:310:5: warning: when initialized here [-Wreorder] RecordingConfig(): channelProfile(agora::linuxsdk::CHANNEL_PROFILE_COMMUNICATION), ^ SOLINK_MODULE(target) Release/obj.target/agorasdk.node COPY Release/agorasdk.node make: Leaving directory/opt/agora/On-Premise-Recording-Nodejs/record/src/build’
gyp info ok

log.zip (2.4 KB)

编译成功后,就可以运行了啊,你那里有报错嘛?
image
以及需要确保这个频道内已存在客户端用户。

运行就报分段错误。确定这频道已存在客户端,并且已经在推流。

[root@sz-local-vm185 record]# node sdkdemo.js
setting mix layout…
joinChannel…
appliteDir /opt/agora/On-Premise-Recording-Nodejs/record/src/sdk/bin/
Segmentation fault

你可以收集下recording_sys.log 提个工单,我们这边看下。

好,recording_sys.log在哪个目录,我用find指令找不到这个文件。

那可能没生成。。。
你参考下这篇文章? Linux下的段错误(Segmentation fault)

node[18044]: segfault at 8 ip 00007ff35c2eccc2 sp 00007fff139fc590 error 4 in agorasdk.node[7ff35c291000+ab000]

问题是agorasdk.node是个从c++编出来二进制文件,我看看能不能找个会c++的帮我看看sdk那一部分除了问题我再继续反馈吧。
先这样了谢谢。。。

客气了。主要是目前log都没生成,有效的报错信息太少,很难具体去定位到问题出在哪…

setting mix layout…
joinChannel…
appliteDir /cutie/node/On-Premise-Recording-Nodejs/record/src/sdk/bin/
pRecording->m_agorasdk->createChannel return result:1
Error: 13,with stat_code:3
err 13 3
(node:16745) UnhandledPromiseRejectionWarning: 13

我运行 sdkdemo.js 报这样的错 是怎么回事呢?

请确认 AgoraCoreService 是否存在,或者目录文件权限是否可以执行?
目录文件:
/cutie/node/On-Premise-Recording-Nodejs/record/src/sdk/bin/

请下载最新的 Agora 本地服务端录制 SDK 软件包,其中的 bin 文件夹包含 AgoraCoreService 文件。

image
AgoraCoreService 是存在的 我的sdk版本是2.3.4
Agora_Recording_SDK_for_Linux_v2_3_4_FULL.tar
嗯嗯 好 我去工单解决

确认这个路径上每个子目录的权限都是 root 权限,并且 AgoraCoreService 文件也是 root 权限。
chmod 777 目录/文件

%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190927162220
都开了

确实 是权限的问题 谢啦

嗯嗯不客气