webrtc c++ library for mediasoup with full sfu c++ demo

Overview

项目说明: 本项目是基于mediasoup v3 版本 webrtc m84版本 的sfu的js版本修改成的c++版本,支持和js版本一样的完整demo功能,但是本项目是直接把worker进程代码集成 到了demo可以直接代码级别的调用,支持VC2019,xcode,CLion的开发环境,可以直接断点调试workder代码 本项目支持所有跨平台系统 WIN,Linux,Mac,嵌入式arm等系统,国产麒麟系统,支持嵌入式系统编译,编译说明,编译脚本支持跨平台编译,支持 WIN,Linux,Mac,嵌入式arm等系统,国产麒麟系统

编译说明,编译脚本支持跨平台编译,支持 WIN,Linux,Mac,嵌入式arm等系统,国产麒麟系统 1、下载依赖库boost https://jaist.dl.sourceforge.net/project/boost/boost/1.74.0/boost_1_74_0.tar.gz 放入lib目录下,记住不需要解解压缩,编译脚本会自动解压 1)、默认mac下用的是clang编译,ubuntu用的是gcc编译,按照系统默认安装编译器就行,gcc版本至少支持c++11版本大于 >= gcc-6.1 3)、其他的都是通过deps目录的源码进行编译的,再没有其他依赖库

2、arm平台变量设置 如果是跨平台编译,下述脚本只在对应平台执行一次即可(编译后的include和lib都自动安装到了release目录下用主程序调用) 跨平台编译需要先执行 x64位平台需要操作,可以忽略

source ./setarmenv.sh

3、依赖库编译(只编译一次)

./builddeps.sh

4、编译主程序 ./build.sh

生成的执行文件生成在 release/bin 目录下

参考8描述拷贝配置文件

5、也可以生成xcode,用xcode开发环境编译调试 ./genxcode.sh

6、也可以用clion编译调试 注意有时候更新后clion会有残留信息导致无法编译成功,此时需要删除cmake_debug目录,然后通过file执行invalidate,重启clion,然后重新导入工程,编译就行了 直接打开项目源码目录即可

7、如果用vc2019编译执行 win下使用llvm编译 LLVM下载链接地址 https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/LLVM-12.0.0-win64.exe

visual studio使用clang https://blog.csdn.net/weixin_42707943/article/details/85119329?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param 安装插件 llvm compile toolchain 插件 安装好后重启软件,项目属性常规工具集改成LLVM,一般到这就可以使用了

如果下载不了可以通过这个网址下载插件 https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain

注意:只有正确安装了llvm后才能执行下面的操作,否则会有提示错误无法生成工程 .\genvs2019.bat 生成工程文件即可打开工程编译 然后拷贝 lib\win\x64\libssl-1_1-x64.dll lib\win\x64\libcrypto-1_1-x64.dll 到执行文件所在Debug目录下即可

8、配置文件拷贝的编译的执行文件所在目录 配置文件在源码根目录下 demo/config.json 拷贝到 xcode/debug 目录下 或是clion的cmakebuild目录下和执行文件同一个目录 vc2019 需要拷贝到对应的Debug目录下,和执行文件同一个目录 详细配置可以参考mediasoup官方demo的配置 配置文件里面的ip地址需要配置对应服务器的内网地址和外网地址 "ip" : "192.168.1.192",//内网网卡地址 "announcedIp" : "192.168.1.192"//公网地址

9、问题及解决 目前整个项目只有下面的调用是c+14标准,其他都是c++11标准,后续如果有嵌入开发标准需求可以改成c++11 const RtpCapabilities supportedRtpCapabilities =

使用cmake生成xcode的项目

cmake .. -G "Xcode"

结果报如下错误

-- The C compiler identification is unknown

-- The CXX compiler identification is unknown

CMake Error at CMakeLists.txt:2 (project):

 No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:2 (project):

 No CMAKE_CXX_COMPILER could be found.

后来使用如下命令解决

sudo xcode-select --switch /Applications/Xcode.app/ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer 重试时记得清空build下的文件

