I'm using the command line to record sound from a USB webcam, and it is almost working (sound is being recorded), however there is an issue with arecord: even when using the -d (--duration) option, the process does not terminate.

The command-line I'm using is the following:

arecord -D plughw:1,0 -f cd --duration=1

(I've omitted the piping to lame, since it is irrelevant here.)

Because the output is being written to stdin, I can see lots of garbage being output (as expected), and then after 1 second (or any other interval I choose), the output stops, but the process is still running. I have to Ctrl+C to terminate it.

I tried the same exact command-line (using the same webcam) on my desktop, and it works as intended: the process terminates after the specified duration. It also terminates when using other sound devices.

The issue seems to be specific to the Raspberry Pi, e.g. some driver, or arecord (arecord --version outputs arecord: version 1.0.28 by Jaroslav Kysela <perex@perex.cz> on my Pi 3, while it is 1.1.4 on my desktop), or something else.

Is this a known issue? Is there something specific that needs to be done on the RPi to ensure that arecord terminates?

  • 1
    I had the same problem, and I fixed it by downloading older version of arecord. Reference: blog.nagimov.com/… – 蔡霈萱 Nov 30 '17 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.