arecord duration bug and workaround

It seems, that "arecord" from "alsa-utils 1.0.28-1" has a bug if setting the duration in the command (-d). After the given duration, the recorded files disappears and multiple files are created every second.

I did not want to downgrade, so I used the command "timeout" in order to substitute the buggy -d flag; e.g. for recording 10 seconds:


timeout 10s arecord [flags except duration flag] [filename]

2 thoughts on “arecord duration bug and workaround

  1. Daniel Ribeiro

    Hello Alex, thanks so much for the tip!
    I was miserably lost in terrible and buggy solutions like:

    (arecord -D hw:0,0 -f cd --duration 10 file.wav)&
    sleep 1
    pkill arecord

Leave a Reply

Your email address will not be published. Required fields are marked *