LiveTalking icon indicating copy to clipboard operation
LiveTalking copied to clipboard

连接中...,画面一直黑屏,怎么解决

Open wzr0108 opened this issue 4 months ago • 3 comments

Image

Using cuda for inference.
INFO:logger:Namespace(fps=50, l=10, m=8, r=10, W=450, H=450, avatar_id='wav2lip256_avatar1', batch_size=16, customvideo_config='', tts='edgetts', REF_FILE='zh-CN-YunxiaNeural', REF_TEXT=None, TTS_SERVER='http://127.0.0.1:9880', model='wav2lip', transport='webrtc', push_url='http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream', max_session=1, listenport=8010, customopt=[])
INFO:logger:Load checkpoint from: ./models/wav2lip.pth
/mnt/241hdd/wzr/LiveTalking/lipreal.py:52: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  checkpoint = torch.load(checkpoint_path) #,weights_only=True
INFO:logger:reading images...
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 550/550 [00:13<00:00, 42.08it/s]
INFO:logger:reading images...
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 550/550 [00:05<00:00, 96.37it/s]
INFO:logger:warmup model...
INFO:logger:start http server; http://<serverip>:8010/webrtcapi.html
INFO:logger:如果使用webrtc,推荐访问webrtc集成前端: http://<serverip>:8010/dashboard.html
INFO:logger:sessionid=851417, session num=1
INFO:logger:Connection state is connecting

远程ubuntu, vscode做了端口转发

wzr0108 avatar Aug 11 '25 06:08 wzr0108

没配置stun吧,如果不想配置,临时用,可以把信令里面的内网ip替换成你服务器的公网ip,虽然不推荐临时可以用,

转发得开放很多端口的,webrtc就不要尝试转发了,老老实实的用stun服务

const answer = await offerReq.json(); answer.sdp = answer.sdp.replace(/192.168.0.168/g, '147.94.111.111'); await this.peerConn.setRemoteDescription(answer);

zhengyiwei1987 avatar Aug 11 '25 07:08 zhengyiwei1987

我也遇到这个问题,定位到了是因为部署的机器是gpu资源机,没法和客户端直连,所以webrtc p2p模式会连接失败,显示连接中。

BeiLiu1 avatar Sep 01 '25 06:09 BeiLiu1

@wzr0108 请问解救了吗,我也遇到了一样的问题

Bitnoc12 avatar Oct 23 '25 05:10 Bitnoc12