How to play FLV files in winform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siilexx
    New Member
    • Aug 2010
    • 19

    How to play FLV files in winform

    Hello,

    I'm building a multi-standard player, which randomly shows JPG, GIF, SWF,... files on screen, BUT I cannot find a way to play a FLV file in my winform.

    Could you please advise ?

    Thanks for your help.
  • adriancs
    New Member
    • Apr 2011
    • 122

    #2
    You may use DirectX to play the video.
    DirectX can play any type of video.

    1st You have to download DirectX SDK and get installed.
    Then, in your C# application, add a reference of
    Code:
    Microsoft.DirectX.AudioVideoPlayback
    In your C# code,
    at the top of your C# class (the form that will play the video
    add this:
    Code:
    using Microsoft.DirectX.AudioVideoPlayback;
    Use these codes to play the video:
    Code:
    Video myvideo = new Video("D:\\myflv.flv", false);
    myvideo.Owner = this.panel1;
    myvideo.Play();
    You may want to read this tutorial:

    Comment

    • siilexx
      New Member
      • Aug 2010
      • 19

      #3
      I've installed DirectX SDK but cannot find the reference "Microsoft.Dire ctX.AudioVideoP layback" in VS2010 librairy.

      In the "COM" list, I only see "Microsoft DirectX Transforms Core Type Librairy" and Microsoft DirectX Transforms Images Transforms Type Librairy".

      How can I add the AudioVideoPlayb ack references ?

      Thank you

      Comment

      • siilexx
        New Member
        • Aug 2010
        • 19

        #4
        I've managed to manually add the reference to Microsoft.Direc tX.AudioVideoPl ayback but now I receive the following error "vfw_e_unsuppor ted_stream" while playing a FLV file.

        Should I add other references or codecs, and which one ?
        Thank you

        Comment

        • adriancs
          New Member
          • Apr 2011
          • 122

          #5
          the computer might not have the codec of FLV installed.
          Try install the FLV video codec by one of the below method:

          alternative 1: Install K-Lite Mega Codec Pack
          Download K-Lite Codec Pack Mega 19.0.0 for Windows. Fast downloads of the latest free software! Click now


          alternative 2: Install Vista Codec Package
          Download Vista Codec Package 7.2.0 for Windows. Fast downloads of the latest free software! Click now

          Comment

          Working...