How use asp.net get video duration

Posted by mhmt on Stack Overflow See other posts from Stack Overflow or by mhmt
Published on 2010-06-10T08:49:49Z Indexed on 2010/06/10 8:52 UTC
Read the original article Hit count: 327

Filed under:
|
|
|
    using Microsoft.DirectX.AudioVideoPlayback;

    Video vvideo = new Video(FileUpload.FileName.ToString());
    StringBuilder sb = new StringBuilder();
    sb.Append(duration.toString());
    error message;

“Installed an access attempt was made to the application domain.”

“vvideo” instance is created error msj ://

But down found cods I found a working code in c #. but asp.net does not work

string file1 = "c://ds.mpeg"
    IMediaPosition m_objMediaPosition = null;
    FilgraphManager m_objFilterGraph = new FilgraphManager();
    m_objFilterGraph.RenderFile(filename);
    m_objMediaPosition = m_objFilterGraph as IMediaPosition;

    int s = (int)m_objMediaPosition.Duration;
    int h = s / 3600;
    int m = (s - (h * 3600)) / 60;
    s = s - (h * 3600 + m * 60);

I DON'T TAKE VIDEO DURATION BOYS :/

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about get