bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.42k stars 1.57k forks source link

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

Open xiaozhanzzz opened 11 months ago

xiaozhanzzz commented 11 months ago

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?