<p>Download the relevant build for Windows, eg: <a href="https://sourceforge.net/projects/ffmpegwindowsbi/files/july-01-2016/" rel="nofollow noreferrer">https://sourceforge.net/projects/ffmpegwindowsbi/files/july-01-2016/</a></p>

<p>Use the following command line: <code>ffmpeg -i INPUT.mp4 -c:v libx265 -crf 20 -vf eq=gamma=1.15:saturation=0.925:brightness=0.05:contrast=1.15 -color_primaries bt2020 OUTPUT.mp4</code></p>

<p>Note that you will have to adjust the various values such as brightness, contrast, saturation, etc. to your taste since this is a "brute force" conversion to wide-gamut Rec2020. This has been tested on iPad Pro with H.264 movie trailers. On wide-gamut displays such as the iPad Pro you should notice richer, deeper colours.</p>

<p><strong>Note that this is not an archival or permanent solution as Rec2020 is a very wide gamut vs Display P3 (latest Apple devices) or Adobe RGB (pro wide-gamut monitors). Newer Ultra HD TV monitors or reference monitors that can get close to Rec2020 may be more suitable.</strong></p>

<p><em>In any case I think this is an interesting experiment and learning experience for any amateur or pro who has just started exploring wide-gamut and/or HDR video... it is a very, very different world to SRGB that had been with digital media for decades. All that is about to change radically in the next 10 years.</em></p>

CC BY-SA 3.0
2018-02-09T05:42:16.160Z
This is an odd thing to do. Converting footage from a smaller gamut to a larger one in the way you have is not something you should ever do for comparisons. You're changing the video from how it was intended to be viewed to something else. If you want to see the difference in gamuts, you should find footage that was shot with a wider gamut and convert to the smaller gamut and compare that way. That will get you something closer to a reasonable comparison of the 2 gamuts. The way you've done it, it's just cranking up the saturation.
user1118321
CC BY-SA 3.0
2018-02-11T03:07:26.963Z
I understand your point. I have evaluated things like Vimeo Vlog etc wide gamut videos on my iPad. While this method indeed ups the saturation I wanted to see if any other conversion takes place by ffmpeg itself. In general on iPad Pro Display P3 I notice an increase in saturation, but I do see colours not seen on SRGB. Interestingly from doing this process when I compare to iTunes Dolby Vision I can see similar results... Of course in the latter case it is accurately done, but as R&D I now have a glimpse into beyond-SRGB gamuts for videos. Plus they look stunning (movie trailers).
SaltySub2
CC BY-SA 3.0
2018-02-09T02:34:31.577Z
2018-02-11T03:10:51.433Z
2018-02-11T03:10:51.433Z
SaltySub2
<p>You could simply use the <a href="https://cc-lut.hotglue.me" rel="nofollow noreferrer">Colorspace Conversion LUT</a> to convert between Rec.709 gamut and Rec.2020 gamut.</p>

CC BY-SA 4.0
2021-02-12T19:32:21.300Z
2021-02-12T23:20:52.513Z
2021-02-12T23:20:52.513Z
Andy
<p>BT.709 and sRGB are completly different transfer functions. Sigh.</p>
<p>Anyway, download ffmpeg from here: <a href="https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip" rel="nofollow noreferrer">https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip</a></p>
<p>ffmpeg -i INPUT.mp4 -c:v libx265 -crf 20 -vf zscale=r=limited:m=2020_ncl:t=2020_10:p=2020:c=topleft,format=yuv420p10 -color_primaries bt2020 -colorspace bt2020nc -color_trc bt2020_10bit -color_range tv OUTPUT.mp4</p>
<p>This will preserve the same colors and will preserve  SDR.</p>

CC BY-SA 4.0
2022-04-14T05:10:43.380Z
2022-04-17T19:04:15.470Z
2022-04-17T19:04:15.470Z
Валерий Заподовников
<p>I'm looking to convert a standard colour gamut video to a wide gamut video. For example, I have a 1080p, 2K or 4K H.264 8-bit mp4. This is normally (eg. from YouTube) in Rec709 or "SRGB" colour space.</p>

<p>I want to test my iPad Pro or other wide-gamut monitors to see what the video may look like with a wider colour gamut (eg. Rec2020) as well as save it as a H.265 10-bit mp4.</p>

