I have an mp4 using h264 that i'm using in the background of a website. It has to blend in with the background image. I've already created ogv and webm videos for firefox and chrome and these work fine but the mp4 for safari doesn't blend properly. The only difference i see in the files is that the ogv, webm and original mov are all in sRGB color space, but the mp4 is in SDTV NTSC Y'CbCr. I've tried lots of different exporters but the mp4 is always in this colorspace. How do i get the mp4 in sRGB colorspace?



You are currently probably using the Rec. 601 color space for SD video. Encode your source footage in the Rec. 709 color space. It's the color space specified for HDTV and comes sRGB quite close. If you need higher color accuracy you can use the Rec. 2020 color space which exceeds the sRGB color space by far. Though compatibility may not be given everywhere with this color space.

| improve this answer | |

h.264 always uses Y'CbCr as the color space. Y'CbCr should be able to match the space pretty closely, but you might have to use a 4:4:4 instead of the simplified 4:2:2. 4:2:2, which is most commonly used, lacks a lot of the color resolution and might be why you are seeing the differences.

I can't guarantee it will allow a perfect match, but it should get you much closer.

| improve this answer | |
  • 1
    Should be noted that Y'CbCr is not an absolute color space and therfore is not really comparable to an absolute color space like sRGB. There are standards like Rec. 709 which define an absolute color space for Y'CbCr encoded images. – PTS May 1 '14 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.