AndroidInstantVideo icon indicating copy to clipboard operation
AndroidInstantVideo copied to clipboard

Stream RTMP Problem

Open chentengming opened this issue 7 years ago • 2 comments

Black screen appears on the push stream and the sound is not continuous, Thanks.

chentengming avatar Aug 24 '18 02:08 chentengming

The not continuous could be caused by echo. Could you provide some advise?

ChillingVan avatar Aug 25 '18 02:08 ChillingVan

消除回声可以用 AcousticEchoCanceler @ChillingVan 在 mAudioRecord.startRecording() 之前执行

// 消除回声导致的滋啦滋啦声音
if (AcousticEchoCanceler.isAvailable()) {
    aec = AcousticEchoCanceler.create(mAudioRecord.getAudioSessionId());
    if (aec != null) {
        aec.setEnabled(true); //android 11 issue low volume
    }
}
if (AutomaticGainControl.isAvailable()) {
    agc = AutomaticGainControl.create(mAudioRecord.getAudioSessionId());
    if (agc != null) {
        agc.setEnabled(true);
    }
}


mAudioRecord.startRecording();
mMediaCodec.start();

ulongx avatar Nov 22 '22 10:11 ulongx