- The easiest WebRTC stack for embedded / IoT / robotics devices
- Code once run everywhere, A pure C version of webRTC
- Linux/RTOS/Windows/Mac/Android/IOS
- ICE / ICE-Lite
- STUN and TURN (configurable)
- DTLS / SRTP
- Full RTP/RTCP support
- Adaptive bitrate & congestion control
- Flexible media pipelines
- P2P connection logic
- Customizable session/signaling logic
- UDP and optional TCP fallback
- Multi-stream, multi-track support
In short, MetaRTC provides full control, can run in fully offline environments, and is suitable for large-scale product integration.
-
Audio/Video Support
- H264/H265(HEVC)
- OPUS/G711A/G711U/AAC/MP3/SPEEX
- AEC/ANS/AGC/VAD/CNG
-
DataChannels
-
NACK/PLI/FIR/FEC/TWCC
-
STUN/TURN Support
-
IPv4/IPv6
-
Whip/Whep
-
Linux/RTOS/Windows/Mac/Android/IOS
-
ARM/MIPS/Loongson/RISC-V/X86
-
MP4/FLV Recording
- AAC/H264
- AAC/H265(HEVC)
-
Flutter/React Native/UniApp/QT/Lvgl/Native
demo/metaplayer7_flutter
download: https://github.com/metartc/metaRTC/releases/tag/7.0.072 file:metartc7.072.linux.7z
demo/metaplayer7_lvgl
download: https://github.com/metartc/metaRTC/releases/tag/7.0.050 file:metartc7.062.linux.lvgl.7z
Implementation of webRTC protocol stack
AEC/ANS/AGC and other audio and video processing libraries
Realize audio and video collection, encoding, decoding, transmission, rendering, and push-pull streaming
To compile libmetartccore7, you'll need to satisfy the following dependencies:
OpenSSL or Mbedtls
libsrtp
usrsctp
#include <yangrtc/YangWhip.h>
#include <yangrtc/YangPeerInfo.h>
#include <yangrtc/YangPeerConnection.h>
int32_t localPort=16000;
YangAVInfo* avinfo;
YangPeerConnection* conn=(YangPeerConnection*)calloc(sizeof(YangPeerConnection),1);
//yang_init_peerInfo(&conn->peer.peerInfo);
yang_avinfo_initPeerInfo(&conn->peer.peerInfo,avinfo);
conn->peer.peerInfo.rtc.rtcLocalPort = localPort;
conn->peer.peerInfo.direction = YangRecvonly;
conn->peer.peerInfo.uid = uid;
conn->peer.peerCallback.recvCallback.context=this;
conn->peer.peerCallback.recvCallback.receiveAudio=g_rtcrecv_receiveAudio;
conn->peer.peerCallback.recvCallback.receiveVideo=g_rtcrecv_receiveVideo;
conn->peer.peerCallback.recvCallback.receiveMsg=g_rtcrecv_receiveMsg;
yang_create_peerConnection(conn);
conn->addAudioTrack(&conn->peer,Yang_AED_OPUS);
conn->addVideoTrack(&conn->peer,Yang_VED_H264);
conn->addTransceiver(&conn->peer,YangMediaAudio,YangRecvonly);
conn->addTransceiver(&conn->peer,YangMediaVideo,YangRecvonly);
//sfu
if(isWhip)
yang_whip_connectWhipWhepServer(&conn->peer,url);
else
yang_whip_connectSfuServer(&conn->peer,url,mediaServer);
//p2p
conn->createDataChannel(&conn->peer);
if((err=conn->createOffer(&conn->peer, &localSdp))!=Yang_Ok){
yang_error("createOffer fail",);
goto cleanup;
}
if((err=conn->setLocalDescription(&conn->peer, localSdp))!=Yang_Ok){
yang_error("setLocalDescription fail");
goto cleanup;
}
......
//get remote peer sdp
if((err=conn->setRemoteDescription(&conn->peer,remoteSdp))!=Yang_Ok){
yang_error("setRemoteDescription fail!");
goto cleanup;
}
#include <yangrtc/YangWhip.h>
#include <yangrtc/YangPeerInfo.h>
#include <yangrtc/YangPeerConnection7.h>
int32_t localPort=16000;
YangAVInfo* avinfo;
YangPeerInfo peerInfo;
//yang_init_peerInfo(&peerInfo);
yang_avinfo_initPeerInfo(&peerInfo,avinfo);
peerInfo.uid=0;
peerInfo.direction=YangSendonly;
peerInfo.rtc.rtcLocalPort = localPort;
//YangCallbackReceive* receive
//YangCallbackIce* ice
//YangCallbackRtc* rtc
//YangCallbackSslAlert* sslAlert);
YangPeerConnection7* conn=new YangPeerConnection7(&peerInfo,receive,ice, rtc,sslAlert);
conn->addAudioTrack(Yang_AED_OPUS);
conn->addVideoTrack(Yang_VED_H264);
conn->addTransceiver(YangMediaAudio,peerInfo.direction);
conn->addTransceiver(YangMediaVideo,peerInfo.direction);
//sfu
if(isWhip)
yang_whip_connectWhipWhepServer(&conn->m_peer,url);
else
yang_whip_connectSfuServer(&conn->m_peer,url,mediaServer);
//p2p
conn->createDataChannel();
if((err=conn->createOffer(&localSdp))!=Yang_Ok){
yang_error("createOffer fail",);
goto cleanup;
}
if((err=conn->setLocalDescription(localSdp))!=Yang_Ok){
yang_error("setLocalDescription fail");
goto cleanup;
}
......
//get remote peer sdp
if((err=conn->setRemoteDescription(remoteSdp))!=Yang_Ok){
yang_error("setRemoteDescription fail!");
goto cleanup;
}
微信号: taihang82
email: [email protected] [email protected]
twitter: metaRTC@metartc_sdk
./cmake_lib_x64.sh
./cmake_lib_android.sh
./cmake_mips32.sh
#arm64
./cmake_arm.sh
./cmake_x64.sh
#arm64-v8a armeabi x86_64
./cmake_android.sh
libmetartccore7/libmetartccore7.pro
libmetartc7/libmetartc7.pro
project_msvc/
libmetartccore7/libmetartccore7.pro
libmetartc7/libmetartc7.pro
project_xcode/
demo/metapushstream7/metapushstream7.pro
demo/metaplayer7/metaplayer7.pro
android studio ide(api:29)
demo/metapushstream7_android
demo/metaplayer7_android
https://github.com/metartc/metaRTC/wiki/metaRTC-streams-to-janus-via-the-whip-protocol
https://github.com/metartc/metaRTC/wiki/metaRTC-Learning
