Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-15T15:59:14.350Z
Answers.LastActivityDate: 2017-02-03T14:42:25.837Z
Answers.LastEditDate: 2017-02-03T14:42:25.837Z
Answers.UserDisplayName: Peter Cordes
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-15T15:48:15.640Z
Answers.Text: 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.
Answers.UserDisplayName: Peter Cordes
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-01-23T15:15:25.463Z
Answers.LastActivityDate: 2013-01-23T15:15:25.463Z
Answers.UserDisplayName: AJ Henderson
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-06T18:27:05.783Z
Answers.Text: 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.
Answers.UserDisplayName: Oleg Kuznetsov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-06T20:53:34.007Z
Answers.Text: @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.
Answers.UserDisplayName: AJ Henderson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-06T15:56:15.960Z
Answers.LastActivityDate: 2015-12-18T13:40:48.840Z
Answers.LastEditDate: 2015-12-18T13:40:48.840Z
Answers.UserDisplayName: Nick Spiropoulos
Body: <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>
  
Tags: <video-quality><mp4><color-correction>
Title: Do video formats support colour profiles?
UserDisplayName: Oleg Kuznetsov
ThreadText: # 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**: @username_0 - 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 username_3'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 <string>        Specify color range ["auto"]
                        - auto, tv, pc.
  --colorprim <string>    Specify color primaries ["undef"]
                        - undef, bt709, bt470m, bt470bg, smpte170m,
                          smpte240m, film, bt2020.
  --transfer <string>     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 <string>  Specify color matrix setting ["???"]
                        - undef, bt709, fcc, bt470bg, smpte170m,
                          smpte240m, GBR, YCgCo, bt2020nc, bt2020c.
  --chromaloc <integer>   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.  
  
  ---
  
  