I know of Adobe products but I'm sure that there's something out there that can suit you if you don't use Adobe. I never tried to do this with Adobe Photoshop but the exteded version has some video capabilities and I do think is possible. Therefore, I think that Adobe Premier will be able to do it easily.
Regarding free or cheap video editors... I can't tell but I think that with some scripting it should be possible yet not very intuitive for the non-programmer