-
I'm trying to figure out if it's possible to record locally at 1080p while streaming 720p at the same time. Has anyone any insights into this please? I tried to look through the documentation and code but couldn't really figure out if there's a way to do it. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
shogo4405
Jun 18, 2024
Replies: 1 comment 1 reply
-
Yes, it is possible. // 1. Use the camera capture size for local recording as specified above. However, the device needs to be supported.
stream.sessionPreset = .hd1920x1080
// 2. Use the screen size for local recording as specified above.
stream.screen.size = .init(width: 1920, height: 1080)
// 3. Specify the local recording as follows.
recorder = IOStreamRecorder()
recorder.outputSettings = [
.audio: [
AVFormatIDKey: Int(kAudioFormatMPEG4AAC),
AVSampleRateKey: 0,
AVNumberOfChannelsKey: 0
],
.video: [
AVVideoCodecKey: AVVideoCodecType.h264,
AVVideoHeightKey: 1920,
AVVideoWidthKey: 1080
]
]
stream.addObserver(recorder)
// 4. Specify the streaming settings as follows.
stream.videoSettings.videoSize = .init(width: 1280, height: 720) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kafejo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, it is possible.