Tuesday, February 17, 2009

How I adjusted the brightness of an MOV file

This past Valentines Day (2009), my wife and I hosted our monthly Couples-Club meeting at our house. The men hired a barbershop quartet to come and deliver roses, a card and sing them a couple of songs. I was able to record a video of the event on my 5MP Kodak digital camera. The problem was the video was too dark and some of the people could not be seen. Adjusting the brightness of the video turned out more work than I imagined.

I first thought to use Kino on my laptop but I remembered that application liked to convert everything to some DVI format and resave it into a much larger file. I never took the time to learn how to filter the brightness so I gave up on Kino with not too much effort. I did some searching in the Synaptic Package manager that comes with Ubuntu and found Avidemux.

I thought using Avidemux would do the trick nicely. I was able to figure out the Audio/Video format (copy does nothing to the source, it just makes a copy) and had to play with the output audio because it kept crashing on the audio codedec when I went to save the video. I was able to convert using different video codedecs but all the audio codedecs that did not crash, would create output files that had the audio truncated after about 19 seconds into the 4+ minute video. This even happened when I did a straight copy of the Video and Audio source. This lead me to believe there must be something wrong with Avidemux. I Googled high and low and did not find any solution to this problem so I decided to see if mencoder had an option that would increase the brightness.

After doing some Googles with mencoder and brightness, I came across the following web site that gave me the answer. Here is the command I used to increase the brightness and reduce the size so I could play it on my Nokia N810 Internet tablet:

mencoder 100_1470.MOV -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:vbitrate=300 -vf scale=320:240,eq2=1.0:0.8:0.1:0.7 -ffourcc DIVX -ofps 15 -o test2.avi

The eq2-1.0:0.8:0.1:0.7 was how the brightness was increased by 10% (third fractional parameter).

No comments: