Replies: 1 comment
-
|
I’m experiencing the same issue with the audio on iOS — it’s crackling during live streaming to YouTube. Could this issue be related to that error? My settings:
Please check the attached video — you can clearly hear the audio crackling issue there. Hope someone can help with this! 🙏 IMG_0818.mov |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment:
HaishinKit version: (latest from Swift Package Manager)
Platform: macOS (Apple Silicon)
Swift version: 5.x
Audio source: Blackmagic DeckLink hardware capture card
Problem:
I'm experiencing audio distortion/noise when streaming audio from a DeckLink capture device through HaishinKit RTMP. The video works perfectly, but audio has constant crackling/static noise.
Audio Source Details:
Input Format: DeckLink SDK provides Int16 interleaved stereo PCM
Sample Rate: 48000 Hz
Channels: 2 (Stereo)
Samples per frame: ~2000 samples per callback
Data layout: [L, R, L, R, L, R, ...] (interleaved Int16)
Current Implementation:
Questions:
Is the audio format conversion correct?
DeckLink sends Int16 interleaved → Should I convert to Float32 non-interleaved or Float32 interleaved?
Is interleaved: false correct for AVAudioFormat with HaishinKit's AAC encoder?
Is the de-interleaving logic correct?
Is the timestamp calculation correct?
Using cumulative sample count:
AVAudioTime(sampleTime: totalSamplesSent, atRate: 48000)
Incrementing by actual samples: totalSamplesSent += sampleCount
Should I use rtmpStream.append(pcmBuffer, when: audioTime) or just rtmpStream.append(audioTime)?
Any known issues with DeckLink or hardware capture device audio?
Additional Info:
Video streaming works perfectly (using CMSampleBuffer from CVPixelBuffer)
Audio appears to be encoded (AAC packets are sent), but playback has severe distortion
The audio sounds like random noise/static, not just quiet crackling
Any help would be greatly appreciated!
Thank you! 🙏
Beta Was this translation helpful? Give feedback.
All reactions