gpt4 book ai didi

ios - 使用LFLiveKit捕获屏幕并流到rtmp服务器

转载 作者:行者123 更新时间:2023-12-01 18:39:49 37 4
gpt4 key购买 nike

我正在尝试使用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)

如何使用屏幕截图初始化 session ?有指针吗?

最佳答案

我必须像这样

let session = LFLiveSession(audioConfiguration: audioConfiguration, videoConfiguration: videoConfigurationcaptureType: LFLiveCaptureTypeMask.inputMaskVideo)
在 session 初始化中设置captureType

关于ios - 使用LFLiveKit捕获屏幕并流到rtmp服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45102370/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com