View Full Version : Wrong Colors when using Dire
NoFatClips
8th August 2007, 09:59
Hi!
Don't know where this thread should actually belong, but since the problem seems to be related with AviSynth...
I'm using StaxRip to encode movies people send me to be posted on my blog. Sometimes I've noticed a shift in colors but nothing really annoying, until now.
Here's a sample:
http://img489.imageshack.us/my.php?image=tantalusku0.jpg
As you can see, the colors are completely different.
On the left you can see the StaxRip preview, before encoding. No filter is selected, except DirectShowSource.
On the right is the file Eric Henry sent me, played in Videolan. It's a Quicktime file with JPEG video and uncompressed audio.
The version of AviSynth is 2.5.7
Is this a known issue? And above all, there's a known solution?
Thanks in advance.
DeK
Warpman
8th August 2007, 14:04
vlc uses overlay to display the video, the colors range will be extended from 16-235 to 0-255 (tv range--> pc range).
Staxrip preview doesnt uses overlay it only displayes the yv12 image.
If you encode your video the colors will exactly like your source if you display it in vlc(leaving the loss of quality by recompressing your video aside).
NoFatClips
8th August 2007, 14:55
Didn't know about that, otherwise I'd have posted a thumbnail of the encoded clip.
In fact, encoding with X.264 yields a similar result:
http://www.divshare.com/download/1506753-7c5
The bottom of the sea is visible, but the colors are still wrong.
Is this due to the YV12 conversion?
Warpman
8th August 2007, 16:01
mhm there something wrong then...
if u watch the video with some kind of directshow dependent player like mpc or zoomplayer does the 2 videos look the same?
NoFatClips
8th August 2007, 18:48
With MPC the problem is less perceivable, but mainly because the original clip has the same color degradation. Still...
http://www.divshare.com/download/1508895-c44
Warpman
8th August 2007, 18:52
does
ColorYUV(levels="TV->PC")
after directshowsource fixes it?
NoFatClips
8th August 2007, 19:01
The source is not YV12, and putting it after ConvertToYV12() hasn't much sense I guess.
Warpman
8th August 2007, 20:17
i doubt your file isnt yv12...
btw where does the convert to yv12 come from? u said in your 1st post:
"No filter is selected, except DirectShowSource."
so where is that converttoyv12 coming from?
directshowsource naturally requests yv12 from the decoder, if you add a converttoyv12() at the end it will do nothing...
maybe u should :script:
and answer my question from before...
NoFatClips
8th August 2007, 20:44
No filter was selected when I took the first image from the preview. However, in order to encode the movie StaxRip requires Converttoyv12() to be added and selected, otherwise it won't even start the job.
> i doubt your file isnt yv12...
The video track is in JPEG format. As far as I know, JPEG images use RGB color. Don't know about the video but it should be the same.
The script is simply:
DirectShowSource("C:\Eric Henry\!Sometimes I Feel Like This\Tantalus\TantalusSD-pjpg.mov")
ConvertToYV12()
Forcing YV12 in the DirectShowSource directive gives an error.
foxyshadis
9th August 2007, 04:54
jpeg uses fullscale YV12, YV16, vertical YV16, or YV24. However, every decoder outputs RGB, which is then converted again to YV12 for video encoding, since all MPEG formats use tv-scale YV12.
Your original plays properly because it's fullscale, whereas the new is tv-scale; although mpeg video is supposed to be tv-scale and rendered the same way fullscale jpeg, drivers for both of the popular video cards decided to only do this for HD video.
You can try ConvertToYV12(matrix="PC.601"), but the highs and lows will be lost when you watch it on a calibrated player (like a normal tv or on a pc player using overlay mode). Normally this is fixed in playback though, by changing your VMR9 color controls in the driver, setting the yuv levels tweak for nvidia, always outputting RGB (so you bypass the card's broken YV12->RGB), or using levels somewhere.
NoFatClips
9th August 2007, 08:38
ConvertToYV12(matrix="PC.601") yields more or less the same colors I get when I play the original file on MPC, which is good enough to me, and I guess is the best I can obtain sticking with MPEG, right?
Thank you both for your answers.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.