10、交流及技术支持 加微信:jamesyhua,备注:进群,我拉你入微信群 image

You might also like...
Color composite video code from ESP_8_BIT as an Arduino library

ESP_8_BIT Color Composite Video Out Library Purpose The composite video generation code from ESP_8_BIT extracted and packaged into a standalone Arduin

theora-player is an embeddable theora video player C++ library based on the libtheora sample. It has no audio support at this moment.

theora-player Description theora-player is an embeddable theora video player C++ library based on the libtheora sample. It has no audio support at thi

A UE4 plugin used ffmpeg library to record/publish game viewport output and in-game audio.

Streaming A UE4 plugin used ffmpeg library to record/publish game viewport output and in-game audio. GPL license beacuse used ffmpeg. Structures GameV

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.

An open source video game library manager and launcher with support for 3rd party libraries like Steam, GOG, Origin, Battle.net and Uplay. Includes game emulation support, providing one unified interface for your games.

DTV is a library that provides a simple interface for generating video files from a C++ application
DTV is a library that provides a simple interface for generating video files from a C++ application

Direct to Video (DTV) What does DTV do? DTV is a library that provides a simple interface for generating video files from a C++ application. It uses F

Simple useful interoperability tests for WebRTC libraries. If you are a WebRTC library developer we'd love to include you!
Simple useful interoperability tests for WebRTC libraries. If you are a WebRTC library developer we'd love to include you!

Overview This project aims to be a convenient location for WebRTC library developers to perform interoperability tests. Who can Participate The projec

OvenMediaEngine (OME) is a Streaming Server for Sub-Second Latency. It supports WebRTC, RTMP, SRT, MPEG-2 TS, RTSP as input, WebRTC, LL-DASH, MPEG-DASH, HLS as output.
OvenMediaEngine (OME) is a Streaming Server for Sub-Second Latency. It supports WebRTC, RTMP, SRT, MPEG-2 TS, RTSP as input, WebRTC, LL-DASH, MPEG-DASH, HLS as output.

OvenMediaEngine (OME) is a Streaming Server for Sub-Second Latency. It supports WebRTC, RTMP, SRT, MPEG-2 TS, RTSP as input, WebRTC, LL-DASH, MPEG-DASH, HLS as output.

This is a openGL cube demo program. It was made as a tech demo using PVR_PSP2 Driver layer GPU libraries.

OpenGL Cube Demo using PVR_PSP2 Driver layer GPU libraries This is a openGL cube demo program. It was made as a tech demo using PVR_PSP2 Driver layer

Pear - WebRTC Toolkit for IoT/Embedded Device

Pear is a WebRTC SDK written in C. The SDK aims to integrate IoT/Embedded device with WebRTC applications.

SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.
SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.

SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.

yangwebrtc is a self-developed rtc architecture supporting Webrtc/Srt/Rtmp, including a variety of video and audio codecs and processing, etc.
yangwebrtc is a self-developed rtc architecture supporting Webrtc/Srt/Rtmp, including a variety of video and audio codecs and processing, etc.

YangWebrtc Overview yangwebrtc是一个自主研发的支持Webrtc/Srt/Rtmp的rtc架构,包含多种视音频编解码和处理等。 支持视频会议、高清录播直播、直播互动等多种视音频应用。 可用于远程教育、远程医疗、指挥调度、安防监控、影视录播、协同办公、直播互动等多种行业应用

media server based on c++11, support webrtc/rtmp/httpflv/websocket flv

cpp_media_server A media server is writen by C++11, and the network io is writen by Boost.Asio. It support rtmp/httpflv/websocket(flv)/webrtc. preinst

Share PC desktop to Raspberry Pi with WebRTC
Share PC desktop to Raspberry Pi with WebRTC

Share PC desktop to Raspberry Pi with WebRTC

Yangwebrtc - Webrtc Libary for PC, non-google lib
Yangwebrtc - Webrtc Libary for PC, non-google lib

MetaRTC(yangwebrtc) Overview MetaRTC(yangwebrtc)是一个自主研发的支持Webrtc/Srt/Rtmp的rtc架构,包含多种视音频编解码和处理等。 yangwebrtc为PC版本 metaRTC为嵌入式版本 https://github.com/metar

