You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using AVAudioSinkNode to add audio buffers to a MediaMixer.
I also have a custom implementation for video using AVCaptureDevice, which I also send directly to the MediaMixer.
If I start a stream with the built-in microphone, everything works fine.
But if I plug in headphones, the buffer format in AVAudioSinkNode changes (from 48kHz to 24kHz).
After that, the AudioMixer converter format changes when I add the new buffer (24kHz),
and on the receiving side, the audio breaks:
• the audio is way ahead of the video
• there’s no audio at all
• the audio is ahead and distorted
Unplugging the headphones doesn’t help (even when the format goes back to 48kHz).
However, if I start the stream with the headphones already plugged in, everything works fine.
So the issue is specifically with switching and format change.
I’m using RTMP streaming.
Does HaishinKit synchronize incoming audio and video buffers somehow?
Has anyone encountered this?
My current ideas:
• switching the input format changes the hostTime of audio buffers and breaks synchronization
• switching the input format breaks the AudioRingBuffer or AudioCodec
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone! 😀
I’m facing an issue:
I’m using AVAudioSinkNode to add audio buffers to a MediaMixer.
I also have a custom implementation for video using AVCaptureDevice, which I also send directly to the MediaMixer.
If I start a stream with the built-in microphone, everything works fine.
But if I plug in headphones, the buffer format in AVAudioSinkNode changes (from 48kHz to 24kHz).
After that, the AudioMixer converter format changes when I add the new buffer (24kHz),
and on the receiving side, the audio breaks:
• the audio is way ahead of the video
• there’s no audio at all
• the audio is ahead and distorted
Unplugging the headphones doesn’t help (even when the format goes back to 48kHz).
However, if I start the stream with the headphones already plugged in, everything works fine.
So the issue is specifically with switching and format change.
I’m using RTMP streaming.
Does HaishinKit synchronize incoming audio and video buffers somehow?
Has anyone encountered this?
My current ideas:
• switching the input format changes the hostTime of audio buffers and breaks synchronization
• switching the input format breaks the AudioRingBuffer or AudioCodec
Would appreciate any advice! 🙏
Beta Was this translation helpful? Give feedback.
All reactions