PDA

View Full Version : WMV encodes seem a little yellow


DMagic1
22nd May 2007, 07:42
I been using Nic's WMEnc to encode some mkv to wmv.
I'm using the wmv 9 advance profile.

I noticed the output seems a little yellowish. Is there anyway to fix this or am I doing something wrong with my avs script?

heres a sample

DirectShowSource("C:\WORK\video.mkv",fps=23.976,seekzero=false,seek=true,audio=true)

ChromeMud
7th June 2007, 02:40
My first post :) Ta daaaa.

Yeah,I've done a load of test encodes with VC-1 profile encodes and although they are of high quality,the colour does seem slightly bright/yellow'ish depending on the source.
Sometimes it's not even noticeable.
I used DGdecode to frameserve VOB's in Avisynth.I tried the colourmatrix filter to try and fix it but if anything it got worse,bleached it more so.
My guess is the colorimetry of the original video is changed
within the WMV encoder which shifts the colour slightly.
It's a thorn in my side because I won't encode anything
beyond test video's until there is a way to correct it and I
don't mean a gamma/luminance bodge.What may look right
on the monitor may not look right on TV so I won't go there.
There are all types of colorimetry standards in DVD video so the question is:-
What colourimetry is the WMV-AP encoder using?

foxyshadis
7th June 2007, 08:03
Did you try ColorMatrix(mode="Rec.601->Rec.709"), which performs the reverse transform, just out of curiosity?

check
7th June 2007, 08:42
Do you have an ati card in your system? If so, open up the catalyst control centre and disable WMV acceleration. Usually it shows up as pink video, but I have occasionally seen other colours too.

diogen
7th June 2007, 16:53
I noticed the output seems a little yellowish.Could it have anything to do with what was discussed in this thread?
http://forum.doom9.org/showthread.php?t=123202

What is the source file specs you are encoding?

Diogen.

ChromeMud
8th June 2007, 20:33
I've encoded mainly BT.709 colorimetry video from a VOB with
WMCmd.vbs and I've noticed this yellow'ish taint.It's nothing
to do with my video card because I check the results on my
LCD TV which works fine with MPEG2 encodes but not with
VC-1 encodes.
I know that with DivX you have to correct the colour but
there is nothing about the WMV encoder to say what you should do, if anything?!?

@ foxyshadis
I havn't tried the reverse colour transform yet but I'll definitely
give it a go in the week.
Black's look black so I don't that is the problem,more so a
gamma type shift midway in the colour spectrum.Deep red's
get lighter or slightly orange in one of my videos.

Isochroma
16th June 2007, 03:45
MS WMV encoder DMOs don't convert RGB to YUV properly, which causes greenshift (reds will get yellower and lighter, among other entertainments). You can verify yourself by re-encoding several times. It will become obvious.

Use ConverttoYV12() or ConverttoYUY2() at the end of your script; WMV encoders will get YUV and be happy :)

And for playback using MS DShow decoders of WMV1/2/3, be sure to use ffdshow to postprocess to RGB if you're rendering to VMR, otherwise you'll get clipped luma levels (16-235) instead of (0-255). Applies to any decoder which sends any YUV-format to the VMR.

sonicbox
16th June 2007, 22:45
Is this a "bug"? If so, why isn't it getting fixed? (Can anyone from Microsoft comment?)

If using a "one stop" application like TMPGEnc Xpress 4 to edit/encode to WMV from, say, off-the-air 1080i HDTV... How can you work around this color issue? It's a real shame.

Isochroma
16th June 2007, 23:59
It's not likely to ever get 'fixed'. Use .avs script and Nic's WMVenc, or output to a lossless file first using your one-stop app, then use avisource() and converttoyv12() (if necessary).

You can find out what format an avi decompressor delivers by adding info() to your .avs script.

You can also make an analysis of the chroma shift, and precompensate by using TMPEGEnc's internal hue adjustment filter. There may be a minute amount of chroma clipping, but that shouldn't be an issue.

ChromeMud
19th June 2007, 17:15
I thought avisynth 2.5 works in the YV12 already so there
is no need to add 'convert yv12' as long as you stay in
it's native colour format!The filters I use are in the YV12
format so I don't think thats the problem either.

Or am I wrong ? :confused:


I encode this way :-

DVD VOBs > DGDecode > Avisynth2.5 > WMCmd

Isochroma
19th June 2007, 20:55
AVISynth works in whatever color space your directshowsource(), avisource() or other source-filter delivers.

What counts is what the color space representation is at the end of the script, because this is what is being fed into the WMV encoder DMO.

use info() to find this out. It will write the colorspace and other useful data as text to the output frames.

ChromeMud
29th June 2007, 15:23
@ Isochroma

When I preview a VOB with DGIndex,it says BT.709 colorimetry
and after putting it through Avisynth,filter it,crop it,etc with
info() at the end of the script it still says BT.709 right before
it goes through the VC1 encoder,and that is all I know!

Isochroma
29th June 2007, 20:02
The only way to be sure is to do it yourself,

MPEG2Source("yourfilename.d2v")
#functions()
converttoyv12()