Announcement

Collapse
No announcement yet.

.avi Datei in C# öffnen

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • .avi Datei in C# öffnen

    Hi,

    das Topic sagt ja alles. Kennt jemand ne gute Seite als erste Anlaufstelle? Für .NET 2.0+ bitte

  • #2
    Hallo Avatar,

    das Topic ist leider nicht so aussagekräftig, wie du denken magst ;-)

    <pre>
    File.Open("film.avi");
    </pre>

    Wenn es etwas mehr sein soll, als lediglich "öffnen", dann kommst du sicherlich um DirectShow nicht herum.

    Anbei ein bisschen Copy&Paste von dem, was ich auf die schnelle gefunden habe:

    DirectShow is what you want (part of DirectX, so you'd better get the DirectX SDK).

    With DirectShow, you can play/pause more or less any file type WindowsMediaPlayer supports in a few lines of code: http://msdn.microsoft.com/library/en-us/directshow/htm/howtoplayafile.asp

    Of course you can embed the video window in your own window: http://msdn.microsoft.com/library/en-us/directshow/htm/ivideowindowinterface.asp

    If you need to grab a snapshot and display that elsewhere, you can use the MediaDet object instead of a playback graph: http://msdn.microsoft.com/library/en-us/directshow/htm/mediadetector.asp

    DirectShow is mostly meant to be used from C/C++ but you can find some free .NET wrappers for it or write your own (not as easy as it sounds).

    For example, DirectShow provides an automation-compatible wrapper for the basic playback functionality you need so that you can generate a wrapper for it using tlbimp.exe against quartz.dll: http://msdn.microsoft.com/library/en-us/directshow/htm/usingdirectshowwithvisualbasic.asp

    There is an automation wrapper for the MediaDet object as well: http://msdn.microsoft.com/library/en-us/directshow/htm/mediadetobject.asp=

    Last, there is a very limited managed wrapper provided with the DirectX SDK, which may be enough to just display the first frame: http://msdn.microsoft.com/library/en-us/directx9_m/directx/ref/microsoft.directx.audiovideoplayback.asp

    Grüße

    Jör

    Comment


    • #3
      Hi,

      im Nachhinein war es wirklich wenig aussagekräftig
      Hier hab ich gefunden was ich gesucht habe:

      http://www.codeproject.com/cs/media/aviFileWrapper.asp

      Gruss,

      Tim

      Comment

      Working...
      X