fixing an exposure AGC problem in post?

john-beale wrote on 4/9/2008, 8:51 PM
I have some video shot in a theater, where the camera's automatic gain was going up and down as a dancing couple rotates exposing first her bright dress, then his black tailcoat. This causes the background to become darker and brighter. Here is a few seconds showing the problem (2x speedup just to make it more obvious):

http://www.bealecorner.com/D30/misc/AGC-problem-2x.mp4

Is there some clever way to improve this in post, either in Vegas, or maybe an Avisynth script? Hopefully not requiring manual adjustments of each frame?

Comments

johnmeyer wrote on 4/9/2008, 10:50 PM
There are some "deflicker" filters for both VirtualDub and AVISynth. I used them on 1928 film with severe flicker (due to aging and how it was originally processed). If you click on the play button on both movies, you can play them at the same time. For flicker, pay attention to the surface of the tennis court. It ain't perfect, but it is a lot better.

Before dust and flicker removal:



After dust and flicker removal:



There is an AVISynth plugin called "HDRAGC" that I use all the time to adjust the gamma of film to better map to video. I find it works better than anything I can do in Vegas with levels, curves, etc. Depending on your flicker (I couldn't play your clip on this computer -- my fault, not yours), you may be able to adjust this to somewhat combat the problem.

There is also a built-in AVISynth autogain control. It is actually a parameter to the colorspace conversion functions, e.g.,

colorYUV(autogain=true)

However, it is a blunt instrument and without using other tricks, may not help much.

Out of all the approaches listed, I would first try the "msu_deflicker" plugin for VirtualDub. Just load your video, then add this filter and experiment with the settings. You can also use this filter within AVISynth as follows:



LoadVirtualdubPlugin("C:\Program Files\Video\plugins\msu_deflick.vdf","msudef",2)

msudef(2, 0, 0, 0, 16, 11665536).ConvertToYV12()

To figure out what numbers to put into the second line above, just save the filter settings in VirtualDub and then open the resulting vcf file and copy the settings from there.

To avoid this problem in the future, either use manual settings for your camera exposure or, if you must use some form of auto-exposure, see if your camera has a setting that changes the auto-exposure quickness. My FX1 has at least three settings. I normally keep it at fast, but for something like you encountered, one of the slower settings might help a lot.

john-beale wrote on 4/9/2008, 11:07 PM
thanks for the tips, I'll try them! Absolutely right it's best to avoid this up front- the video is from my FX1, but a friend was operating it. There were so many lighting changes in the show I knew manual exposure wasn't going to work. I definitely should have selected "slow" AGC and I've even seen this very problem happen before- I just forgot to set it.
john-beale wrote on 4/9/2008, 11:45 PM
well.. looks like it is a tough problem. I think the de-flicker filters are designed for quick frame-to-frame variations. My footage has a brightness change period of about 100 frames (the couple is doing a waltz, and the brightness changes as they rotate, once every 3 seconds).
johnmeyer wrote on 4/10/2008, 12:02 AM
You might try the original VirtualDub deflicker filter:

Antiflicker Filter

It has a "window" setting which you try to set to the period of your flicker (i.e., 100 frames).
farss wrote on 4/10/2008, 4:18 AM
I've not shot many stage productions but one of my clients does. He leaves the camera in full manual and rarely adjust exposure, even when the lights go dim. One trap it's taken me a while to get my head around is it might 'look' dark but very oftenly there's just less bright areas on the stage. Even a candle is quite bright.

Bob.
rs170a wrote on 4/10/2008, 4:28 AM
I'm in full agreement with Bob on this.
I shoot at least 5 stage productions each year.
I'm fortunate enough to attend at least one full dress rehearsal to see what the brightest scene is.
I set my exposure for that scene and, unless there's a really dark scene where I may bump it up 1 or 2 stops, I leave it alone.
My thinking is "the scene is supposed to be dark so let it be dark".

Mike
musicvid10 wrote on 4/10/2008, 6:53 AM
"My thinking is "the scene is supposed to be dark so let it be dark"."

100% correct. OK if it wasn't bad enough that the guy who shot his last show with us left AGC on, he left autofocus on too, for both cameras! Guess what happened every time the actors moved off center or there was a lighting blackout? And, this idiot didn't even bother to level his cameras!

I just wonder where these Sunday picnic videographers think they get the right to charge for their services and ruin the video of an otherwise flawless production. Mike, what are you doing the last weekend in July?
baysidebas wrote on 4/10/2008, 7:42 AM
When my film class venue changes the lighting grid for a stage production, I'm faced with the same quandary as the professor walks around the stage [from what is usually evenly lit] and encounters patches of darkness. I still leave the camera set for the proper exposure at the interview chairs and use keyframes and levels to handle the exposure variations. Usually all I have to do is find the proper correction for the darkest spot and save it as a preset. Then insert keyframes at each end of the evenly lit portions, whether dark or proper, and let Vegas interpolate the lighting change in between. Works like a charm and was one of the most impressive capabilities in Vegas when I discovered its usefulness.
rs170a wrote on 4/11/2008, 4:31 AM
musicvid: Mike, what are you doing the last weekend in July?

Either at work or home lounging around the pool.
Click my name to email me if you want to .

Mike