简体   繁体   English

在64位计算机上的VS2010中通过VLC播放RTSP

[英]Play RTSP through VLC in VS2010 on 64bit machine

I am trying to play an RTSP stream on a Win form application on a 64 bit windows machine. 我正在尝试在64位Windows计算机上的Win窗体应用程序上播放RTSP流。 I have added the VLC player as a COM component. 我已将VLC播放器添加为COM组件。 But when i even try to play a stored video file it does not play. 但是,当我什至尝试播放存储的视频文件时,它都不会播放。

axVLCPlugin1.addTarget("C:\\wildlife.wmv",
                       null,
                       AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo,
                       0);
axVLCPlugin1.play();

Am I missing anything? 我有什么想念的吗?

Try adding "file:///" before the filepath. 尝试在文件路径之前添加“ file:///”。 That should get it to play from a file. 那应该让它从文件中播放。

Once that works, you can use VLC to create an RTSP stream. 一旦可行,您就可以使用VLC创建RTSP流。
1. in VLC, go to Media->stream 1.在VLC中,转到“媒体”->“流”
2. Under the File tab, click "Add" and select a video you wish to stream. 2.在“文件”选项卡下,单击“添加”,然后选择要流式传输的视频。
3. At the bottom, there is a button with a dropdown. 3.在底部,有一个带下拉菜单的按钮。 Select stream and then click the button. 选择流,然后单击按钮。
4. A window will pop up showing the source file path. 4.将会弹出一个窗口,显示源文件路径。 Click "Next" 点击下一步”
5. This window is where you select the output. 5.在此窗口中,您可以选择输出。 Change the dropdown from "File" to "RTSP" and click "Add" 将下拉列表从“文件”更改为“ RTSP”,然后单击“添加”
6. Choose a port number and a path. 6.选择端口号和路径。 I will leave the port as 8554 and set the path to "/Test" 我将端口保留为8554,并将路径设置为“ / Test”
7. Click "Next" then click "Stream" You should see the VLC player start running, but the video will not play. 7.单击“下一步”,然后单击“流”。您应该看到VLC播放器开始运行,但视频不会播放。

If you want to test to make sure the stream is working properly you can open another instance of vlc to view the stream. 如果要测试以确保流正常运行,则可以打开另一个vlc实例以查看流。
1. Go to Media->Open Network Stream 1.转到媒体->打开网络流
2. enter "rtsp://127.0.0.1:8554/Test" as the network url. 2.输入“ rtsp://127.0.0.1:8554 / Test”作为网络URL。
3. Click play and it should begin streaming. 3.单击播放,它将开始流式传输。

After verifying that the stream is running, close the second instance of VLC and in your application, set those two lines of code to be: 验证流正在运行之后,关闭VLC的第二个实例,并在您的应用程序中,将这两行代码设置为:

axVLCPlugin1.addTarget("rtsp://172.16.10.50:8554/Test", null, VLCPlaylistMode.VLCPlayListReplaceAndGo, 0);
axVLCPlugin1.Play();

I did a lot of research and found out that this is the best solution for playing RTSP streams on windows 64 bit machine through VS2010 - VLCDotNet 我进行了大量研究,发现这是通过VS2010在Windows 64位计算机上播放RTSP流的最佳解决方案-VLCDotNet

I am still looking for something similar in C++. 我仍在寻找类似的C ++。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 vs2013 64bit中的AccessViolation异常不是vs2010 64bit中的 - AccessViolation Exception in vs2013 64bit not vs2010 64bit Registry API 32 vs 64bit,以及VS2010设置 - Registry API 32 vs 64bit, and VS2010 setup 如何在vs2010中为64位版本的办公室开发Microsoft office word addin - How to develop Microsoft office word addin for 64bit version office in vs2010 如何使用VS2010注册表编辑器创建针对64位操作系统的自定义注册表项“Programmable” - How to create custom registry key 'Programmable' targeted on 64bit OS with VS2010 registry editor VS2010成功加载了SOS.dll,但在我的64位OS上无法使用其他命令 - VS2010 loaded SOS.dll successfully but other commands can't be used on my 64bit OS SetValue 64 位机器注册表 - SetValue 64bit machine registry 适用于64位计算机的.NET扫描API - .NET Scanning API for 64bit machine 如何在64位计算机上运行64位Web应用程序 - How to run a 64 bit web application on a 64bit machine VS2010 在 64 位版本的 Windows 上的 WinForms 应用程序中不显示未处理的异常消息 - VS2010 does not show unhandled exception message in a WinForms Application on a 64-bit version of Windows 64位计算机上的32位COM dll - 32bit COM dlls on 64bit machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM