javacv icon indicating copy to clipboard operation
javacv copied to clipboard

Use audio with encoding format aac to push to the SRS streaming server

Open xiaozhanzzz opened this issue 1 year ago • 0 comments

I encountered a problem in the development process. The Functional requirement is to obtain audio data through the sdk provided by the cartridge manufacturer. The audio data is continuously obtained through the callback method, and each time a frame of audio is returned, the format is a byte array, and the encoding is aac; I use JavaCV for streaming the RSR server. The current idea is to store the audio byte array obtained by the callback in a blocking queue, and start another thread to consume the queue audio data, which is streamed through FFmpegFrameRecorder. However, what I get from the streaming server is that kind of intermittent and harsh noise. I write the audio data as an AAC file and the streaming is playing normally. Can you provide some help?

xiaozhanzzz avatar Aug 03 '23 14:08 xiaozhanzzz