我正在尝试使用 ffmpeg 进行屏幕录制和录制应用程序声音。但是,我无法录制应用程序声音。我认为我的命令有问题。我正在做的是这样的:
ffmpeg -f alsa -i hw:0,0 -f x11grab -i :0.0 out.mpg
因此,我需要了解 0 和 0 的含义hw:0,0
。当我这样做时,arecord -l
输出是:
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CX20585 Analog [CX20585 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
输出aplay -l
为:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CX20585 Analog [CX20585 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
输出给出了许多0
值。我不知道该输入哪一个,hw:#,#
以便ffmpeg
可以录制应用程序声音。
答案1
第一个0
是卡,第二个0
是设备,如输出所列arecord -l
:
card 0: PCH [HDA Intel PCH], device 0: CX20585 Analog [CX20585 Analog]