What is the easiest-to-code-in technology that would give me real time access to a video's frames, and allow me to modify them. I am aware of DirectShow, but it's programming model seems to be quite complicated. Is there a framework that makes programming such a frame filter easier?
There was a class called AviFile in a few C++ packages from MS a while back. I'm not sure what happenend to that.
The best way to go about this problem is to use DirectShow if you are sticking with windows.
The AVI File format (which is well documentent and you can find under google) is a bit similar to:
AVIRIFF size speed imgWidth imgHeight frameTotal imgCodec audioCodec frame size
FRAME
SOUND
FRAME
SOUND
Hy Opencv is what you need. Its a Framework which can you can manipulate image,video and alot more thing check out http://opencv.willowgarage.com/wiki/
the simplest solution is using the AVIFile API. the are many samples available.
Give me real time access to a video's frames, and allow me to modify them
Are you looking to get the uncompressed video frames and modify them before they are rendered? Or do you want to modify the video frames, saving them back to a media file?
The first one would be slightly easier. Even though DirectShow may seem complicated at first, it really is an elegant framework. I would strong suggest looking at the DirectShow.NET samples. To get access to the frames of the video, you'd simply configure and add a SampleGrabber filter to the DirectShow graph, do a graph.RenderFile(mymediafile, null), and you will receive a callback for each frame. You can modify the pixel data and it will appear on the rendered video. This should not take more than 1 page of code. I have an example source code on using SampleGrabber, but it's made for web cameras. Playing media is much easier (graph.RenderFile!).
If you need to write this stuff to a file, you'd do something similar to what is described above, but instead of using a video renderer, you'd have to configure the graph to use video encoders and muxers. Probably not fun for someone new to DirectShow ;).
If you just wish to get frames there is a VERY simple interface in directshow called IMediaDet. I have written a simple class to easily extract out any frames from a media file. It's geared towards WPF, but you can gut it to work with straight GDI.
I have no idea what exactly you are trying to achieve so this may not help you, but if you just need to alter the frames of a video on the fly, I would highly recommend looking into AviSynth. It is a video frameserver that uses a scripting language to alter video. There is also an SDK for it that you can use to write binary plugins. There are a lot of plugins already available to accomplish various tasks. An example script would look like this:
AviSource("C:\video.avi")
Crop(20,0,-20,0) //Crops 20px from the left and right of video
BicubicResize(640,480) //Resize to 640x480 using bicubic filter
# increase the gamma
Levels(0, 1.2, 255, 0, 255)
These scripts could then be opened in a media player or encoder such as Virtualdub.
OK, since you asked for "easy", I have to mention HTML5 <video>. See the demo and explanation at these links: