Log in

View Full Version : Removing camera flashes in movie


biskits
26th November 2007, 16:28
Hello

I convert personal video to xvid to play on my standalone player, normally without problem. I have a particular video that has a sequence of very bright camera flashes that will only play properly if I encode at a very low overall bitrate, as even the standalone profiles fail to handle this. On examining the xvid with Virtualdub I noticed that an I frame was being created at every flash and sometimes immediately after, causing a high bitrate during this period. Ideally I would like to automatically lose the frames with flash so that I can encode at a higher bitrate. Are there any filters that can do this, or is there an alternative approach.

Thanks

biskits
26th November 2007, 21:58
If its of interest to anyone else I sorted this myself by writing a perl script to create a first pass stats file via xvid_encraw, parsing it for I frames occurring too often to auto generate a avisynth script to delete each offending frame and replace it with a duplicate neighbour. The resulting avisynth script was then used as input to xvid_encraw for encoding.