首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在IIS服务器上通过身份验证的VLC Web插件?

在IIS服务器上通过身份验证的VLC Web插件?
EN

Stack Overflow用户
提问于 2011-12-15 07:56:56
回答 2查看 2.8K关注 0票数 0

在过去的一周里,我搜索了VLC论坛和几乎所有的google,试图找到一些关于这方面的信息,因为我在从IIS服务器上制作视频流时遇到了问题。遗憾的是,我无法找到解决方案,这就是为什么我在这里寻求帮助的原因。

我有一台运行在Windows 7 64位服务器/计算机上的IIS 7.5服务器。我使用Mozilla Firefox的VLC Web插件在浏览器中播放视频文件,但没有成功。还应该注意的是,我已经将MIME类型.mkv添加到IIS类型中作为video/x-matroska,所以这应该不是问题。另外,我已经给了每个用户对整个www文件夹和文件的完全访问权限,所以这应该也不是问题。我将其剪切为一个非常基本的超文本标记语言文件"index.html“,并将视频文件保存在超文本标记语言页面旁边。下面是我的HTML代码:

代码语言:javascript
复制
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/   xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Untitled Document</title> 
</head>

<body style="width:100%; height:100%;">

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2"
    width="720"
    height="405"
    autoplay="no"
    id="vlc"
    target="video.mkv">
</embed>

<script type="text/javascript">

   var vlc = document.getElementById("vlc");
   function mute(){
      vlc.audio.toggleMute();
   }
   function play(){
      vlc.playlist.play();
   }
   function stop(){
      vlc.playlist.stop();

   }
   function pause(){   
      vlc.playlist.togglePause();
   }
</script>

<br />
   <input type="button" onclick='play();' value="Play" /><br>
   <input type="button" onclick='pause();' value="Pause" /><br>
   <input type="button" onclick='stop();' value="Stop" /><br>   
   <input type="button" onclick='mute();' value="Mute" /><br>

</body>
</html>

这段代码可以很好地在本地运行,直接在Firefox中打开HTML文件,而无需使用web服务器。但是,一旦我把它放到IIS web服务器上,播放按钮就什么也不做了。它不能进行身份验证之类的。以下是我将视频URL从web服务器直接输入到VLC Media Player时来自VLC的日志:

代码语言:javascript
复制
qt4 warning: Input option: http-caching=1200
main debug: adding item `http://10.0.0.30/video.mkv' ( http://10.0.0.30/video.mkv )
qt4 debug: Adding a new MRL to recent ones: http://10.0.0.30/video.mkv
main debug: rebuilding array of current - root Spilleliste
main debug: rebuild done - 1 items, index -1
main debug: processing request item http://10.0.0.30/video.mkv node null skip 0
main debug: resyncing on http://10.0.0.30/video.mkv
main debug: http://10.0.0.30/video.mkv is at 0
main debug: starting new item
main debug: creating new input thread
main debug: Creating an input for 'http://10.0.0.30/video.mkv'
main debug: thread (input) created at priority 1 (../.././src/input/input.c:220)
main debug: thread started
main debug: using timeshift granularity of 50 MiB
main debug: using timeshift path 'C:\Users\myuser\AppData\Local\Temp'
main debug: `http://10.0.0.30/video.mkv' gives access `http' demux `' path `10.0.0.30/video.mkv'
main debug: creating demux: access='http' demux='' path='10.0.0.30/video.mkv'
main debug: looking for access_demux module: 0 candidates
main debug: no access_demux module matched "http"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: creating access 'http' path='10.0.0.30/video.mkv'
main debug: looking for access module: 2 candidates
access_http debug: http: server='10.0.0.30' port=80 file='/video.mkv'
main debug: net: connecting to 10.0.0.30 port 80
qt4 debug: IM: Setting an input
main debug: connection succeeded (socket = 1440)
access_http debug: protocol 'HTTP' answer code 401
access_http debug: Content-Type: text/html
access_http debug: Server: Microsoft-IIS/7.5
access_http debug: Authentication header: Negotiate
main warning: Unknown authentication scheme: 'Negotiate'
access_http debug: Authentication header: NTLM
main warning: Unknown authentication scheme: 'NTLM'
access_http debug: this frame size=1326
access_http debug: authentication failed for realm (null)
access_http debug: retrying with user=ServerAdmin
main debug: net: connecting to 10.0.0.30 port 80
main debug: connection succeeded (socket = 1440)
access_http debug: protocol 'HTTP' answer code 401
access_http debug: Content-Type: text/html
access_http debug: Server: Microsoft-IIS/7.5
access_http debug: Authentication header: Negotiate
main warning: Unknown authentication scheme: 'Negotiate'
access_http debug: Authentication header: NTLM
main warning: Unknown authentication scheme: 'NTLM'
access_http debug: this frame size=1326
access_http debug: authentication failed for realm (null)
main debug: net: connecting to 10.0.0.30 port 80
main debug: connection succeeded (socket = 1484)
access_mms error: error: HTTP/1.1 401 Unauthorized
main debug: no access module matching "http" could be loaded
main debug: TIMER module_need() : 11949.001 ms - Total 11949.001 ms / 1 intvls (Avg 11949.000 ms)
main debug: waitpipe: object killed
main error: open of `http://10.0.0.30/video.mkv' failed: (null)
main debug: finished input
main debug: thread ended
main debug: dead input
main debug: thread times: real 0m11.948683s, kernel 0m0.000000s, user 0m0.000000s
main debug: changing item without a request (current 0/1)
main debug: nothing to play
qt4 debug: IM: Deleting the input
main debug: TIMER input launching for 'http://10.0.0.30/video.mkv' : 11974.001 ms - Total 11974.001 ms / 1 intvls (Avg 11974.000 ms)

因此,从这个日志中我可以看到,VLC在通过windows NTLM登录身份验证向IIS服务器进行身份验证时遇到了问题。我还尝试在没有登录系统的情况下设置apache服务器,它成功地播放了我想要的文件,但为此我需要一个登录系统。

所以我的问题是,有没有办法通过NTLM登录方法来实现这一点?如果没有,我如何管理它,例如使用表单身份验证的ASP.net,或者使用会话的PHP,这并不重要,我只需要在登录系统后面有VoD流,我会自己弄清楚如何将登录信息连接到NTLM方法。

任何帮助都将不胜感激,因为我真的被困在这里了。

EN

回答 2

Stack Overflow用户

发布于 2012-06-29 15:45:22

VLC和will not不支持NTLM身份验证。

票数 1
EN

Stack Overflow用户

发布于 2013-08-05 23:59:19

也许已经晚了,但是,你可以使用cntlm(http://cntlm.sourceforge.net/)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8513437

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档