Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. AVI-Play

AVI-Play

Scheduled Pinned Locked Moved C#
csharpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PrebKlok
    wrote on last edited by
    #1

    Is it possible to play an AVI-file (Xvid) from within my C# application? I word prefer to have a panel where the video i played, but mayby it is only possible to start an extern player like Zoom Player. Is so, how do you start an extern player from a C# program? - and yes I am a newbee ;-)

    C S S 3 Replies Last reply
    0
    • P PrebKlok

      Is it possible to play an AVI-file (Xvid) from within my C# application? I word prefer to have a panel where the video i played, but mayby it is only possible to start an extern player like Zoom Player. Is so, how do you start an extern player from a C# program? - and yes I am a newbee ;-)

      C Offline
      C Offline
      Corinna John
      wrote on last edited by
      #2

      You can try the Windws Media Player ActiveX Control: 1. Right-Click the toolbox, choose "Customize Toolbox..." 2. On the COM tab select "Windows Media Player". 3. Drag a Media Player onto the form. 4. Set the file name in the properties box. 5. Run the application - you see your video running in the Media Player control. If you want to dive deeper into AVI handling, you can try playing the video yourself with managed DirectX or the

      1 Reply Last reply
      0
      • P PrebKlok

        Is it possible to play an AVI-file (Xvid) from within my C# application? I word prefer to have a panel where the video i played, but mayby it is only possible to start an extern player like Zoom Player. Is so, how do you start an extern player from a C# program? - and yes I am a newbee ;-)

        S Offline
        S Offline
        Stefan Troschuetz
        wrote on last edited by
        #3

        If you use the ActiveX Control like Corinna suggested maybe a look at the Media Player SDK on MSDN will be useful. Another player can be started by calling Process.Start method. See the documentation for the Process class for more information. If you want to control the started application you have to P/Invoke SendMessage to send message towards it. It think there was an article how to this with Media Player here on CodeProject.


        www.troschuetz.de

        1 Reply Last reply
        0
        • P PrebKlok

          Is it possible to play an AVI-file (Xvid) from within my C# application? I word prefer to have a panel where the video i played, but mayby it is only possible to start an extern player like Zoom Player. Is so, how do you start an extern player from a C# program? - and yes I am a newbee ;-)

          S Offline
          S Offline
          sheppe
          wrote on last edited by
          #4

          An alternative method is to use the DirectShow runtime DLL: Quartz.dll. It's been a long time since I used it, but basically you add a reference to it in your project (it's in the System32 directory) and .NET will create the neccessary interop assemblies (I believe the reference will display as QuartzTypeLib in the Project Explorer). Following that you will have access to the necessary methods of DirectShow to playback audio and video files. Note that this method is a lot more complex than just using the Media Player control, but it will also be a lot more configurable for you. There is too much code to post as an example to make this work for you, but I'm sure there are a lot of samples online that you can use. HTH -Sheppe Pharis, MCSD

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups