1

I'm using this command to record audio in Linux Fedora 23

/usr/bin/arecord -d 11400 -D hw:1,0 -f S32_LE -c2 -r48000 -t wav | lame -b 192 - longrec.mp3 >> output.txt 2>&1 & echo $!

Basically I want an mp3 record of 3 hours and 10 minutes (11400 seconds) from the input soundcard. Everything works fine when started, but it always stops after 1h33m12s. File output.txt shows nothing of any interest:

LAME 3.99.5 64bits (http://lame.sf.net)
Using polyphase lowpass filter, transition band: 18774 Hz - 19355 Hz
Encoding <stdin> to longrec.mp3
Encoding as 48 kHz j-stereo MPEG-1 Layer III (8x) 192 kbps qval=3

Any clue of what the problem is?

Miro Barsocchi
  • 343
  • 1
  • 3
  • 15
  • Have you determined whether the problem is in `arecord` or downstream? E.g. by putting `time` in front and not piping to `lame`. Downstream could include pipe buffering problems, though. – Walter Tross Feb 25 '17 at 15:54
  • I'm testing with only the first part of the command: /usr/bin/arecord -d 11400 -D hw:1,0 -f S32_LE -c2 -r48000 -t wav I will let you know after 3 hours – Miro Barsocchi Feb 25 '17 at 17:11

1 Answers1

1

[SOLVED] instead of using arecord I have switched to ffmpeg, command:

ffmpeg -f pulse -i alsa_input.usb-Focusrite_Scarlett_Solo_USB-00.analog-stereo -t 11400 -c:a libmp3lame -b:a 192k longrec.mp3

Has the same effect as arecord one and it also doesn't block sound-card resource (I can run multiple ffmpeg record instance from the same source, while with arecord I can do only one).

Miro Barsocchi
  • 343
  • 1
  • 3
  • 15