我正在尝试通过pulseaudio和VLC创建HTTP音频流:
cvlc -vvv pulse://alsa_output.pci-0000_00_05.0.analog-stereo.monitor --sout '#transcode{acodec=vorbis,ab=128,channels=2}:standard{access=http,dst=0.0.0.0:8888/audio.ogg}'
这工作正常,但我不希望音频在主机上播放。我可以停止正在播放的音频设置一个空接收器,但我不能让这个空接收器由VLC流传输。
例如,如果我设置一个名为fake的null接收器并运行命令:
cvlc -vvv pulse://fake --sout '#transcode{acodec=vorbis,ab=128,channels=2}:standard{access=http,dst=0.0.0.0:8888/audio.ogg}'
我明白了:
[0x7f03184cc1d8] pulsesrc demux error: cannot connect record stream: No such entity
[0x7f03184cc1d8] main demux debug: no access_demux modules matched
[0x7f0314003f58] main input debug: creating access 'pulse' location='fake', path='(null)'
[0x7f03184cc1d8] main access debug: looking for access module matching "pulse": 25 candidates
[0x7f03184cc1d8] main access debug: no access modules matched
[0x7f0314003f58] main input error: open of `pulse://fake' failed
[0x7f0314003f58] main input error: Your input can't be opened
[0x7f0314003f58] main input error: VLC is unable to open the MRL 'pulse://fake'. Check the log for details.
有什么办法可以实现吗?