Save avi file as bmp sequence using virtual dub.
Make droplet in photoshop doing what you want.
Drop folder containging bmp files (or targa, others) on to droplet
reassemble filtered files in Virtualdub.