• Wondering which camera, gear, computer, or software to buy? Ask in our Gear Guide.

HTML5 web decoding and playback - what codec and colorspace? please help

Hello guys,
Recently I had problem with my video uploading to web, I knew that quality of video will be compressed and it wont look that good as it did in premiere timeline, but what I didnt know that web decoding would completely mess up gamma of the video, the mp4 file with h264 codec in sRGB colorspace looked perfectly as a file but in web playback was completely washed out and horrible.
So I solved the problem by rendering mov. DNxHD file with Rec709 colorspace and it fits to youtube perfectly. Is it because HTML5 decoding and player is set to this colorspace? Because when I uploaded h264 file with sRGB colorspace to youtube it looked washed out like I described but the original file image looked as it looked in Premiere Pro preview. DNxHD on the other side, had really strong contrast as rendered out file but when I uploaded it to youtube it looked like the h264 file looked originaly. Is it because difference of sRGB colorspace and Rec709 colorspace?
 
What you're asking is a rather complicated topic and I'm not really sure what you're asking.

DNxHD is a codec. It's an editing codec. h.264 is what most consider a delivery codec. If you're watching a video online, it's usually a safe bet, it's using the h.264 codec.

While I haven't done any web programming since HTML5 (I just looked up the video part of it), from what I read, I think it's relatively safe to assume the web server won't process the video, it'll just stream it to the client to decode and play. With that in mind this is why your question doesn't make that much sense to me. If you know otherwise, let me know and we'll go from there.

when I uploaded h264 file with sRGB colorspace to youtube it looked washed out like I described but the original file image looked as it looked in Premiere Pro preview

I've been trained to expect Youtube to re-encode everything you upload. The end result has a lot to do with the quality of the original material. Eg. Low bitrate, highly compressed long-gop codecs etc.

Is it because difference of sRGB colorspace and Rec709 colorspace?

Possible, but highly unlikely.

It might help if you gave samples. Before and after etc.
 
Actually, all internet content is displayed in sRGB.

If you upload a video in Rec709, it then has sRGB affecting it (as it is online).

If you upload a video in sRGB, it has nothing affecting it.

Rec709 looks different online than it normally does, but it is not a full conversion of the table, simply a table on top of that table.

-------

sRGB looked wrong to you because you're used to seeing Rec709 with sRGB affecting it.

------

If you're into color grading then you'll want to buy a professional color grading monitor.

For example, my monitor has a default setting. That setting is almost color perfect (within a -2 gamma range), but when I'm correcting for a YouTube video, I wouldn't use my color-perfect setting as nothing will ever be displayed online in that same color.

So the monitor is preloaded with different LUTs, so I can see my local files as if they were online. This way I can grade my Rec709 to exactly the colors I want displayed on YouTube.

Separate grades for separate deliveries. I recommend doing so.
 
Last edited:
sRGB looked wrong to you because you're used to seeing Rec709 with sRGB affecting it.
.

so when I am grading footage that is straight from the camera I am seeing Rec709 colorspace. And than when I wll upload it online, it converts to sRGB colorspace and it looks wrong did I get it right?

So solution is either to use some sort of sRGB LUT when grading or to encode original camera footage to sRGB colorspace?
 
Can I ask what LUTs are you using?

When grading for DVD, Blu-Ray, Projection, etc (NOT ONLINE) I grade in Rec709.

When grading for YouTube, Vimeo, or other online media sites I grade in Rec709 with my monitor set to sRGB.

so when I am grading footage that is straight from the camera I am seeing Rec709 colorspace. And than when I wll upload it online, it converts to sRGB colorspace and it looks wrong did I get it right?

So solution is either to use some sort of sRGB LUT when grading or to encode original camera footage to sRGB colorspace?

Here, let me break it down as simple as I possibly can.

You grade in Rec709, you then have Rec709 colors. Now put sRGB ON TOP of those POST-GRADE Rec709 colors.

That looks different than importing your Rec709, applying sRGB, and then grading.

Rec709 > Grade > Online (sRGB) =/= Rec709 > sRGB > Grade > Online

--------

Grade it in Rec709, upload it in Rec709.

ONLY if you have a monitor with a professionally calibrated presets will you be able to accurately know what the Rec709 video will look like Online before uploading it.

--------

Your luma getting adjusted by uploading is from the encoder. Not the colorspace.
 
It's hard to tell what's actually happened but I can hazard a guess (though I'm not sure if Vimeo would do this).

That picture was very dark. How was the image captured? The blacks were crushed to hell. If you take a look at your scopes you should be able to see this, though this is a tiny jpg, so it's possible the image was altered in the encoding - unlikely.

Perhaps the reencoding step (on Vimeo) is altering the picture? Personally, I wouldn't have expected that from Vimeo. Test it a bit to find out. Try grading without crushing the blacks and uploading and see if it does the same.

Is your monitor calibrated? Do you know if you're seeing an accurate picture or are you working by your scopes?
 
What you saw might be a gamma shift while encoding to h.264:
http://www.videocopilot.net/blog/2008/06/fix-quicktime-gamma-shift/

This creates grey blacks and grey whites => washed out image.

BUT if this is indeed the case: you should see it after exporting and before uploading.

Otherwise I think you should check Sky's suggestions.

(I only have experience with the gamma shift when I used Quicktime Pro to convert files to H.264, because that yielded a better looking file than Adobe's Media Encoder uptill somewhere about 1,5 year ago.)
 
When grading for DVD, Blu-Ray, Projection, etc (NOT ONLINE)

ONLY if you have a monitor with a professionally calibrated presets will you be able to accurately know what the Rec709 video will look like Online before uploading it.

so my consumer monitor can show only Rec709 colorspace and the is no way for me to see the video as it will look online unless i have professional calibrated monitor which can display in sRGB colorspace
 
so my consumer monitor can show only Rec709 colorspace and the is no way for me to see the video as it will look online unless i have professional calibrated monitor which can display in sRGB colorspace

Actually, your consumer monitor most likely shows you the Adobe RGB 1998 colorspace. Which is 40% wider than sRGB. Particularly in the cyan to green area of the CIE.

(Although I haven't owned a consumer monitor in awhile... Adobe RGB 1998 is still the standard consumer ICC, right?)

----

Nonetheless, you are correct. If you'd like to see exactly how the video will look online to the most accurate representation possibly, you will need to get a professionally calibrated monitor.

Personally, I recommend ASUS. I got my monitor from them and send it back every 6 months to get re-calibrated. However, EIZO also has some great color grading monitors, but are a bit more (understatement) on the pricey side.
 
Last edited:
Back
Top