VLC 和即时消息传递问题

发布于 2024-09-29 16:59:16 字数 721 浏览 3 评论 0原文

我以前曾问过这些问题,但没有得到正确的答案。我希望我能在这里得到一些回应。

我正在用 python 开发一个即时通讯工具,我想用 VLC 处理视频/音频流。现在的基本想法是,在每个 IM 客户端中,我运行一个 VLC 实例,它充当服务器,向我想要的所有用户传输流,另一个 VLC 实例作为客户端,接收并显示其他用户的所有流。发送给我。正如您所看到的,这是一种 P2P 连接,我遇到了很多问题。

我的第一个问题是 VLC 每个端口只能处理一个流,但我使用 VLM 解决了这个问题,Videolan Manager 允许一个实例和一个端口上的多个流。

我的第二个问题是这种 P2P 有几个缺点,就像有人在 NAT 或路由器后面一样,你必须手动配置才能将包从路由器转发到你的 PC,而且它还有另一个缺点,你只能转发到 1 台 PC,因此您只能在一台工作站上使用该程序。

此外,流是通过 HTTP 协议传输的,该协议使用 TCP,而且速度相当慢。当我尝试对 RTSP 执行相同操作时,我无法在我的专用 LAN 之外获取流。

所以,像我这样的业余爱好者不太可能成功实现这个 P2P 方案,因为它具有所有典型的 NAT 穿越问题,我不想搞乱这些问题,因为这不是一个商业应用程序,只是一个学校项目我必须完成才能以技术员身份毕业。最后,有人建议我使用一个众所周知的 IP 中的服务器,这样就可以解决问题,只需配置一个路由器,并让会话的两端都是客户端。我不知道如何实现这个想法,请任何帮助都是有用的。提前致谢。抱歉有任何错误,我不是编程/网络专家,也不是说英语的人。

I've have asked these questions before with no proper answer. I hope I'll get some response here.

I'm developing an instant messenger in python and I'd like to handle video/audio streaming with VLC. Tha basic idea right now is that in each IM client I'm running one VLC instance that acts as a server that streams to all the users I want, and another VLC instance that's a client and recieves and displays all the streams that other users are sending to me. As you can see, it's kind of a P2P connection and I am having lots of problems.

My first problem was VLC can handle only one stream per port, but I solved this using VLM, the Videolan Manager which allows multiple streams with one instance and on one port.

My second problem was this kind of P2P take has several drawbacks as if someone is behind NAT or a router, you have to do manual configurations to forward the packages from the router to your PC, and it also has another drawback, you can only forward to 1 PC, so you would be able to use the program in only one workstation.

Also, the streams were transported in HTTP protocol, which uses TCP and it's pretty slow. When I tried to do the same with RTSP, I wasn't able to get the stream outside my private LAN.

So, this P2P take is very unlikely to be implemented successfully by an amateur like me, as it has all the typical NAT traversal problems, things that I don't want to mess with as this is not a commercial application, just a school project I must finish in order to graduate as a technician. Finally, I've been recommended to a use a server in a well known IP and that would solve the problem, only one router configuration and let both ends of the conversations be clients. I have no idea how to implement this idea, please any help is useful. Thanks in advance. Sorry for any error, I am not a programming/networking expert nor am I an english-speaking person.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心在旅行 2024-10-06 16:59:16

我认为他们建议你在没有阻塞端口的局域网上运行你的程序。

I think they were suggesting you run your program on a LAN which has no ports blocked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文