无法使用vlc ocx播放媒体

问题描述 投票:2回答:5

我想将vlc媒体播放器嵌入到我发现很多解决方案的.NET应用程序中

  1. VLC .Net界面
  2. dll功能的包装器<>
  3. http://vlcdotnet.codeplex.com这很好
  4. VLC的activex-我真的很喜欢使用它,它应该包含较少的错误和错误,但发现的错误

我发现2个控件“ VLC ActiveX插件和IE Web插件v1”,“ VLC ActiveX插件和IE Web插件v2”它们之间有什么区别?我拖放了拳头,并使用了以下代码

axVLCPlugin1.addTarget(@"D:\video\English\10,000.b.c\10000bc.rmvb", null, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666);
axVLCPlugin1.play();

没有效果我拖放了第二个,并使用了以下代码

axVLCPlugin21.playlist.add(@"D:\video\English\10,000.b.c\10000bc.rmvb");
axVLCPlugin21.playlist.play();
//i also tried this
axVLCPlugin21.playlist.playItem(0);

也没有效果

我没有找到VLC OCX的许多详细信息和文档错误是什么?

c# media-player vlc ocx
5个回答
2
投票

[v1 of the ActiveX is deprecatedv2 is primarily for browser integration因此不能像您尝试的那样使用...

使用http://vlcdotnet.codeplex.com/-这是一个运行良好的库...


1
投票

可能是文件格式。我还尝试使用这两个ActiveX控件在MFC应用程序中播放媒体文件。它适用于.avi和mp3格式,不适用于mp4格式。而且,如果我没记错的话,由于某些版权问题,默认情况下,VLC本身没有.rmvb格式的编解码器。


1
投票

解决方案很简单:您需要一个uri,而不是常规路径

此:

var uri = new Uri(@"D:\video\English\10,000.b.c\10000bc.rmvb");
var converted = uri.AbsoluteUri;
axVLCPlugin21.playlist.add(converted);

你去。


1
投票

插件(v1和v2)在c#.net中工作正常。 v2更好。

您需要在链接之前使用"file:///"

axVLCPlugin1.addTarget(@"file:///D:\video\English\10,000.b.c\10000bc.rmvb", null, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666);

0
投票

致Martijn Pieters非常感谢你!!!什么可以帮助解决我的问题,您删除了我的问题,彼得?!

此帖子已隐藏。 9分钟前,Martijn Pieters♦将其删除。我有DVR。我可以用没有密码的访客登录http://ip-my-dvr。它在Web.OCX上打开新窗口,我可以看到我的模拟凸轮。我可以输入到uri来获取从DVR到VLC播放器的流的信息吗?

© www.soinside.com 2019 - 2024. All rights reserved.