An Arduino library which allows you to communicate seamlessly with the full range of u-blox GNSS modules
An Arduino library which allows you to communicate seamlessly with the full range of u-blox GNSS modules

u-blox makes some incredible GNSS receivers covering everything from low-cost, highly configurable modules such as the SAM-M8Q all the way up to the surveyor grade ZED-F9P with precision of the diameter of a dime.

Open source Altium Database Library with over 147,000 high quality components and full 3d models.
Open source Altium Database Library with over 147,000 high quality components and full 3d models.

Open source Altium Database Library with over 147,000 high quality components and full 3d models.

C++ library for getting full ROS message definition or MD5 sum given message type as string

rosmsg_cpp C++ library for getting full message definition, MD5 sum and more given just the message type as string. This package provides both C++ lib

Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485

ABB Aurora protocol You can refer the complete documentation on my site ABB Aurora PV inverter library for Arduino, esp8266 and esp32 I create this li

Retro coding in C/C++ in a 3D template with full low-level control.
Retro coding in C/C++ in a 3D template with full low-level control.

BRIEF INFO ON THE 2021 WORLD TEMPLATE Project website: https://jacco.ompf2.com/voxel-world-template/ Purpose: This template has been designed to make

Comments
  • 编译问题centos8

    编译问题centos8

    [ 23%] Built target libwebrtc [ 83%] Built target worker [ 94%] Built target mediasoup [ 95%] Linking CXX executable ../sfu-demo ../../release/lib/liboatpp-websocket.a(Handshaker.cpp.o): In function oatpp::websocket::Handshaker::serversideHandshake(oatpp::data::share::LazyStringMapTemplate<oatpp::data::share::StringKeyLabelCI_FAST, std::multimap<oatpp::data::share::StringKeyLabelCI_FAST, oatpp::data::share::StringKeyLabel, std::less<oatpp::data::share::StringKeyLabelCI_FAST>, std::allocator<std::pair<oatpp::data::share::StringKeyLabelCI_FAST const, oatpp::data::share::StringKeyLabel> > > > const&, std::shared_ptr<oatpp::network::ConnectionHandler> const&)': Handshaker.cpp:(.text+0x31e): undefined reference tooatpp::encoding::Base64::ALPHABET_BASE64' Handshaker.cpp:(.text+0x353): undefined reference to oatpp::encoding::Base64::encode(oatpp::data::mapping::type::String const&, char const*)' ../../release/lib/liboatpp-websocket.a(Handshaker.cpp.o): In functionoatpp::websocket::Handshaker::clientsideConfirmHandshake(oatpp::data::share::LazyStringMapTemplate<oatpp::data::share::StringKeyLabelCI_FAST, std::multimap<oatpp::data::share::StringKeyLabelCI_FAST, oatpp::data::share::StringKeyLabel, std::lessoatpp::data::share::StringKeyLabelCI_FAST, std::allocator<std::pair<oatpp::data::share::StringKeyLabelCI_FAST const, oatpp::data::share::StringKeyLabel> > > > const&, std::shared_ptroatpp::web::protocol::http::incoming::Response const&)': Handshaker.cpp:(.text+0xbdf): undefined reference to oatpp::web::protocol::http::incoming::Response::getStatusCode() const' Handshaker.cpp:(.text+0xc04): undefined reference tooatpp::web::protocol::http::incoming::Response::getHeaders() const' Handshaker.cpp:(.text+0xe3a): undefined reference to oatpp::encoding::Base64::ALPHABET_BASE64' Handshaker.cpp:(.text+0xe69): undefined reference tooatpp::encoding::Base64::encode(oatpp::data::mapping::type::String const&, char const*)' ../../release/lib/liboatpp-websocket.a(Utils.cpp.o): In function oatpp::websocket::Utils::generateMaskForFrame(oatpp::websocket::Frame::Header&)': Utils.cpp:(.text+0x33): undefined reference tooatpp::utils::random::Random::randomBytes(unsigned char*, long)' ../../release/lib/liboatpp-websocket.a(Utils.cpp.o): In function oatpp::websocket::Utils::generateKey()': Utils.cpp:(.text+0x8a): undefined reference tooatpp::utils::random::Random::randomBytes(unsigned char*, long)' Utils.cpp:(.text+0x91): undefined reference to oatpp::encoding::Base64::ALPHABET_BASE64' Utils.cpp:(.text+0xa4): undefined reference tooatpp::encoding::Base64::encode(oatpp::data::mapping::type::String const&, char const*)' collect2: error: ld returned 1 exit status make[2]: *** [demo/CMakeFiles/sfu-demo.dir/build.make:272: sfu-demo] Error 1 make[1]: *** [CMakeFiles/Makefile2:232: demo/CMakeFiles/sfu-demo.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

    oatpp相关的三个库都成功编译了。生成了.a。不知道为什么显示undefined

    opened by mingyang0921 1
  • 原先的nodejs库替换为c++库后,这个c++ mediasoup库和原先底层的c++ work库间是怎么通讯

    原先的nodejs库替换为c++库后,这个c++ mediasoup库和原先底层的c++ work库间是怎么通讯

    Hi,将原先的nodejs库替换为c++库后,这个c++ mediasoup库和原先底层的c++ work库是怎么通讯的(nodejs mediasoup库和c++ work库直接通过管道进行通信)? 新的之间也是通过管道通信? 还是去除了原来的管道通信方式,把work做为库直接引入你新写的c++ mediasoup库直接使用了呢?

    opened by xujingzhou 1
Releases(1.0.1)
Owner
null
Pear - WebRTC Toolkit for IoT/Embedded Device

Pear is a WebRTC SDK written in C. The SDK aims to integrate IoT/Embedded device with WebRTC applications.

null 581 Jan 2, 2023
SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.

SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.

ossrs 20.4k Jan 5, 2023
yangwebrtc is a self-developed rtc architecture supporting Webrtc/Srt/Rtmp, including a variety of video and audio codecs and processing, etc.

YangWebrtc Overview yangwebrtc是一个自主研发的支持Webrtc/Srt/Rtmp的rtc架构,包含多种视音频编解码和处理等。 支持视频会议、高清录播直播、直播互动等多种视音频应用。 可用于远程教育、远程医疗、指挥调度、安防监控、影视录播、协同办公、直播互动等多种行业应用

null 331 Dec 27, 2022
media server based on c++11, support webrtc/rtmp/httpflv/websocket flv

cpp_media_server A media server is writen by C++11, and the network io is writen by Boost.Asio. It support rtmp/httpflv/websocket(flv)/webrtc. preinst

Alex.CR 139 Jun 30, 2022
Yangwebrtc - Webrtc Libary for PC, non-google lib

MetaRTC(yangwebrtc) Overview MetaRTC(yangwebrtc)是一个自主研发的支持Webrtc/Srt/Rtmp的rtc架构,包含多种视音频编解码和处理等。 yangwebrtc为PC版本 metaRTC为嵌入式版本 https://github.com/metar

meta 331 Dec 27, 2022
OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world

OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world

OpenShot Studios, LLC 936 Jan 4, 2023
Vireo is a lightweight and versatile video processing library written in C++11

Overview Vireo is a lightweight and versatile video processing library that powers our video transcoding service, deep learning recognition systems an

Twitter 875 Jan 2, 2023
C++ library for programming the VideoCore GPU on all Raspberry Pi's.

V3DLib is a C++ library for creating programs to run on the VideoCore GPU's of all versions of the Raspberry Pi.

null 51 Dec 8, 2022
A simple but powerful multimedia player library designed for Qt Quick.

QtMediaPlayer A simple but powerful multimedia player library designed for Qt Quick. Features Full-featured multimedia player Cross-platform: support

Yuhang Zhao 16 Nov 29, 2022
FFmpeg library inspector

ffmpeg-lib-info Prints the license, version, and configuration for FFmpeg libraries.

Zeranoe 3 Jun 7, 2021