Closed hraza-simublade closed 4 years ago
I found this bug on only iPhone 11 series. iPhone XS on iOS 13.3 work well, but the steaming by iPhone 11 Pro on iOS 13.3 , sound is very chopping. I tried to change Audiosseion mode, category. but it didn't get well. i tested both recently sdk version and 0.11.9 version, the result was same.
I can confirm the issue on the latest iPhones this is how the audio sounds (reproduction after conversion to HLS) https://dwy2ap2fjt6gi.cloudfront.net/b5bcef28-c744-472e-892b-96e1e2589fc4/choppysound.m3u8
Having this issue as well with iOS13.2 on iPhone 7 Plus. Any workarounds would be appreciated!
Try this
sampleRate
: 48_000
Try this
sampleRate
:48_000
Not working.
That fixed the issue for me. Audio is much improved by setting sampleRate to 48_000
HaishinKit has no feature (down|up)Sample rate.
Xcode console log:
2020-09-02 17:01:41.565 [Info] [com.haishinkit.HaishinKit] [AudioConverter.swift:89] inSourceFormat > Optional(__C.AudioStreamBasicDescription(mSampleRate: 48000.0, mFormatID: 1819304813, mFormatFlags: 41, mBytesPerPacket: 4, mFramesPerPacket: 1, mBytesPerFrame: 4, mChannelsPerFrame: 1, mBitsPerChannel: 32, mReserved: 0))
Solution 1. Please set a same value, mSampleRate.
rtmpStream.audioSettings = [
.sampleRate: sampleRate,
]
Solution 2. Please unset a sampleRate value.
rtmpStream.audioSettings = [
.sampleRate: 0,
]
@shogo4405 Thanks, the 2nd solution worked. Set .sampleRate
to 0
.
@ryo-liveplanet 2nd solution didn't work for me. avAudioSampleRate: Double = 0
On the server-side I'm converting with FFPMEG to -b:a 48000 \ -r 30 \
WIth iPhone 11 and latest iOS it still came out choppy.
https://live.eventlive.pro/marinaachernova/test-event-1
It works good with iPhone 8 however.
I think might be fixed it #640. Please update and try master branch. Don't forget.
rtmpStream.audioSettings = [ .sampleRate: 0, ]
@shogo4405 Tried master on an iPhone 11, iOS 13.1. Still choppy audio
Any ideas? @shogo4405 Could it be related to different aspect ratios? Anything has changed in iOS APIs for new version phones?
@mkrn How about master branch?
I want two informations. print(sampleBuffer) print(sampleBuffer.numSamples)
I belived fixed this issue #640. If not fixed this issue, please open an new issue.
@shogo4405 the master fixes the problem. Thank you very much!
Describe the bug I'm running the example iOS app in iOS 13 and streaming with Mux (tried it with Wowza as well) and am having issues with the audio being incredibly choppy. Using different bitrates is not fixing the issue. This was not an issue in iOS 12.
To Reproduce Steps to reproduce the behavior:
Expected behavior Clear/smooth audio
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context This problem was not occurring in iOS12.