Change Video Gain (Brightness)

The gain for the video is the multiplier for the brightness. This is not to be confused with the brightness eq option which changes the offset, or gamma, which changes the exponent.

The simple way for this is using the curves filter (which can change the entire curve, be it offset, exponential or multiplier)

ffmpeg -i input.mkv -vf curves=all='0/0 0.95/1 1/1' output.mkv

Note that this is a super simple command just showing the video filter. This can be used in a complex filter graph, as well as set the output video and audio codec instead of using the defaults seen here.
See any of my other ffmpeg wiki pages for that.

For the curves filter, the 'all' parameter sets this for all channels (rgb/luma).

Then, we set points on the curve. We have in the format of input/output. So, 0 on input is 0 on output, and 1 on input is 1 on output.
For this simple change to make it brighter, we can add a new point 0.95/1.00, this maps 0.95 on the input to 1, and clips inputs between 0.95 and 1.

This is useful if you filmed at a low exposure, and you can add more points should you need finer control.

  • scripts/ffmpeg/change_video_gain_brightness.txt
  • Last modified: 2023-03-27 02:14
  • by Tony