Sunday, January 2, 2011

How to Adjust the Brightness and Contrast of a Video file in Linux

The steps below are grabbed from the forums

> mplayer -ao pcm:fast -vo null -vc dummy "$@"
>
> mkfifo video.yuv
>
> mplayer "$@" -vf eq2=0.9:1:0.1:1.02 -vo yuv4mpeg:file=video.yuv \
> -noframedrop -ao null -really-quiet < /dev/null &
>
> ffmpeg -f yuv4mpegpipe -i video.yuv -i audiodump.wav -sameq \
> -s 640x480 -ar 44100 -r 25 -y $filename.flv
>
> rm -f video.yuv audiodump.wav
>
> The eq2 options are:
>
> gamma:contrast:brightness:saturation:red:green:blue:dgamma