I want to open .avi file (preferably any video file), to work with that video as a sequence of bitmaps (arrays) and then display it on the screen or save it to the file.
What options do I have in .NET?
I want to open .avi file (preferably any video file), to work with that video as a sequence of bitmaps (arrays) and then display it on the screen or save it to the file.
What options do I have in .NET?
I've been using this C# AVIFile wrapper on CodeProject to convert bitmap -> AVI and it can also do the reverse.
Previously the Managed DirectX wrappers from Microsoft supplied an AudioVideoPlayback assembly which could be used for this but this has basically died
That article lists several alternates which I'll list here for completeness (I cannot speak for their relative merits):
It is worth noting that one of the reasons to NOT use managed code to implement filters in the DirectShow chain is that only one version of the CLR can be hosted at a time[1] so two filters with incompatible versions would fail in unpleasant ways (this is the same issue with managed shell addins).
However doing this as an app rather than as a filter should be fine.
By using DirectShow any existing audio/video stream decodable by the system should be come accessible to you.
[1] The 4.0 CLR is meant to remove this issue for all CLR versions from 2.0 onwards. Whether this is a retrospective fix for existing extension points is an open question.
It turns out that Splicer was the best option for me. It is open source wrapper around DirectShow.Net. The programming model is so simple that even I was able to understand it.