相关库
LFLiveKit + RTMP实现直播推流
RTMP协议:RTMP(the Real-time Messaging Protocol)协议作为客户端和服务器端的传输协议,这是一个专门为高效传输视频、音频和数据而设计的 TCP/IP 协议。
HLS协议: HTTP Live Streaming(HLS)是苹果公司(Apple Inc.)实现的基于HTTP的流媒体传输协议。
1、利用cocoapods加载LFLiveKit
source 'https://github.com/CocoaPods/Specs.git'
target ‘Live_LFLiveKit_RTMP’ do
pod 'LFLiveKit'
end
2、创建直播会话
// 创建直播会话
@property (nonatomic, strong) LFLiveSession *liveSession;
相关属性的设置,LFLiveKit已经包含了GPUImage,可以进行美颜相关操作
【学习地址】: