I have to adjust a video which was too dark. In openCV, I simply used Img.Mul()
to multiply each of the RGB band with a same scalar and got good result.
Could one do the equivalent operation with FFMPEG? I tried eq
with contrast and brightness, but it was not quite the same thing.
Edit : thanks to a clue in @VC.One's answer below I was able to emulate Img.Mul()
with:
ffmpeg -i input.file -vf colorlevels=rimax=0.5:gimax=0.5:bimax=0.5 -c:a copy output.file
Sounds like you want to increase the levels of pixel brightness.
You can try: https://stackoverflow.com/a/58738185/2057709
If you've worked with image curves (in some photo editor) then also try: https://video.stackexchange.com/a/13110/17929
curves=r='X/Y':g='X/Y':b='X/Y'
The above curves method is nearest to increasing the input of each RGB channel.
Where the X
and Y
are numbers ranging from 0.0
up to 1.0
.
I recommend X of 0.5 and then you can test for the right Y value.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.