lipku / python_rtmpstream

python库,实现推送实时rtmp音视频流
MIT License
82 stars 26 forks source link

python test_stream.py报错 #12

Open OpenSorceYCW opened 7 months ago

OpenSorceYCW commented 7 months ago

按照说明进行环境配置后,当运行python test_stream.py进行测试时,运行到该处https://github.com/lipku/python_rtmpstream/blob/main/python/test_stream.py#L37, 报错信息如下: [tcp @ 0x21b7ec0] Connection to tcp://localhost:1935 failed: Connection refused [rtmp @ 0x21b7540] Cannot open connection tcp://localhost:1935 failed to open stream output context, stream will not work ALSA lib conf.c:4028:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory) ALSA lib control.c:1570:(snd_ctl_open_noupdate) Invalid CTL hw:0 ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_rate_samplerate.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_rate_samplerate.so: cannot open shared object file: No such file or directory) ALSA lib pcm_rate.c:1581:(snd_pcm_rate_open) Cannot find rate converter ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_rate_samplerate.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_rate_samplerate.so: cannot open shared object file: No such file or directory) ALSA lib pcm_rate.c:1581:(snd_pcm_rate_open) Cannot find rate converter ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_rate_speexrate.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_rate_speexrate.so: cannot open shared object file: No such file or directory) ALSA lib pcm_rate.c:1581:(snd_pcm_rate_open) Cannot find rate converter ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_rate_speexrate.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_rate_speexrate.so: cannot open shared object file: No such file or directory) ALSA lib pcm_rate.c:1581:(snd_pcm_rate_open) Cannot find rate converter ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_jack.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_jack.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_jack.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_jack.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_oss.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_oss.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_oss.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_oss.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_upmix.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_upmix.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_upmix.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_upmix.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_vdownmix.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_vdownmix.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_vdownmix.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_vdownmix.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_usb_stream.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_usb_stream.so: cannot open shared object file: No such file or directory) ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_usb_stream.so (/home/ycw/anaconda3/envs/nerfstream/lib/alsa-lib/libasound_module_pcm_usb_stream.so: cannot open shared object file: No such file or directory) 执行该代码时,相机可以正常调用到画面,请问这个错误应该如何解决,期待给出具体的解决方案,感谢!