<p>Gamma correction is likely to be a better choice than brightness, to stretch the histogram to the right rather than push it over:</p>

<pre><code># tinker with numbers
ffplay -vf eq=gamma=1.5:saturation=1.3 original.vid 

# render
ffmpeg -i original.vid -vf eq=gamma=1.5:saturation=1.3 \
    -c:a copy  outfile.vid
</code></pre>

CC BY-SA 4.0
2023-01-20T17:42:04.250Z
Is there a reason the saturation needs to be changed with the gamma?
Hashim Aziz
CC BY-SA 4.0
2023-01-22T04:51:53.823Z
Been a few years but my recollection is that when you brighten a dark video it looks a bit muted color-wise.
Gringo Suave
CC BY-SA 4.0
2019-04-05T17:31:53.000Z
2019-06-26T18:08:16.967Z
2019-06-26T18:08:16.967Z
Gringo Suave
<p>I'd also try <a href="https://ffmpeg.org/ffmpeg-filters.html#curves-1" rel="noreferrer">curves</a>:</p>

<pre><code>ffmpeg -i input.vid -vf "curves=all='0/0 0.5/1 1/1'" -codec:a copy -codec:v libx264 -y output.vid
</code></pre>

<p>The <code>0.5/1</code> maps mid-range brightness (0.5) to full bright (1)</p>

CC BY-SA 4.0
2023-05-28T08:35:44.137Z
One reason to use curves instead of eq: the latter seems to affect pixel format. If you convert from YUV to BGRP for conventional blending purposes, but blending for some unexplainable reason happens in YUV anyway, replacing eq with curves may help. Another filter that seems to mess up blending is normalize.
Anton Strogonoff
CC BY-SA 4.0
2020-05-06T15:11:13.243Z
2020-05-06T15:11:13.243Z
hrunk
<p>These settings helped me to lighten up a dark video using the filter <code>eq</code>, with some added saturation.</p>
<h3>Syntax:</h3>
<blockquote>
<p><code>filtername=option1=value1:option2=value2:option3=value3...</code> These can be in any order.</p>
</blockquote>
<h3>Filter ranges and all options:</h3>
<p><a href="https://ffmpeg.org/ffmpeg-filters.html#eq" rel="noreferrer">https://ffmpeg.org/ffmpeg-filters.html#eq</a></p>
<h3>Preview:</h3>
<p><code>ffplay -vf eq=brightness=0.06:saturation=2 INPUT.MOV</code></p>
<h3>Render:</h3>
<p><code>ffmpeg -i INPUT.MOV -vf eq=brightness=0.06:saturation=2 -c:a copy OUTPUT.MOV </code></p>
<hr />
<p><strong>Alternative filters</strong>: <a href="https://video.stackexchange.com/q/14603/1871"><code>curves</code> and <code>pp</code></a>.</p>

CC BY-SA 4.0
2019-04-29T07:20:03.143Z
the preview ffplay is an awesome added value
Amjo
CC BY-SA 4.0
2022-07-03T04:51:50.173Z
works like a charm. Thanks!
Sujay Phadke
CC BY-SA 3.0
2017-03-19T11:01:35.760Z
2017-03-19T11:06:48.260Z
2020-06-17T09:53:03.607Z
P A N
<p>How is ffmpeg used with a video filter circa 2017 to adjust gamma/contrast, brightness and saturation?</p>

<p>Stack Exchange resources that are a few years old point to the filter <code>mp=eq2=</code>, but it seems to be <a href="https://wjwoodrow.wordpress.com/2015/07/12/more-ffmpeg-hell/" rel="noreferrer">deprecated<sup>1</sup> and replaced</a> with just <code>eq=</code>. The link does not reveal a good understanding of the setting ranges, however.</p>

<p>How is <code>eq=</code> (or equivalent filters) used? E.g., what is the format and appropriate settings/ranges?</p>

<p>For my personal usage, I'd like to keep gamma where it is, while increasing brightness and saturation a fair bit, for a dark video.</p>

<hr>

<p><sub><sup>1</sup>Throws error message: <code>No such filter: 'mp'</code></sub></p>

CC BY-SA 3.0
2017-03-19T10:32:07.633Z
Checks the [docs](https://ffmpeg.org/ffmpeg-filters.html#eq), and look into the [curves or pp filter](http://video.stackexchange.com/q/14603/1871) as well.
Gyan
CC BY-SA 3.0
2017-03-19T10:51:25.977Z
The syntax is the same as for all filters. i.e. `filtername=option1=value1:option2=value2:option3=value3...` These can be in any order.
Gyan
<ffmpeg><color-correction>
ffmpeg Color Correction: Gamma, Brightness and Saturation
P A N
# ffmpeg Color Correction: Gamma, Brightness and Saturation

(Asked by: username_0 on 2017-03-19)

How is ffmpeg used with a video filter circa 2017 to adjust gamma/contrast, brightness and saturation?

Stack Exchange resources that are a few years old point to the filter `mp=eq2=`, but it seems to be [deprecated1 and replaced](https://wjwoodrow.wordpress.com/2015/07/12/more-ffmpeg-hell/) with just `eq=`. The link does not reveal a good understanding of the setting ranges, however.

How is `eq=` (or equivalent filters) used? E.g., what is the format and appropriate settings/ranges?

For my personal usage, I'd like to keep gamma where it is, while increasing brightness and saturation a fair bit, for a dark video.

---

1Throws error message: `No such filter: 'mp'`

**Tags:** ffmpeg, color-correction

> **Comments:**
> **username_1**: Checks the [docs](https://ffmpeg.org/ffmpeg-filters.html#eq), and look into the [curves or pp filter](http://video.stackexchange.com/q/14603/1871) as well.  
> **username_1**: The syntax is the same as for all filters. i.e. `filtername=option1=value1:option2=value2:option3=value3...` These can be in any order.  

---

## 3 answers

### Answer by username_0 on 2017-03-19. Score: 55 | Accepted answer

These settings helped me to lighten up a dark video using the filter `eq`, with some added saturation.

### Syntax:

> `filtername=option1=value1:option2=value2:option3=value3...` These can be in any order.

### Filter ranges and all options:

<https://ffmpeg.org/ffmpeg-filters.html#eq>

### Preview:

`ffplay -vf eq=brightness=0.06:saturation=2 INPUT.MOV`

### Render:

`ffmpeg -i INPUT.MOV -vf eq=brightness=0.06:saturation=2 -c:a copy OUTPUT.MOV`

---

**Alternative filters**: [`curves` and `pp`](https://video.stackexchange.com/q/14603/1871).

> **Comments:**
> **username_6**: the preview ffplay is an awesome added value  
> **username_7**: works like a charm. Thanks!  

---

### Answer by username_2 on 2019-04-05. Score: 20

Gamma correction is likely to be a better choice than brightness, to stretch the histogram to the right rather than push it over:
# tinker with numbers
ffplay -vf eq=gamma=1.5:saturation=1.3 original.vid 

# render
ffmpeg -i original.vid -vf eq=gamma=1.5:saturation=1.3 \
    -c:a copy  outfile.vid

> **Comments:**
> **username_3**: Is there a reason the saturation needs to be changed with the gamma?  
> **username_2**: Been a few years but my recollection is that when you brighten a dark video it looks a bit muted color-wise.  

---

### Answer by username_4 on 2020-05-06. Score: 15

I'd also try curves:
ffmpeg -i input.vid -vf "curves=all='0/0 0.5/1 1/1'" -codec:a copy -codec:v libx264 -y output.vid

The 0.5/1 maps mid-range brightness (0.5) to full bright (1)

> **Comments:**
> **username_5**: One reason to use curves instead of eq: the latter seems to affect pixel format. If you convert from YUV to BGRP for conventional blending purposes, but blending for some unexplainable reason happens in YUV anyway, replacing eq with curves may help. Another filter that seems to mess up blending is normalize.  

---

