Closed kenle closed 2 years ago
I fixed this issue https://github.com/shogo4405/HaishinKit.swift/issues/360 4years ago. Currentry, It works for me Examples. I can publish 720x1280.
Duration: 00:00:00.00, start: 10.240000, bitrate: N/A
Stream #0:0: Audio: aac (LC), 48000 Hz, mono, fltp, 32 kb/s
Stream #0:1: Video: h264 (Baseline), yuv420p(tv, progressive), 720x1280, 422 kb/s, 30 fps, 30 tbr, 1k tbn
Yes, I thought this was fixed as well, at some point I remember it was working for me.
But recently, it seems to have reverted. I've checked everything and am a bit confused at the moment.
@shogo4405 I resolved it :)
I have to call this every time before appending to the rtmpStream, and I get the resolution I desire! Thank you for your great library.
if let description = CMSampleBufferGetFormatDescription(cmSampleBuffer) {
let dimensions = CMVideoFormatDescriptionGetDimensions(description)
self.rtmpStream?.videoSettings = [
.width: dimensions.width,
.height: dimensions.height,
.profileLevel: kVTProfileLevel_H264_Baseline_AutoLevel,
.maxKeyFrameIntervalDuration: 2,
.bitrate: 1200 * 1024
]
self.rtmpStream?.captureSettings = [
.fps: 24
]
}
self.rtmpStream?.appendSampleBuffer(cmSampleBuffer, withType: .video);
On what version changing videoSettings works? cause it still seems in 1.4.3 it randomly stops working
Describe the bug High, I'm following the examples on homepage and in iOS directory, but cannot get the
rtmpStream.videoSettings
to listen to the.width
and.height
parameters, it always outputs 480x272. I saw previous bugs (#360) reported on this but you said it was aframework bug
. How comes the examples shows setting resolution, but it may not have any affect?To Reproduce Steps to reproduce the behavior: For example, I tried the homepage example:
I am also using ReplayKit to stream to youtube with the following line:
Expected behavior I expect it to stream the desired resolution, for example 640x360, or whatever I set the resolution to.
Screenshots Screenshot from youtube rtmp stream:
Smartphone (please complete the following information):