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

Gilles codecomplete at free.fr
Fri Sep 18 14:21:26 CEST 2015


On Fri, 18 Sep 2015 11:25:35 +0200, Gilles <codecomplete at free.fr>
wrote:
>I need to work on a video where the speaker was badly lit but also had
>a very bright screen to show slide:

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:

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

In the "crop" part above, the four parameters are width, height, x,
and y, respectively.

Some examples:
http://stackoverflow.com/questions/13390714/
http://video.stackexchange.com/questions/4563/

Thank you.



More information about the ffmpeg-user mailing list