Log in

View Full Version : How can i tell if an encode classifies as "transparent"?


kurkosdr
17th June 2011, 12:12
How can i tell if an encode of an uncompressed video stream to MPEG 2, MPEG 4 ASP or MPEG 4 AVC classifies as "transparent"? I 've heard that there are absolute limits to what the eye can see and distinguish (aka, transparency is not an entirely subjective thing), so it would be nice if there was a way to make the loss caused by the encoding to MPEG 2, MPEG 4 ASP or MPEG 4 AVC be within this limits.

Which settings in ffmpeg, xvid or x264 accomplish this?

7ekno
17th June 2011, 15:24
xvid ~ q2
x264 ~ --crf 16-18

The only way to tell is close comparison of source vs encode with tools like Avisynth and StackVertical/Horizontal, AvSP where you can flip back and forth between source & encode, etc ....

Transparent is more subjective than you give it credit for :P

7ek

kurkosdr
17th June 2011, 17:48
xvid ~ q2
x264 ~ --crf 16-18
ffmpeg for mpeg 2?

The only way to tell is close comparison of source vs encode with tools like Avisynth and StackVertical/Horizontal, AvSP where you can flip back and forth between source & encode, etc ....

Transparent is more subjective than you give it credit for :P
I 've heard that even the "perfect human eye" can't distinguish colors with a difference of " <=4" but i don't have a clue what that "" measurement is. Note that this is the absolute limit, so some eyes may be below that, aka not being able to distinguish a difference of  <= 5 or more.
But i think  <=4 is the value that a truly transparent encode should be targeting, as it would remove any subjectiveness (since it is the absolute limit).

I understand that what i just asked is probably way beyond the scope of this forum, but if anyone knows, post.

GodofaGap
17th June 2011, 18:32
What is a difference of "<=4"? And how would that be a useful metric for transparency?

Wilbert
17th June 2011, 20:33
What is a difference of "<=4"?
I think it refers to nanometers (wavelength).

kurkosdr
17th June 2011, 20:59
Oops! It seems that doom9's forum can't handle unicode characters, so it "ate" two unicode characters from my post. The unit i was refering to was "Delta-E", the international metric for color difference.

http://en.wikipedia.org/wiki/Color_difference

So, to sum up, a Delta-E (color difference) equal or less than 4 is supposed to be indistinguishable to the human eye, and hence "transparent" to everyone. Provided of course our encoders can (with some setting) produce a result that conforms to this metric (color difference between two adjacent pixels, for all the pixels in the same frame, is equal or less than 4).

I know this thing is getting way beyond the scope of this forum, so i don't expect anyone to know this, but it's not bad to ask in case someone knows. Right?

GodofaGap
17th June 2011, 21:34
I don't think the 8 bit per channel color systems we have now in the common distribution formats (DVD/BluRay) provide such precision. Banding is still a serious problem in modern digital video.

7ekno
18th June 2011, 01:32
I know this thing is getting way beyond the scope of this forum, so i don't expect anyone to know this, but it's not bad to ask in case someone knows. Right?

Your understanding is lacking ...

Color is the least of the "transparency" issues, the eye is so insensitive to color digital video often has half the chroma data (4:2:0 or 4:2:2 formats) ...

Transparency refers to the point where encoding artifacts are so minimal that the difference compared to source is indistinguishable (and there are very minimal "color" artifacts that you will see) ...

7ek

hello_hello
18th June 2011, 16:18
xvid ~ q2

Is that really supposed to be transparent for XviD or is just "as good as it gets"?

I ask because a while back I tried comparing a q2 encode (using AutoGK's 100% quality setting) with the preview AutoGK produces (no encoding) and also with the source video. I was using a HD video as the source without any resizing.
Comparing the original, the preview and the actual encode, the encode didn't seem transparent to me (the original and the preview looked identical). It was very close, but there was some loss of very fine detail compared to the un-encoded preview and original. The mpeg matrix looked identical to the h263 matrix while the custom matrix used by AutoGK looked very slightly better.

Mind you it's the sort of thing you'd really only see with the source and the encode running side by side, but I'd only call it "very close to transparent".

When it comes to encoding with x264 and a CRF of 16-18 however, if there is a visible difference I probably have to pause the source and encoded videos at identical frames to examine them in order to see it. Even if it's not "really" transparent, it definitely looks closer to transparent than XviD's transparent does.

At least that's my take on it.

kurkosdr
18th June 2011, 16:37
Thank you all for your answers. Since xvid's q2 does produce some visible differences to at least one person, how about cranking it up to q1? Will anyone be able to see any differences then?

Same for x264 and ffmpeg. If they are cranked up to the highest quality setting, will anyone be able to see any differences?

I could do this experiment my self, but my when it comes to video, my eyes are far from what you 'd call a trained pair of eyes.

Astrophizz
18th June 2011, 18:20
x264's highest quality is actually lossless, so you wouldn't be able to see a difference.

kurkosdr
19th June 2011, 13:37
x264's highest quality is actually lossless, so you wouldn't be able to see a difference.
I was referring to the highest non lossless setting.. If we set x264 to that, and xvid and ffmpeg to their highest settings, will anyone be able to see the difference?

That's the million dollar question :)

LoRd_MuldeR
19th June 2011, 22:17
I was referring to the highest non lossless setting.. If we set x264 to that, and xvid and ffmpeg to their highest settings, will anyone be able to see the difference?

That's the million dollar question :)

No matter what encoder/format you use, you will always be able to get "transparent" quality - if you only throw enough bitrate on it :p

The real "million dollar question" is: How much bitrate do we need to spend for a certain level of quality? And in that disciple x264 currently beats Xvid (and almost anything else) by far. So the main purpose of more advanced video compression standards (encoders) is not to get better overall quality, but to get better quality at a given bitrate -or- to get the same quality at a lower bitrate...

(If you only care about overall quality and compression/bitrate doesn't matter, then even good old MPEG-2 could still do the job for most applications)