As u can see SOURCE Fraps.avi and Encoded x264.avi files are different.
x264 - More brightness/lower contrast
The point is to make Encoded x264.avi look same as SOURCE Fraps.avi with any computer. The goal is to deliver source quality to everybody.
Please help me with that.
UPDATE:
The problem was not in x264 codec itself.
This 3 steps is the solution1) Make sure that graphic card configured to use 0-255 and not 16-235 (use graphic card parameters not Player) https://forum.videohelp.com/threads/326496-file-in-Virtualdub-has-strange-colors-when-o...=1#post2022085
2) Do you have fraps enabled in ffdshow? If so, disable it
3) you can enable ffdshow, and under the RGB options choose BT601. You might have to configure it so only RGB is selected (uncheckmark other options like YV12, YUY2 etc...)
Be aware: Most of your other HD videos like movies may not look correct with those settings (colors will be off)
In that case skip step 3.
Thank You jagabo and poisondeathray! You both helped alot. (better that any tech support)
Now both sample1 and sample2 are same with any video player, with 0-255 and 16-235, with any output method. VMR9 or Overlay mixer.
Image with Problem:
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 44
Thread
-
Last edited by SavageStyle; 29th Sep 2011 at 23:18. Reason: Link to image
-
The problem isn't in x264. It's in the way your software is displaying the videos. There are lots of threads here about the issue. Some examples:
https://forum.videohelp.com/threads/331889-Windows-ffmpeg-x264-brightness%28-%29-problems
https://forum.videohelp.com/threads/329866-incorrect-collor-display-in-video-playbackLast edited by jagabo; 29th Sep 2011 at 11:38.
-
yes , very like likely a playback configuration issue, either renderer or graphics card settings
dozens of threads on this topic here and on doom9 forum -
yes, but the point is to bring same quality to all users. If i fix that problem locally it dosent fix anything. mb Should i use other codec?
-
No matter what codec you use you can't control what people will see on their monitors. Their graphics card and player may be misconfigured just like yours. Encode to spec and your video will be correct. It's other people's problem if their computers are displaying video incorrectly. Those people are used to seeing the wrong levels and your video will look "normal" to them.
I suppose there's one possibility: encode as uncompressed RGB. But your files will be gigantic. -
ConvertToYV12(matrix="PC.709") # keeps full range
instead of ConvertToYV12()
most likely, you will be satisfied with this
Why do you use avi container for H.264 ? -
-
OP got his video from video editor through VFW x.264 ?
Anyway, this bugs me for a while, follow this, I have m2t videos from HV30 camcorder, I correct progressive flags in Restream, because video is shot in progressive mode, load it as progressive to Vegas video editor , export through frame server into Megui, ripbot264 (doesn't matter) , through avisynth script ,I put this line in it :
ConvertToYV12(matrix="PC.709")
Only then I have same colors like original m2t. Doesn't matter how I watch this video. Encoded H.264, through YouTube after uploading, encoded H.264 on the other peoples TV's and mine through WDTV Live . Now, where in this workflow am I making mistake or what you would do if I may, because if I do things as I should do as you and other say I always end up with washed out colors on the screen. Any screen. Any TV. -
But that's vegas' fault and only for a very specific situation. I wouldn't go generalizing what works for you in that specific situation to apply to other scenarios
When using default settings vegas will use studio RGB . YUV to RGB conversions will cause black will be mapped to RGB 16,16,16 and white will be mapped to RGB 235,235,235 . This is instead of the normal 0,0,0 - 255,255,255. When exporting out, you need a "PC" matrix to exand the range back to normal
For the FRAPS scenario, it depends if he using AVISource and the fraps decoder (always returns RGB), or if he's using libavcodec (e.g. through FFVideoSource) , which may return YV12 but at Y'0-255 . He never mentioned vegas -
-
No, it's not
ConvertToYV12() means RGB 0,0,0 - 255,255,255 => Y' 16-235, CbCr 16-240
So it takes a normal RGB scaled clip (black is at zero, and white is at 255) and convert it to "legal range" YUV. This will look normal on properly calibrated sets, youtube, dvd, blu-ray etc
ConvertToYV12() with a "PC" matrix means RGB 0,0,0 - 255,255,255 => Y' 0-255, CbCr 0-255 . So full range in and out
The problem with vegas is it doesn't use sRGB, it uses studio RGB . Black is "mapped" at 16,16,16, white is "mapped" at 235,235,235 . This is atypical. 99.9% of programs use black at RGB 0,0,0, white at 255,255,255
So for that vegas scenario, the PC matrix works because black is already at 16,16,16 and becomes Y' 16 , similarly white is already at 235,235,235 and becomes Y' 235 . So you end up with a proper "legal range" clip Y' 16-235.Last edited by poisondeathray; 29th Sep 2011 at 18:11.
-
ok, so in my case Vegas is the Devil , wonder how many people gave up Vegas - frame server - x.264 encoder elegant workflow and x.264 encoders at all for their videos and they are using build-in encoders only because they think that those x264 encoders suck , I had exactly the same feeling years back when I tried it first time
-
Now that's just crazy talk... x264 >> either vegas' mainconcept or sony avc encoder
But that's only part of the story. Even with a proper legal range YUV clip , there are dozens of potential problems between systems that will cause the video to look different.
The choice of renderer , graphics card settings, monitor calibration... Even youtube isn't necessarily consistent. Flash will use Rec601 to convert to RGB for display if you use HW acceleration, but Rec709 if you don't (not the luminance differences that the OP is experiencing, but slight shift in colors) -
Why i should not use .avi container? (any other, why?)
Im using VirtualDub
In Vegas with same x264 codec configuration i got awful quality (wtf lines appear) and same brightness effect, also vegas is SLOW.
Example: CLICK
ConvertToYV12(matrix="PC.709") - is that script? How i can execute it (not in the codec commandline i guess)?
Main problem still not soleved, waiting for ur assistance! (thx)
btw uncompressed fraps.avi looks same on any computer -
Upload a small sample of your fraps source.
Play the attached x264/mkv file on your system. It should look like the top image in this post:
https://forum.videohelp.com/threads/326496-file-in-Virtualdub-has-strange-colors-when-o...=1#post2022085
If you can't play the mkv file play the DV AVI file in that post.Last edited by jagabo; 29th Sep 2011 at 19:09.
-
AVI is less reliable for h.264. You can get green frames, stuttering, b-frame decoder lag. If you must use AVI, then mux into a different container later like mp4 (yamb) or mkv (mkvtoolnix)
1) Are you using fraps RGB mode ?
2) Are you opening directly in vdub then using x264 vfw? Which version of x264 vfw? (it will say on the GUI)
3) Are you doing any editing?
4) How are you playing this back? a) What media player , and is only 1 open at 1 time ? b) What decoder ? c) What renderer ?
5) Show me your graphics card settings
6) How are you taking screenshots ? What software/method -
-
-
I thought I remembered a thread a while back where we discovered that fraps uses the wrong matrix when converting from RGB (screen cap) to YUV (stored, if a YUV mode is chosen). It uses a PC matrix, not a REC matrix:
https://forum.videohelp.com/threads/338201-Colorspace-loss-when-converting-from-FRAPS-to-XviD
That means most other programs will decode the video improperly (most programs use the REC matrix). The result would normally be crushed blacks and brights -- ie too much contrast. -
Yes, off topic - in addition to resizing, deinterlacing, chroma upsampling, colorspace manipulations are done better in other programs. But vegas still is a great NLE
thought I remembered a thread a while back where we discovered that fraps uses the wrong matrix when converting from RGB (screen cap) to YUV (stored, if a YUV mode is chosen). It uses a PC matrix, not a REC matrix:
https://forum.videohelp.com/threads/3...-FRAPS-to-XviD
That means most other programs will decode the video improperly (most programs use the REC matrix). The result would normally be crushed blacks and brights -- ie too much contrast.
Opening video directly in vdub with fraps in RGB mode using fraps decoder will return RGB, or avisource if fraps decoder is enabled (ffdshow disabled) -
1) Are you using fraps RGB mode ?
If you mean "Force loseless RGB capture" - No
2) Are you opening directly in vdub then using x264 vfw? Which version of x264 vfw? (it will say on the GUI)
I open fraps file in vdub then use x264vfw codec.
x264 Window: CLICK
3) Are you doing any editing?
No
4) How are you playing this back? a) What media player , and is only 1 open at 1 time ? b) What decoder ? c) What renderer ?
Im using Media Player Classic 6.4.9.1
no difference how many player windows are open. Nothing changes.
CLICK
5) Show me your graphics card settings
It's in Russian ><
(GTX470) Well it's set to VIDEO: Use Player Configuration
PS: no changes if i use NVIDIA Configuration
6) How are you taking screenshots ? What software/method
ctr+scr or ALT+I (in Media Player Classic (save snapshot))
Using both, result the same, no difference screenshot-video
SMALL FRAPS.avi EXAMPLE: https://rapidshare.com/files/3687766507/sample.avi -
vrm9(renderless) is very likely your problem . That renderer will cause YUV->RGB to look washed out as the black level is elevated
If you use overlay mixer, that will depend on your graphic card overlay settings
For example, try opening your encoded video in VLC (which by default will use overlay mixer) -
The reason I asked if you have several instances open, is that only 1 video application can use the video overlay , the 2nd will use VRM9 and look washed out
So do this test . Set MPC to overlay mixer, close it (for settings to take effect) reopen the video. Open 2nd instance and look at the difference (the 2nd will be using probably VRM9, not overlay mixer)
You can use jagabo's test charts and videos to calibrate both 1) your desktop settings 2) graphics overlay settings
Again, you have no control over how other people have their video players , settings, graphics cards set up
(I swear there should be a sticky for this topic. Every week someone asks the same question about fraps) -
So do this test . Set MPC to overlay mixer, close it (for settings to take effect) reopen the video. Open 2nd instance and look at the difference (the 2nd will be using probably VRM9, not overlay mixer)
The Second window dosent work with overlay mixer (MPC falt, it should not use Overlay Mixer for 2nd window) well no matter.
Tested with 0-255 insteed of 16-235 (Graphic Card),
Yes the x264.avi looks less washed, BUT the source fraps.avi looked even darker
for example
16-235
fraps.avi: 10 brightness
x264.avi: 12 brightness
0-255
fraps.avi: 8 brightness
x264.avi: 10 brightness
Ok i cant control what people will see with different Graphic Card settings.
BUT how hell i can match fraps.avi brightness and x254.avi brightness?
I have to match it so they look same.
Can you also upload a sample after you've encoded with x264vfw?
Source Sample CLICK
x264 Sample CLICK
For example, try opening your encoded video in VLC (which by default will use overlay mixer)Last edited by SavageStyle; 29th Sep 2011 at 21:04.
-
I meant 2 instances of the x264 encode. The 1st will use overlay, the 2nd will use VMR => this is to illustrate that there will be BIG difference in appearance, even though it's the SAME video . The reason is you were using VMR9 . Different renderers and playback settings can cause BIG difference in appearance
Both encodes look the same to me in terms of luminance (save these to your desktop and switch back and forth so that you view them at the same viewing angle on your monitor, top is video1, bottom is video2)
It's not an x264 encoding problem; as mentioned from the very beginning - it's a playback configuration issue
So fine tune your playback settings . Use [search] and read the dozens of threads that tell you how to configure your setup. -
-
Last edited by jagabo; 29th Sep 2011 at 21:10.
-
jagabo posted some instructions on how to calibrate with test videos and charts before. There were some even with nvidia control panel screenshots (but in English), maybe he can provide the exact links
-
It will be great to end this thread with solution (link or whatever). If you know exact location of Calibration topic i needed please, share.
Last edited by SavageStyle; 29th Sep 2011 at 21:24.
Similar Threads
-
Correcting saturation, contrast, brightness, etc...
By takearushfan in forum RestorationReplies: 28Last Post: 21st Sep 2011, 23:32 -
Video editing of brightness and contrast?
By capman21 in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 13Last Post: 6th Feb 2008, 19:31 -
Change brightness, contrast, color, etc.
By JoeMuskie in forum EditingReplies: 4Last Post: 22nd Oct 2007, 23:26 -
Fixing brightness/contrast on a DVD
By Salva Veritate in forum EditingReplies: 4Last Post: 7th Oct 2007, 21:05