关于wmv文件播放 [英] about wmv file playing

查看:77
本文介绍了关于wmv文件播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何自动播放存储在sqlserver中的wmv文件,使用windows media control plz帮助我非常紧急,我使用播放列表从数据库中获取记录但是它显示错误提到url将url放在哪里sqldatasource

这是代码

how to play a wmv file automatically which is stored in the sqlserver,using windows media control plz help me it is very urgent,i used playlist to fetch the records from database but it show error to mention url where to put url in sqldatasource
This is the Code

<%@ Page Language="VB"  Debug ="true"  AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default"  %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

    Namespace="System.Web.UI" TagPrefix="asp" %>

<%@ Register Assembly="ASPNetVideo.NET2.AJAX" Namespace="ASPNetVideo" TagPrefix="ASPNetVideo" %>
<%@ Register Assembly="ASPNetMediaGUI.NET2" Namespace="ASPNetMediaGUI" TagPrefix="ASPNetMediaGUI" %>

<!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 runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp;</div>
        <br />
        <br />
        <br />
        &nbsp; &nbsp;
        <ASPNetVideo:WindowsMedia ID="WindowsMedia1" runat="server" Style="z-index: 28; left: 0px;
            position: absolute; top: 0px" >
        </ASPNetVideo:WindowsMedia>
        <ASPNetMediaGUI:PlayList ID="PlayList1" runat="server" AutoGenerateColumns="False"

            DataSourceID="SqlDataSource1" MediaPlayer="WindowsMedia1" PlayState="Play" SelectedTrack="1"

            ShowHeader="False" Style="z-index: 58; left: 0px; position: absolute; top: 0px">
            <Columns>
                <asp:BoundField DataField="adname" HeaderText="adname" SortExpression="adname" />
            </Columns>
        </ASPNetMediaGUI:PlayList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:digitalConnectionString %>"

            SelectCommand="SELECT [adname] FROM [upload]"></asp:SqlDataSource>
        &nbsp;<br />
        &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp; &nbsp;
    </form>

</body>
</html>







这是错误消息

SqlDataSource1属性''url''在DataSource中找不到。与此控件一起使用的所有DataSource必须包含''url''属性




This is The Error message
SqlDataSource1 Property ''url'' not found in DataSource. All DataSources used with this control must contain a ''url'' attribute

推荐答案

ConnectionStrings:digitalConnectionString %>

< span class =code-attribute> SelectCommand = SELECT [adname] FROM [upload] > < / asp:SqlDataSource >
& nbsp; < span class =code-keyword>< br / >
& nbsp;& nbsp;& nbsp; & nbsp; & nbsp; & nbsp; & nbsp;
& nbsp; & nbsp;
< / form >

< / body >
< / html >
ConnectionStrings:digitalConnectionString %>" SelectCommand="SELECT [adname] FROM [upload]"></asp:SqlDataSource> &nbsp;<br /> &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </form> </body> </html>







这是错误消息

SqlDataSource1属性''url''在DataSource中找不到。与此控件一起使用的所有DataSource必须包含''url''属性




This is The Error message
SqlDataSource1 Property ''url'' not found in DataSource. All DataSources used with this control must contain a ''url'' attribute


WMV媒体容器和相同名下的编解码器(我知道3个不同版本)可以提供非常好的视频质量,特别是对于相当低的比特率。问题是这些容器格式和编解码器是专有的。您可以自由地使用它们进行转换和播放,但它们不适合Web。 Web需要开放格式。



有关详细信息,请参阅我最近对您的问题密切相关的视频容器格式和编解码器的答案:

HTML5和Mime,直播视频? [ ^ ]。



另外,请参阅上面的帖子参考,并注意我使用ffMpeg或libavcodec实用程序进行媒体转换的建议。有广泛的普遍性。它们很可能会帮助您重新掌握视频记录,以便在Web应用程序中正确显示它们。



我认为这是一种方法走。您可以使用这些实用程序重新构建视频,同时考虑当前或未来的Web要求。就重新掌握而言,让我引用我上面提到的答案:选择好的编码参数集以在文件大小和质量之间提供合理的权衡是一首单独的歌曲。你可能需要试验一段时间并阅读一些实用建议以获得足够的经验。



-SA
The WMV media container and the codecs under same umbrella name (I know some 3 different versions) can provide really good video quality, especially for reasonably low bit rate. The problem is that these container format and codecs are proprietary. You can freely use them for conversion and playing, but they are unsuitable for the Web. Web requires open formats.

For further detail, please see my recent answer of video container formats and codecs, closely related to your question:
HTML5 and Mime, Streaming a video?[^].

Also, see the post reference above and pay attention for my recommendations to use ffMpeg or libavcodec utilities for media conversion. There are widely universal. It''s very likely that they will help you to re-master your video records to present them properly in your Web applications.

I think this is a way to go. You can re-master your video using these utilities taking into account present-day or future Web requirements. As far as re-mastering is concerned, let me quote my own answer referenced above though: "The selection of good sets of encoding parameters to provide a reasonable trade-off between size of the file and quality is a separate song. You may need to experiment for a while and read some practical recommendation to gain enough experience."

—SA


这篇关于关于wmv文件播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