如何从另一台计算机查看我通过 wpf 上的表达式编码器 SDK 发布的实时流?

发布于 2024-11-30 21:41:00 字数 1540 浏览 1 评论 0原文

所以我对此缺乏知识问题。

我目前正在流式传输我的网络摄像头并尝试在 WPF 上制作一个小型会议应用程序。我可以通过在计算机上执行 轻松查看流式视频。

但由于我缺乏知识,我不知道在外部计算机上写什么来代替 http://localhost:8080 。我试图写我的外部IP地址,我试图写我的本地网络IP与同一网络上的计算机。他们都没有工作。

总而言之,我需要知道如何从世界各地访问我的流(哇,这听起来非常像 IP)。

这是我编写的用于广播我的流的代码;

                _job = new LiveJob();
                EncoderDevice videoDev = null;
                foreach (EncoderDevice ved in EncoderDevices.FindDevices(EncoderDeviceType.Video))
                    if (ved.Name == VideoDevices.SelectedItem.ToString())
                        videoDev = ved;

                EncoderDevice audioDev = null;
                foreach (EncoderDevice aed in EncoderDevices.FindDevices(EncoderDeviceType.Audio))
                    if (aed.Name == AudioDevices.SelectedItem.ToString())
                        audioDev = aed;

                // preset, editting etc..
                _job.ApplyPreset(LivePresets.VC1HighSpeedBroadband16x9);

                LiveDeviceSource deviceSource = _job.AddDeviceSource(videoDev, audioDev);
                _job.ActivateSource(deviceSource);

                PullBroadcastPublishFormat outputFormat = new PullBroadcastPublishFormat();
                outputFormat.BroadcastPort = 8080;
                outputFormat.MaximumNumberOfConnections = 10;
                _job.PublishFormats.Add(outputFormat);

                _job.StartEncoding();

很抱歉我的解释不好,感谢您的帮助!

So i have a lack of knowledge issue with this.

I'm currently streaming my webcam and trying to do a small conferencing application on WPF. I can easily see the streamed video by doing <MediaElement Name="VideoControl" Source="http://localhost:8080"/> on my computer.

But i don't know what to write instead of http://localhost:8080 on an external computer because of my lack of knowledge. I've tried to write my external ip address, i've tried to write my local network ip with a computer on the same network. None of them has worked.

To sum up, i need to know how to access my stream from anywhere around the world (wow that sounded extremely like IP).

Here is the code i wrote to broadcast my stream;

                _job = new LiveJob();
                EncoderDevice videoDev = null;
                foreach (EncoderDevice ved in EncoderDevices.FindDevices(EncoderDeviceType.Video))
                    if (ved.Name == VideoDevices.SelectedItem.ToString())
                        videoDev = ved;

                EncoderDevice audioDev = null;
                foreach (EncoderDevice aed in EncoderDevices.FindDevices(EncoderDeviceType.Audio))
                    if (aed.Name == AudioDevices.SelectedItem.ToString())
                        audioDev = aed;

                // preset, editting etc..
                _job.ApplyPreset(LivePresets.VC1HighSpeedBroadband16x9);

                LiveDeviceSource deviceSource = _job.AddDeviceSource(videoDev, audioDev);
                _job.ActivateSource(deviceSource);

                PullBroadcastPublishFormat outputFormat = new PullBroadcastPublishFormat();
                outputFormat.BroadcastPort = 8080;
                outputFormat.MaximumNumberOfConnections = 10;
                _job.PublishFormats.Add(outputFormat);

                _job.StartEncoding();

I'm sorry for my bad explanation, Thanks for the help!

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

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

发布评论

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

评论(1

帅冕 2024-12-07 21:41:00

从来没有人回答过这个问题吗?

你有让它发挥作用吗?如果您无法使用 VLC 播放器打开 LAN 中另一台计算机的流,我认为您的防火墙是拦截器。

当网络出现问题时,请务必关闭所有设备,以便您的设备正常工作,然后一项又一项地恢复。这样您就可以找出哪个防火墙/设置阻止了您。

一旦让它在 LAN 中工作,请尝试从家庭网络之外的计算机上进行尝试。如果您尝试从 LAN 内部访问调制解调器/路由器的外部 IP,并非所有路由器/调制解调器都支持将您重新路由回网络。您的外部IP可以在whatismyip.com或类似网站上找到。

因此,您可能必须依靠其他人的帮助或尝试一些 VPN 解决方案来测试从网络外部到外部地址的连接。

Noone ever answered this?

Did you ever get it to work? If you could not open the stream from another computer in your LAN with VLC player, I would think your firewall is the blocker.

Allways when having issues with networking, turn off EVERYTHING so your stuff works, then turn back one and one. That way you get to find out which firewall/setting that is blocking you.

Once you get it to work in LAN, try from a machine outside your home network. Not all routers/modems support rerouting you back into your network if you try to access the external IP of your modem/router from inside your LAN. Your external IP can be found at whatismyip.com or similar sites.

So you will probably have to rely on help from someone else or try out some VPN solution to test conenction to your external address from outside your network.

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