<p>h.264 supports various color info in the bitstream.  From <code>x264 --fullhelp</code>:</p>

<pre><code>--range &lt;string&gt;        Specify color range ["auto"]
                      - auto, tv, pc.
--colorprim &lt;string&gt;    Specify color primaries ["undef"]
                      - undef, bt709, bt470m, bt470bg, smpte170m,
                        smpte240m, film, bt2020.
--transfer &lt;string&gt;     Specify transfer characteristics ["undef"]
                      - undef, bt709, bt470m, bt470bg, smpte170m,
                        smpte240m, linear, log100, log316,
                        iec61966-2-4, bt1361e, iec61966-2-1,
                        bt2020-10, bt2020-12.
--colormatrix &lt;string&gt;  Specify color matrix setting ["???"]
                      - undef, bt709, fcc, bt470bg, smpte170m,
                        smpte240m, GBR, YCgCo, bt2020nc, bt2020c.
--chromaloc &lt;integer&gt;   Specify chroma sample location (0 to 5) [0].
</code></pre>

<p>So I don't think you can embed a custom color profile, but you can indicate which standard one the decoder should use to produce RGB pixel values.</p>

<p>I thought some container formats could hold info on colorspaces, too, but maybe not.</p>

CC BY-SA 3.0
2015-01-15T15:59:14.350Z
2017-02-03T14:42:25.837Z
2017-02-03T14:42:25.837Z
Peter Cordes
<p>As it was shot by its creators is kind of a nebulous concept, particularly when compression is involved.  Color reproduction varies greatly from one device to another and without a calibrated display and a complete chain of color control going back to the source, you aren't going to get exact.  Even then, chances are good that somewhere along the line the color spaces won't match up exactly.  </p>

<p>It gets even harder when you get in to compression because compression impacts color.  Colors are generalized subtly by compression.  The more area of an image it can simplify (particularly for things like cartoons) the smaller the image can be.  Most likely, the slight color banding that is seen in that frame does not exist in the original, however because H264 groups similar colors together and simplifies them to one, it ends up causing a banding effect to occur.</p>

<p>In short, for a format that is lossy, a color profile isn't going to solve the problem since the color isn't preserved exactly anyway.  It might help improve it a little, but there is still going to be color alteration from the compression.</p>

CC BY-SA 3.0
2015-01-15T15:48:15.640Z
You get banding with video codecs if your bitrate is too low, but they don't produce anything like the systematic differences you see when RGB->yuv used one formula and yuv->RGB used a different one.  You can see in the original question the very obvious difference after decoding the lossy-compressed images from iTunes.
Peter Cordes
CC BY-SA 3.0
2013-01-23T15:15:25.463Z
2013-01-23T15:15:25.463Z
AJ Henderson
<p>No most video formats (nearly all) do not allow custom ICC color profiles to be embedded. (Improvemet/correction: MP4s can have color profiles tagged in the metadata of a video file.) most video on the consumer end is intended for the REC.709 color space. sRGB is similar and uses the same primaries. transcoding (including compressing) will almost always result is a slight shift in color accuracy, saturation, gamma curve, or black and white level shift. This is made worse due to converting between RGB and YCbCr color spaces.</p>

CC BY-SA 3.0
2014-07-06T18:27:05.783Z
I wasn't really satisfied with the first answer and thanks for pointing at Rec.709, so I marked this one as the "accepted" answer.
Oleg Kuznetsov
CC BY-SA 3.0
2014-07-06T20:53:34.007Z
@OlegKuznetsov - btw, don't feel the need to accept an answer if you don't really feel like the question is fully answered.  It's perfectly ok for questions to sit unanswered until an answer can be found.  I'm glad Nick's answer was more helpful.
AJ Henderson
CC BY-SA 3.0
2014-07-06T15:56:15.960Z
2015-12-18T13:40:48.840Z
2015-12-18T13:40:48.840Z
Nick Spiropoulos
<p>Recently, I was reading a wiki, dedicated to one popular cartoon show and stumbled upon <a href="http://mlp.wikia.com/wiki/Forum:Australian_iTunes_rips" rel="noreferrer">an interesting problem</a>: <img src="https://i.sstatic.net/s0Pvv.jpg" alt="frames from the different regional iTunes stores"></p>

<p><em>From left to right: frames from the US iTunes, Australian iTunes and US iTunes version with CC in a video player</em> </p>

