Months ago I would occasionally record little snippets of audio as FLAC files using ffmpeg and ALSA. I used a command that looked more or less like this:

ffmpeg -f alsa -ar 48000 -ac 1 -acodec flac -i hw:0 testfile.flac

(hw:0 being my microphone's card via arecord -l)

If memory serves, there was one other option in there somewhere that made the difference, but I can't tell what it would've been. It might've been similar to the --format options for arecord? I even dug through every single option in ffmpeg to see if I would find something familiar; no dice. Either way, now ALSA just screams that sample format 0x1500c is not supported… whatever that means.

However, if I remove the -acodec flac option and change the file name to testfile.wav everything works like a charm. Except, of course, I don't get the file format I had intended.

I'm very confident I still have all the necessary packages installed, but I can't for the life of me get this thing to cooperate!


1 Answer 1


Ffmpeg is capable of applying the same options to different inputs and outputs, which result in ffmpeg being sensitive to the position of the options.

The following will use your settings and output to a FLAC file (recognized by the file ending):

ffmpeg -f alsa -ar 48000 -ac 1 -i hw:0 testfile.flac

The settings are applied to the next input or output, so while it is not needed in your example, you can use the -acodec after listing your input files or streams, and before your output e.g.:

ffmpeg -f alsa -ar 48000 -ac 1 -i hw:0 -acodec flac testfile.flac

You must log in to answer this question.

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