CC BY-SA 3.0
2018-02-05T14:58:39.350Z
For questions you both ask and answer, please post the question and the answer separately, not both in the question
NoahL
CC BY-SA 3.0
2018-02-07T08:00:25.623Z
It's not so simple.  For one, iPad Pro's color space is significantly smaller than rec.2020.  If this is what you're using to "adjust to taste,"  then more capable displays (present or future) will expose discoloration.
Jason Conrad
CC BY-SA 3.0
2018-02-09T02:34:04.083Z
@NoahL I thought something looked weird, will change it.
SaltySub2
CC BY-SA 3.0
2018-02-09T02:34:16.403Z
@JasonConrad Fair point.
SaltySub2
<h.264><h.265>
How do I convert H.264 Rec709 ("SRGB") to H.265 HEVC 10-Bit Rec2020 ("Wide Gamut")?
SaltySub2
# How do I convert H.264 Rec709 ("SRGB") to H.265 HEVC 10-Bit Rec2020 ("Wide Gamut")?

(Asked by: username_0 on 2018-02-05)

I'm looking to convert a standard colour gamut video to a wide gamut video. For example, I have a 1080p, 2K or 4K H.264 8-bit mp4. This is normally (eg. from YouTube) in Rec709 or "SRGB" colour space.

I want to test my iPad Pro or other wide-gamut monitors to see what the video may look like with a wider colour gamut (eg. Rec2020) as well as save it as a H.265 10-bit mp4.

**Tags:** h.264, h.265

> **Comments:**
> **username_1**: For questions you both ask and answer, please post the question and the answer separately, not both in the question  
> **username_2**: It's not so simple.  For one, iPad Pro's color space is significantly smaller than rec.2020.  If this is what you're using to "adjust to taste,"  then more capable displays (present or future) will expose discoloration.  
> **username_0**: @username_1 I thought something looked weird, will change it.  
> **username_0**: @JasonConrad Fair point.  

---

## 3 answers

### Answer by username_0 on 2018-02-09. Score: 0 | Accepted answer

Download the relevant build for Windows, eg: <https://sourceforge.net/projects/ffmpegwindowsbi/files/july-01-2016/>

Use the following command line: `ffmpeg -i INPUT.mp4 -c:v libx265 -crf 20 -vf eq=gamma=1.15:saturation=0.925:brightness=0.05:contrast=1.15 -color_primaries bt2020 OUTPUT.mp4`

Note that you will have to adjust the various values such as brightness, contrast, saturation, etc. to your taste since this is a "brute force" conversion to wide-gamut Rec2020. This has been tested on iPad Pro with H.264 movie trailers. On wide-gamut displays such as the iPad Pro you should notice richer, deeper colours.

**Note that this is not an archival or permanent solution as Rec2020 is a very wide gamut vs Display P3 (latest Apple devices) or Adobe RGB (pro wide-gamut monitors). Newer Ultra HD TV monitors or reference monitors that can get close to Rec2020 may be more suitable.**

*In any case I think this is an interesting experiment and learning experience for any amateur or pro who has just started exploring wide-gamut and/or HDR video... it is a very, very different world to SRGB that had been with digital media for decades. All that is about to change radically in the next 10 years.*

> **Comments:**
> **username_3**: This is an odd thing to do. Converting footage from a smaller gamut to a larger one in the way you have is not something you should ever do for comparisons. You're changing the video from how it was intended to be viewed to something else. If you want to see the difference in gamuts, you should find footage that was shot with a wider gamut and convert to the smaller gamut and compare that way. That will get you something closer to a reasonable comparison of the 2 gamuts. The way you've done it, it's just cranking up the saturation.  
> **username_0**: I understand your point. I have evaluated things like Vimeo Vlog etc wide gamut videos on my iPad. While this method indeed ups the saturation I wanted to see if any other conversion takes place by ffmpeg itself. In general on iPad Pro Display P3 I notice an increase in saturation, but I do see colours not seen on SRGB. Interestingly from doing this process when I compare to iTunes Dolby Vision I can see similar results... Of course in the latter case it is accurately done, but as R&D I now have a glimpse into beyond-SRGB gamuts for videos. Plus they look stunning (movie trailers).  

---

### Answer by username_4 on 2021-02-12. Score: 0

You could simply use the [Colorspace Conversion LUT](https://cc-lut.hotglue.me) to convert between Rec.709 gamut and Rec.2020 gamut.


---

### Answer by username_5 on 2022-04-14. Score: -1

BT.709 and sRGB are completly different transfer functions. Sigh.

Anyway, download ffmpeg from here: <https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip>

ffmpeg -i INPUT.mp4 -c:v libx265 -crf 20 -vf zscale=r=limited:m=2020\_ncl:t=2020\_10:p=2020:c=topleft,format=yuv420p10 -color\_primaries bt2020 -colorspace bt2020nc -color\_trc bt2020\_10bit -color\_range tv OUTPUT.mp4

This will preserve the same colors and will preserve SDR.


---