<p>As you may see, it's the same frame, but colours are different. So, it makes me wonder: does H.264 standard / MP4 container supports any kind of colour profiles (like, ICC in JPEG) and if yes, does any player support it? And what about DVD/Blu-Ray disks? Or there is no way to watch the same version of any video, as it was shot by it's creators? Thanks. :)</p>

<video-quality><mp4><color-correction>
Do video formats support colour profiles?
Oleg Kuznetsov
# Do video formats support colour profiles?

(Asked by: username_0 on 2013-01-22)

Recently, I was reading a wiki, dedicated to one popular cartoon show and stumbled upon [an interesting problem](http://mlp.wikia.com/wiki/Forum:Australian_iTunes_rips): ![frames from the different regional iTunes stores](https://i.sstatic.net/s0Pvv.jpg)

*From left to right: frames from the US iTunes, Australian iTunes and US iTunes version with CC in a video player*

As you may see, it's the same frame, but colours are different. So, it makes me wonder: does H.264 standard / MP4 container supports any kind of colour profiles (like, ICC in JPEG) and if yes, does any player support it? And what about DVD/Blu-Ray disks? Or there is no way to watch the same version of any video, as it was shot by it's creators? Thanks. :)

**Tags:** video-quality, mp4, color-correction


---

## 3 answers

### Answer by username_3 on 2014-07-06. Score: 8 | Accepted answer

No most video formats (nearly all) do not allow custom ICC color profiles to be embedded. (Improvemet/correction: MP4s can have color profiles tagged in the metadata of a video file.) most video on the consumer end is intended for the REC.709 color space. sRGB is similar and uses the same primaries. transcoding (including compressing) will almost always result is a slight shift in color accuracy, saturation, gamma curve, or black and white level shift. This is made worse due to converting between RGB and YCbCr color spaces.

> **Comments:**
> **username_0**: I wasn't really satisfied with the first answer and thanks for pointing at Rec.709, so I marked this one as the "accepted" answer.  
> **username_2**: @OlegKuznetsov - btw, don't feel the need to accept an answer if you don't really feel like the question is fully answered.  It's perfectly ok for questions to sit unanswered until an answer can be found.  I'm glad Nick's answer was more helpful.  

---

### Answer by username_1 on 2015-01-15. Score: 4

h.264 supports various color info in the bitstream.  From x264 --fullhelp:
--range         Specify color range ["auto"]
                      - auto, tv, pc.
--colorprim     Specify color primaries ["undef"]
                      - undef, bt709, bt470m, bt470bg, smpte170m,
                        smpte240m, film, bt2020.
--transfer      Specify transfer characteristics ["undef"]
                      - undef, bt709, bt470m, bt470bg, smpte170m,
                        smpte240m, linear, log100, log316,
                        iec61966-2-4, bt1361e, iec61966-2-1,
                        bt2020-10, bt2020-12.
--colormatrix   Specify color matrix setting ["???"]
                      - undef, bt709, fcc, bt470bg, smpte170m,
                        smpte240m, GBR, YCgCo, bt2020nc, bt2020c.
--chromaloc    Specify chroma sample location (0 to 5) [0].

So I don't think you can embed a custom color profile, but you can indicate which standard one the decoder should use to produce RGB pixel values.
I thought some container formats could hold info on colorspaces, too, but maybe not.


---

### Answer by username_2 on 2013-01-23. Score: 4

As it was shot by its creators is kind of a nebulous concept, particularly when compression is involved. Color reproduction varies greatly from one device to another and without a calibrated display and a complete chain of color control going back to the source, you aren't going to get exact. Even then, chances are good that somewhere along the line the color spaces won't match up exactly.

It gets even harder when you get in to compression because compression impacts color. Colors are generalized subtly by compression. The more area of an image it can simplify (particularly for things like cartoons) the smaller the image can be. Most likely, the slight color banding that is seen in that frame does not exist in the original, however because H264 groups similar colors together and simplifies them to one, it ends up causing a banding effect to occur.

In short, for a format that is lossy, a color profile isn't going to solve the problem since the color isn't preserved exactly anyway. It might help improve it a little, but there is still going to be color alteration from the compression.

> **Comments:**
> **username_1**: You get banding with video codecs if your bitrate is too low, but they don't produce anything like the systematic differences you see when RGB->yuv used one formula and yuv->RGB used a different one.  You can see in the original question the very obvious difference after decoding the lossy-compressed images from iTunes.  

---

