使用LFLiveKit捕获屏幕并流式传输到rtmp服务器

时间:2017-07-14 11:56:06

标签: ios xcode video-streaming rtmp

我正在尝试使用LFLiveKit sdk将rtmp流发送到服务器。我尝试过像这样流式传输像素缓冲区,

var Lsession: LFLiveSession = {
  let audioConfiguration = LFLiveAudioConfiguration.defaultConfiguration(for: LFLiveAudioQuality.high)
  let videoConfiguration = LFLiveVideoConfiguration.defaultConfiguration(for: LFLiveVideoQuality.low3)
  let session = LFLiveSession(audioConfiguration: audioConfiguration, videoConfiguration: videoConfiguration)
  return session!
}()

let stream = LFLiveStreamInfo()
stream.url = "rtmp://domain.com:1935/show/testS"
Lsession.pushVideo(frame.capturedImage)

如何使用屏幕截图初始化会话?有什么指针吗?

1 个答案:

答案 0 :(得分:3)

我必须在会话初始化中设置captureType,如此,

@Context HttpServletRequest