Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[技术咨询]windows下编译webrtc问题 #1081

Closed
xilidedashu opened this issue Sep 1, 2021 · 15 comments
Closed

[技术咨询]windows下编译webrtc问题 #1081

xilidedashu opened this issue Sep 1, 2021 · 15 comments

Comments

@xilidedashu
Copy link

咨询的功能模块

  • windwos下编译webrtc问题。

咨询的具体内容和问题

  • CMAKE在前置步骤都配置好的情况下,报错
    CMake Warning at CMakeLists.txt:299 (message):
    srtp未找到, webrtc相关功能打开失败。

注意事项

  • 技术咨询前请先认真阅读readme, wiki,如有必要,您也可以同时搜索已经答复的issue,如果没找到答案才在此提issue

  • 技术咨询不属于bug缺陷,建议先star本项目,否则可能会降低答复优先级

@pubpy2015
Copy link

windows编译

可以参考网友大神自制这里

https://blog.csdn.net/byna11sina11/article/details/119786889

@xilidedashu
Copy link
Author

我是参考的这个来做的,但是没有成功,报上面的错误,不太清楚问题出在哪里。

@xilidedashu
Copy link
Author

在开启webrtc之后,生成解决方案也报下面的错误:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C1083 无法打开包括文件: “srtp2/srtp.h”: No such file or directory test_rtcp_nack E:\ZLMediaKit\ZLMediaKit\webrtc\SrtpSession.hpp 23

@pubpy2015
Copy link

step by step:

  1. download and install OpenSSL: http://slproweb.com/products/Win32OpenSSL.html
  2. download libsrtp: https://github.com/cisco/libsrtp/releases/tag/v2.4.0
  3. using CMake to config libsrtp with enable openSSL: (press Configure 2 times to auto detect OpenSSL lib):
    https://blog.csdn.net/byna11sina11/article/details/119786889
    ảnh
  4. Build libsrtp solution (remember tick build INSTALL project)
  5. Add libsrtp to Enviroment Variables
    ảnh
  6. Clone ZLMediaKit
  7. using CMake to config with enable openSSL and WebRTC
    ảnh

@xilidedashu
Copy link
Author

您好,我也按照您上面的做了,用了最新的libsrtp包,但是还是同样的错误,我这里目前不能上传图片,还请谅解!

@xilidedashu
Copy link
Author

对了,我用的是win10 家庭版。

@xia-chu
Copy link
Member

xia-chu commented Sep 2, 2021

srtp2安装路径要一定格式的,用我编译好的windows srtp2吧:
srtp2.zip

@xilidedashu
Copy link
Author

感谢夏大大的支持,用了您这个之后还是一样的问题,我已经把您发给我的包的路径设置到环境变量里面了(E:\ZLMediaKit\zlm\srtp2),我之前编译的INSTALL的目录结构和文件与您发我的一致,我怀疑是环境变量设置不生效问题引起的,不知道我的猜想对不对。

@xia-chu
Copy link
Member

xia-chu commented Sep 2, 2021

感谢夏大大的支持,用了您这个之后还是一样的问题,我已经把您发给我的包的路径设置到环境变量里面了(E:\ZLMediaKit\zlm\srtp2),我之前编译的INSTALL的目录结构和文件与您发我的一致,我怀疑是环境变量设置不生效问题引起的,不知道我的猜想对不对。

你要不在群里面下个别人编译好的吧

@xilidedashu
Copy link
Author

{
"code" : 0,
"data" : [
"/index/",
"/index/api/addFFmpegSource",
"/index/api/addStreamProxy",
"/index/api/addStreamPusherProxy",
"/index/api/closeRtpServer",
"/index/api/close_stream",
"/index/api/close_streams",
"/index/api/delFFmpegSource",
"/index/api/delStreamProxy",
"/index/api/delStreamPusherProxy",
"/index/api/downloadBin",
"/index/api/getAllSession",
"/index/api/getApiList",
"/index/api/getMediaInfo",
"/index/api/getMediaList",
"/index/api/getMp4RecordFile",
"/index/api/getRtpInfo",
"/index/api/getServerConfig",
"/index/api/getSnap",
"/index/api/getStatistic",
"/index/api/getThreadsLoad",
"/index/api/getWorkThreadsLoad",
"/index/api/isMediaOnline",
"/index/api/isRecording",
"/index/api/kick_session",
"/index/api/kick_sessions",
"/index/api/listRtpServer",
"/index/api/openRtpServer",
"/index/api/pauseRtpCheck",
"/index/api/resumeRtpCheck",
"/index/api/setServerConfig",
"/index/api/startRecord",
"/index/api/startSendRtp",
"/index/api/stopRecord",
"/index/api/stopSendRtp",
"/index/hook/on_flow_report",
"/index/hook/on_http_access",
"/index/hook/on_play",
"/index/hook/on_publish",
"/index/hook/on_record_mp4",
"/index/hook/on_rtsp_auth",
"/index/hook/on_rtsp_realm",
"/index/hook/on_server_started",
"/index/hook/on_shell_login",
"/index/hook/on_stream_changed",
"/index/hook/on_stream_none_reader",
"/index/hook/on_stream_not_found"
]
}

群里windows编译好的,没有看到webrtc的接口...

@xilidedashu
Copy link
Author

今天突然能编译了,没有改动任何配置,不知道为何 😂😂😂😂

@MrShenf
Copy link

MrShenf commented Jan 13, 2022

今天突然能编译了,没有改动任何配置,不知道为何 😂😂😂😂

您好 编译好的版本可以分享一下吗

@zhaoyongjun1113
Copy link

感谢夏大大的支持,用了您这个之后还是一样的问题,我已经把您发给我的包的路径设置到环境变量里面了(E:\ZLMediaKit\zlm\srtp2),我之前编译的INSTALL的目录结构和文件与您发我的一致,我怀疑是环境变量设置不生效问题引起的,不知道我的猜想对不对。

需要在cmakelist中配置SRTP_PREFIX为自己 srtp包所在的目录,如 set(SRTP_PREFIX "F:/msys64/home/12032/libsrtp-2.4.0/install"),可以查看安装目录下cmake/FindSRTP.cmake,里面寻找srtp包是有SRTP_PREFIX 宏

@yya5119
Copy link

yya5119 commented May 23, 2022

我也碰到了这个问题,应该是环境变量的问题 我重启电脑后 重新生成就正常了

@wangzheooo
Copy link

将libsrtp安装的根目录和cmake中设置的srtp的build文件夹中的Release目录(如果编译的是Debug,则这里是Debug目录)路径配置到Windows的系统环境变量Path中。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants