VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
Thread
  1. 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.
    Originally Posted by poisondeathray View Post
    Fraps decoder always outputs RGB 0-255 (normal)
    Libavcodec (including ffdshow, ffvideosource(), AVISource() IF ffdshow VFW is enabled) will output YV12 full range (abnormal)
    1) 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...)
    This 3 steps is the solution
    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:
    Image Attached Thumbnails Click image for larger version

Name:	DFR.jpg
Views:	675
Size:	362.2 KB
ID:	8930  

    Last edited by SavageStyle; 29th Sep 2011 at 23:18. Reason: Link to image
    Quote Quote  
  2. 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-playback
    Last edited by jagabo; 29th Sep 2011 at 11:38.
    Quote Quote  
  3. 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
    Quote Quote  
  4. 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?
    Quote Quote  
  5. 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.
    Quote Quote  
  6. 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 ?
    Quote Quote  
  7. Originally Posted by _Al_ View Post
    ConvertToYV12(matrix="PC.709") # keeps full range

    instead of ConvertToYV12()
    most likely, you will be satisfied with this
    If he does that before encoding the video will be encoded with incorrect levels. Everyone with a properly set up computer or TV will get crushed blacks and over bright brights. If he does that after encoding it will be decoded incorrectly -- what he's already seeing.
    Quote Quote  
  8. 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.
    Quote Quote  
  9. Originally Posted by _Al_ View Post
    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
    Quote Quote  
  10. Originally Posted by poisondeathray View Post
    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
    Doesn't ConvertToYV12() do exactly the same thing ? I thought that the problem was here.
    Quote Quote  
  11. Originally Posted by _Al_ View Post
    Originally Posted by poisondeathray View Post
    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
    Doesn't ConvertToYV12() do exactly the same thing ? I thought that the problem was here.
    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.
    Quote Quote  
  12. 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
    Quote Quote  
  13. Originally Posted by _Al_ View Post
    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)
    Quote Quote  
  14. 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
    Quote Quote  
  15. 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.
    Image Attached Files
    Last edited by jagabo; 29th Sep 2011 at 19:09.
    Quote Quote  
  16. 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
    Quote Quote  
  17. Originally Posted by SavageStyle View Post
    btw uncompressed fraps.avi looks same on any computer
    No it doesn't. Anyone can have their graphics card or monitor misconfigured. There's nothing you can do for those people.
    Quote Quote  
  18. Originally Posted by poisondeathray View Post
    Now that's just crazy talk... x264 >> either vegas' mainconcept or sony avc encoder
    It's not just that, making DVD with much better resize quality through frame server etc...but it is realy off topic , maybe some another thread ....
    Quote Quote  
  19. 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.
    Quote Quote  
  20. Originally Posted by _Al_ View Post
    Originally Posted by poisondeathray View Post
    Now that's just crazy talk... x264 >> either vegas' mainconcept or sony avc encoder
    It's not just that, making DVD with much better resize quality through frame server etc...but it is realy off topic , maybe some another thread ....
    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.
    libavcodec will return full range YUV (e.g. if you have ffdshow enabled for directshowsource, or avisource with ffdshow, or use ffvideosource) , but fraps decoder will return RGB .

    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)
    Quote Quote  
  21. 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
    Quote Quote  
  22. 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)
    Quote Quote  
  23. 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)
    Quote Quote  
  24. Can you also upload a sample after you've encoded with x264vfw?
    Quote Quote  
  25. 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?
    Put them closer
    Source Sample CLICK
    x264 Sample CLICK

    For example, try opening your encoded video in VLC (which by default will use overlay mixer)
    Result is same.
    Last edited by SavageStyle; 29th Sep 2011 at 21:04.
    Quote Quote  
  26. 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.
    Image Attached Thumbnails Click image for larger version

Name:	sample1.png
Views:	411
Size:	1.60 MB
ID:	8923  

    Click image for larger version

Name:	sample2.png
Views:	400
Size:	1.64 MB
ID:	8924  

    Quote Quote  
  27. Originally Posted by poisondeathray View Post
    So fine tune your playback settings . Use [search] and read the dozens of threads that tell you how to configure your setup.
    It took me few hours reading and result nothing (before i started topic) Can you provide me few links?
    Yes, i will try search again. Thank you for helping me, rly.
    PS: Are u sure that is 2 different samples ><?
    Quote Quote  
  28. Yes, both videos look the same here too. The same as the samples poisondeathray posted. The levels are perfect:

    Click image for larger version

Name:	sample2.jpg
Views:	1739
Size:	68.6 KB
ID:	8925
    Last edited by jagabo; 29th Sep 2011 at 21:10.
    Quote Quote  
  29. 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
    Quote Quote  
  30. 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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!