[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Swiss Army Knife of Sound has me Baffled.



Martin McCormick (12021-08-18):
> arecord: set_params:1345: Channels count non available
> sox FAIL formats: can't open input  `-': WAVE: RIFF header not found

If you read carefully, you will notice that your problem is not with
sox, it is with arecord: sox only fails because arecord fails and does
not produce anything.

arecord itself fails because "channels count not available": the sound
device you are using does not like mono, it obviously like only stereo.

You have two options:

- Use a sound device that supports mono. Since you cannot change your
  hardware, it needs to be done in software with an ALSA plugin. This is
  all streamlined, you only need to write plughw instead of hw.

- Keep recording in stereo, and have sox convert it to mono before
  saving. You will need to peruse the manual page of sox to know the
  option, I only ever use ffmpeg for obvious reasons.

Note that:

- If you use plughw instead of hw, then the ALSA plugin can also
  resample, and therefore you no longer needs sox at all.

- sox is capable of recording from ALSA directly, with something like
  "-t alsa plughw:0".

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature


Reply to: