I recently compiled ffmpeg 2.7 for Arduino Yun to record audio since it provides creation of segments. I had compiled ffmpeg with libmp3lame support to record in mp3 format.
I am able to record in mp2 format without any buffer overrun. If I try to record in mp3 format using the libmp3lame encoder, it results in a lot of buffer overruns.
I read through the ffmpeg documentation and tried changing the buffer size, bitrate etc but no luck in avoiding buffer overrun.
I also attempted to re-encode the mp2 file to mp3 file after the completion of recording. It takes forever to finish re-encoding. The Yun records for 10 hours every day. Is there anyway to record in mp3 format without buffer overrun? I also tried vorbis encoder but no luck.