0

On linux (ubuntu) I want to record basically as low a quality and small audio file I can for some long recordings. So long as the audio is discernable and not so bad it's irritating to listen to (scratchy or something) I want to make it as small as possible.

It seems like the -f parameter controls this, and there are a number of formats listed, however I can't find any documentation on what they really represent as far as quality.

Does anyone know the proper flag(s) for this? I might add I don't really care if it's arecord or rec, or some other sound recording app. So long as it's recording audio from my browser, like arecord does, that works.

thanks

2 Answers 2

0

Short description:

  • S/U Signed or unsinged format (You'll go with signed)
  • 8/16/24/32 number of bits per sample (8 should do)
  • BE/LE Big endian or little endian

for speech S8 would be ok, with 1 channel -c1 and -r22050 sample rate.

Your soundcard won't be able to output all formats, so you'll have to check.

0

arecord will output a .wav file. That is fixed bitrate uncompressed audio. The worst case if file size matters.

If you want to reduce the size of the file then the only solution you get with arecord is to lower the number of bits per sample and the sampling frequency as shown in @stoney's answer.


I suggest you use ffmpeg instead which will enable you to encode the audio on the fly at a variable bitrate and therefore enabling much better quality/filesize ratios : See, in particular in the doc linked hereabove how to :

  • Set the audio quality (codec-specific, VBR) with the -aq parameter
  • Set the audio codec with the -acodec parameter
1
  • thanks i found something like this: ffmpeg -f alsa -ac 2 -i default -acodec libmp3lame -ab 8k audio.mp3 works, and as near as i can tell is about as small as i can get Mar 10, 2022 at 1:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .