Article 4S5F8 audio redirection into fifo

audio redirection into fifo

by
kzo81
from LinuxQuestions.org on (#4S5F8)
Hi,

I'd like to stream and record at the same time on my laptop, first I'd devide the audio to 2 fifos:

Code:#!/bin/bash

rm -rf /tmp/streaming 2 >/dev/null && mkfifo /tmp/recording 2 >/dev/null
rm -rf /tmp/recording 2 >/dev/null &&mkfifo /tmp/recording 2 >/dev/null

arecord -c 2 -f S16_LE -r 48000 | ffmpeg -i - -f wav pipe:3 -f wav pipe:4 3> /tmp/recording 4> /tmp/streaming &Here is my only working solution, but it has way to much overhead, it consumes the CPU cores:
https://pastebin.com/mub4HCjM

and than I would test the fifos one-by-one:
Code:cat /tmp/recording_fifo > arecord -c 2 -f S16_LE -r 48000 -d 10 /mnt/data/recordings/2019-10-09/recording_fifo_test.wavI got this error: -sh: arecord: Text file busy

Could you please help me a bit?latest?d=yIl2AUoC8zA latest?i=7j_uLwn935I:vaNWG5eqaNY:F7zBnMy latest?i=7j_uLwn935I:vaNWG5eqaNY:V_sGLiP latest?d=qj6IDK7rITs latest?i=7j_uLwn935I:vaNWG5eqaNY:gIN9vFw7j_uLwn935I
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments