如何使用 ffmpeg -i hw:0,2 将音频添加到我的流中不起作用

如何使用 ffmpeg -i hw:0,2 将音频添加到我的流中不起作用

我尝试将我的桌面音频传输到 icecast,但出现此错误

[alsa @ 0x561796555320] ALSA buffer xrun.

这是我的命令

ffmpeg -video_size 1680x1050 -framerate 25 -f x11grab -i :0.0 -f alsa -sample_rate 48000 -channels 2 -i hw:0,2 -f webm -r 25 -s 1280x800 -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm -c:v libvpx -b:v 1M -crf 30 -g 125  -deadline good -threads 4 icecast://source:hackme@localhost:8000/live.webm

这是我的音频设备列表,我不知道如何选择正确的设备,我不会从我的后置音频中播放音频,我的后置音频有 2.1 音频设置

arecord -L

default
    Playback/recording through the PulseAudio sound server
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=Intel
    HDA Intel, ALC883 Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC883 Analog
    Front speakers
dmix:CARD=Intel,DEV=0
    HDA Intel, ALC883 Analog
    Direct sample mixing device
dmix:CARD=Intel,DEV=2
    HDA Intel, ALC883 Alt Analog
    Direct sample mixing device
dsnoop:CARD=Intel,DEV=0
    HDA Intel, ALC883 Analog
    Direct sample snooping device
dsnoop:CARD=Intel,DEV=2
    HDA Intel, ALC883 Alt Analog
    Direct sample snooping device
hw:CARD=Intel,DEV=0
    HDA Intel, ALC883 Analog
    Direct hardware device without any conversions
hw:CARD=Intel,DEV=2
    HDA Intel, ALC883 Alt Analog
    Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
    HDA Intel, ALC883 Analog
    Hardware device with all software conversions
plughw:CARD=Intel,DEV=2
    HDA Intel, ALC883 Alt Analog
    Hardware device with all software conversions

相关内容