Avoid passing raw audio?

Hi,

I'm trying to record and encode PCM audio from my Pi Zero. I'm using arecord to record, and LAME to encode into mp3. However, I'm finding that the raw audio is too large - LAME can't take it quickly enough. As a result, arecord's buffer overruns, and I get frame drops.

Is there any way to record AND encode PCM audio in a single command?

Here is my current attempt; the following causes arecord to overrun:

/usr/bin/arecord -Dmic_sv -c2 -r48000 -fS32_LE -traw /tmp/temp_audio.v | lame -r /tmp/temp_audio.v /tmp/temp_audio.mp3 &

Posted Feb 16, 2017, 11:01 PM UTC · edited

31
Loading comments…