有人知道如何将 alsa 设备名称传递给 cvlc 吗?我做到了
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=SB
HDA ATI SB, VT1708S Analog
Default Audio Device
sysdefault:CARD=SB
HDA ATI SB, VT1708S Analog
Default Audio Device
front:CARD=SB,DEV=0
HDA ATI SB, VT1708S Analog
Front speakers
surround40:CARD=SB,DEV=0
HDA ATI SB, VT1708S Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
HDA ATI SB, VT1708S Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
HDA ATI SB, VT1708S Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
HDA ATI SB, VT1708S Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
HDA ATI SB, VT1708S Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=SB,DEV=0
HDA ATI SB, VT1708S Digital
HDMI Audio Output
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
HDMI Audio Output
然后编辑vlcrc
alsa-audio-device=front:CARD=SB,DEV=0
我也尝试一下
alsa-audio-device=front:CARD=SB,DEV=0,0
但是当我运行 cvlc 时,给我的设备不存在,为什么?问题仅出现在 cvlc 上,而不出现在 vlc gui 上 这是详细的输出 cvlc
VLC media player 2.0.6 Twoflower (revision 2.0.6-0-gbe9623c)
[0x1940e28] dummy interface: using the dummy interface module...
[0x7f502cc01ad8] main demux error: corrupt module: /usr/lib64/vlc/plugins/demux/libmpc_plugin.so
[0x7f502cc01ad8] main demux error: corrupt module: /usr/lib64/vlc/plugins/demux/libsid_plugin.so
[0x7f502cc02a28] main decoder error: corrupt module: /usr/lib64/vlc/plugins/codec/libfluidsynth_plugin.so
[0x7f500c0069c8] main audio output error: corrupt module: /usr/lib64/vlc/plugins/audio_output/libpulse_plugin.so
Fontconfig warning: FcPattern object size does not accept value "0"
ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library (null)
ALSA lib conf.c:3777:(snd_config_update_r) hooks failed, removing configuration
[0x7f500c0069c8] alsa audio output error: cannot open ALSA device "sysdefault:CARD=SB": No such file or directory
[0x7f500c0069c8] main audio output error: Audio output failed
[0x7f500c0069c8] main audio output error: The audio device "sysdefault:CARD=SB" could not be used:
No such file or directory.
[0x7f500c0069c8] oss audio output error: cannot open audio device (/dev/dsp)
[0x7f500c0069c8] main audio output error: no suitable audio output module
Fontconfig warning: FcPattern object size does not accept value "0"
[0x7f502cdd4798] main decoder error: failed to create audio output
^Clibgcc_s.so.1 must be installed for pthread_cancel to work
A
答案1
因为设备名称是front
;该CARD=SB,DEV=0
部分告诉您它对应于哪个设备。
你需要做类似的事情alsa-audio-device=front
。
VLC,至少在我的测试中,将采用front
或front:CARD=SB,DEV=0
。但是,如果设备实际上无法使用,则会出错。例如,aplay -L
会很高兴地列出没有插入任何东西的 HDMI 端口,但尝试播放它们会产生“没有这样的文件或目录”错误。