我正在使用 Ubuntu 14.04。该aplay -L
命令产生以下输出。
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
Subdevices: 0/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 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: USB [Jabra SPEAK 510 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
当我使用以下命令通过默认输出音频设备播放 IP 摄像机产生的实时音频流时:
ffmpeg -i rtsp://operator:[email protected]/axis-media/media.amp?audio=1 -f alsa default
它工作正常。
但是当我尝试在定义的音频输出设备中播放它时,如下所示:
ffmpeg -i rtsp://operator:[email protected]/axis-media/media.amp?audio=1 -f alsa hw:0,0
我收到错误:
cannot open audio device hw:0,0 (Device or resource busy)
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error
当我尝试另一台设备时:
ffmpeg -i rtsp://operator:[email protected]/axis-media/media.amp?audio=1 -f alsa hw:2,0
这次我再次收到错误,但略有不同:
cannot set channel count to 1 (Invalid argument)
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error
我读过文档,但无法解决。你认为我做错了什么?
谢谢。