Skip to content

com.pedro.rtpstreamer E/AndroidRuntime: FATAL EXCEPTION: AudioEncoder When I Use RtmpOnlyAudio startRecord And startStream #1244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
iwuq opened this issue Jun 6, 2023 · 1 comment

Comments

@iwuq
Copy link

iwuq commented Jun 6, 2023

2023-06-06 11:48:52.476 30193-30252/com.pedro.rtpstreamer E/AndroidRuntime: FATAL EXCEPTION: AudioEncoder
Process: com.pedro.rtpstreamer, PID: 30193
java.nio.BufferUnderflowException
at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:239)
at com.pedro.rtmp.flv.audio.AacPacket.createFlvAudioPacket(AacPacket.kt:77)
at com.pedro.rtmp.rtmp.RtmpSender.sendAudioFrame(RtmpSender.kt:79)
at com.pedro.rtmp.rtmp.RtmpClient.sendAudio(RtmpClient.kt:507)
at com.pedro.rtplibrary.rtmp.RtmpOnlyAudio.getAacDataRtp(RtmpOnlyAudio.java:163)
at com.pedro.rtplibrary.base.OnlyAudioBase.getAacData(OnlyAudioBase.java:356)
at com.pedro.encoder.audio.AudioEncoder.sendBuffer(AudioEncoder.java:150)
at com.pedro.encoder.BaseEncoder.processOutput(BaseEncoder.java:209)
at com.pedro.encoder.BaseEncoder.outputAvailable(BaseEncoder.java:242)
at com.pedro.encoder.BaseEncoder$2.onOutputBufferAvailable(BaseEncoder.java:262)
at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1797)
at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1705)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.os.HandlerThread.run(HandlerThread.java:67)

@iwuq
Copy link
Author

iwuq commented Jun 6, 2023

When I use RtmpOnlyAudio streaming and record audio locally, this error is always reported. I tried using RtmpCamera1 to record audio and video successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant