Audio 在Linux中创建克隆输入音频设备

Audio 在Linux中创建克隆输入音频设备,audio,fedora,alsa,pulse,Audio,Fedora,Alsa,Pulse,我正在使用FEDORA电脑: 使用icecast客户端(BUTT)将音频流传输到web无线电服务器 使用arecord录制音频输入 我不能两者都做,因为音频输入完全是一个过程。这是我的音频配置: [root@FEDORA ~]# arecord -L null Discard all samples (playback) or generate zero samples (capture) pulse PulseAudio Sound Server default D

我正在使用FEDORA电脑:

  • 使用icecast客户端(BUTT)将音频流传输到web无线电服务器
  • 使用arecord录制音频输入
我不能两者都做,因为音频输入完全是一个过程。这是我的音频配置:

[root@FEDORA ~]# arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=USB
    Scarlett 2i2 USB, USB Audio
    Default Audio Device
front:CARD=USB,DEV=0
    Scarlett 2i2 USB, USB Audio
    Front speakers
surround21:CARD=USB,DEV=0
    Scarlett 2i2 USB, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
    Scarlett 2i2 USB, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
    Scarlett 2i2 USB, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
    Scarlett 2i2 USB, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
    Scarlett 2i2 USB, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
    Scarlett 2i2 USB, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
sysdefault:CARD=Loopback
    Loopback, Loopback PCM
    Default Audio Device
front:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    Front speakers
surround21:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
(代表OP发布)

使用指向我的原始和物理声卡的dsnoop,我可以通过arecord实现我想要的功能,例如:

arecord -D plug:dsnoop -t wav a.wav &

以及我的流媒体软件(butt),它们作为输入:

  • 默认PCM设备
  • 脉搏
  • 违约

在出现类似问题()后,我切换到了ffmpeg

icecast和您的未知音频录制程序是否都配置为使用PulseAudio?未知录制音频是一个简单的bash脚本,用于启动录制。Pulse audio是“可见”的,可对两者进行配置(通过设置-D标志在A记录上,通过GUI在butt上),但如果我将Pulse设置为一个,则另一个会在选择Pulse或“sysdefault:CARD=USB”设备时出错。我假设,
Pulse
将能够共享,但显然这在默认情况下未启用。无论如何,让我们忘掉PulseAudio吧,试着用这两种方法安装dsnoop。谢谢@CL。我已经阅读了文档,似乎是个不错的方法,但是dsnoop是我需要安装的东西吗(yum install…)或者它是我需要更新的其他包的一部分?使用
dsnoop
作为设备名称,而不是
default
sysdefault:…
arecord -D plug:dsnoop -t wav b.wav &