[FFmpeg-user] How to brighten part of a dark video?

Moritz Barsnick barsnick at gmx.net
Fri Sep 18 14:25:27 CEST 2015

On Fri, Sep 18, 2015 at 14:21:26 +0200, Gilles wrote:
> For the benefit of other newbies happening on this thread later,
> here's a working exemple to 1) split the video in two parts, 2) make
> the dark part brighter and the bright part darker, and 3) join the two
> into a single video:

Thanks for following up with your complete result.

> ffmpeg -i input.mp4 -c:v libx264 -filter_complex "split=2[v1][v2];
> [v1]crop=200:330:527:0,lutyuv=y=val*0.75[brightpart];
> [v2]lutyuv=y=val*2.5[darkpart];
> [darkpart][brightpart]overlay=x=520:y=0[v]" -map "[v]" -c:a copy -f
> mp4 output.mp4

Small hint: You probably want the same x, y coordinates for the overlay
as you used for the crop, so as to place the corrected part at exactly
the same place. ;-)


More information about the ffmpeg-user mailing list