Search code examples
androidaudioffmpegjavacv

How to modify FFmpegFrameRecorder.java in javacv to support audio sample rate change?


I want to know if ffmpeg port from javacv supports audio sample rate change, and if so, I would need some guidelines for changing FFmpegFrameRecorder.java to support it.


Solution

  • Yes, it supports. Care should be taken in FFmpegFrameRecorder.java that SwrContext object is correctly configured and that the number of samples provided to avcodec_fill_audio_frame(..) match the codec input frame size.