[FFmpeg-user] How to set alsa audio sample format

Simon Roberts simon at dancingcloudservices.com
Sat Jul 18 01:24:43 EEST 2020


I'm recording currently using -f alsa -i plughw:... and that works,
however, it's my understanding that the plughw involves some software
conversions that I likely don't need. I would like to try to get this
to work with -i hw...

My problem is that I can't work out what part of the documentation
would tell me:

a) what command line element (and in what location) I would use to
configure this, and,
b) what the options for the parameter for this element might be.

So far, by random poking around, I discovered that if I enter:

ffmpeg -sample_fmts

I get a list of what look like sound formats, like s16, s32, s16p and
more. I tried every one of these values after -sample_fmt on my
command line and every one of them was rejected as "cannot set sample
format 0x10000 2".

Any guidance would be greatly appreciated.



-- 
Simon Roberts
(303) 249 3613


More information about the ffmpeg-user mailing list