VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Hey all, so I've been experimenting with encoding but am noticing a loss of color/contrast in every FRAPS video I put out.. I made a couple of images and put them online for you to see including the settings I used..

    I took some raw FRAPS footage I recorded in World of Warcraft and used Huffyuv to put out a lossless file from after effects CS4.. I then used Handbrake to make an .mp4 file using x264...

    I took all screenshots of each video playing in the latest VLC player using all default settings..

    image comparison: http://i40.tinypic.com/2ecj19e.jpg
    settings used: http://i39.tinypic.com/3359i5v.gif

    You can see just between the raw fraps footage and the huffyuv lossless that the image appears more dull.. As if a very transparent white film is put over the image, which causes some desaturation and contrast issues..

    I am overall happy with the output from handbrake but am surprised this much color difference would happen even with lossless output.. What am I doing wrong? Is this normal or is something off on my end?

    EDIT: I have been searching around google and it seems it may be a color space issue.. Game uses a 0-255 colorspace and seems like after encoding has a 16-235 space which would be the cause of the loss of color/contrast... Is there any way to get around this to keep that color space after an encode?


    Thanks!
    Quote Quote  
  2. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by roper512
    Hey all, so I've been experimenting with encoding but am noticing a loss of color/contrast in every FRAPS video I put out.. I made a couple of images and put them online for you to see including the settings I used..

    I took some raw FRAPS footage I recorded in World of Warcraft and used Huffyuv to put out a lossless file from after effects CS4.. I then used Handbrake to make an .mp4 file using x264...

    I took all screenshots of each video playing in the latest VLC player using all default settings..

    image comparison: http://i40.tinypic.com/2ecj19e.jpg
    settings used: http://i39.tinypic.com/3359i5v.gif

    You can see just between the raw fraps footage and the huffyuv lossless that the image appears more dull.. As if a very transparent white film is put over the image, which causes some desaturation and contrast issues..

    I am overall happy with the output from handbrake but am surprised this much color difference would happen even with lossless output.. What am I doing wrong? Is this normal or is something off on my end?

    EDIT: I have been searching around google and it seems it may be a color space issue.. Game uses a 0-255 colorspace and seems like after encoding has a 16-235 space which would be the cause of the loss of color/contrast... Is there any way to get around this to keep that color space after an encode?


    Thanks!
    It is the difference between RGB computer graphics and video. All video standards based on Rec601 including MPeg use YCbCr with 16-235 luminance scaling. So you would use FRAPS if you want video. If you don't want video, save 24 bit RGB.

    PS: most video players intended for computer display will convert YCbCr video back to 0-255 RGB.

    BTW, "lossless" refers to compression codec in/out not color space. There is a major reduction of color gaumat converting from RGB to YCbCr with half or quarter sampled chroma (i.e. 4:2:2 or 4:2:0).
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  3. I think edDV is correct, but there is also a workspace / color coefficients issue. If you have color issues even in the huffyuv intermediate (before touching handbrake), this suggests something wrong with the settings.

    In AE, you have to go to the project settings and color settings => workspace => set whatever FRAPS is

    I'm not sure what FRAPS uses... e.g. rec.709 , apple rgb, etc... a dozen other choices, but from what I recall it uses separate color coeffecients different from the dozen or so standard choices. So your job is to find out which one FRAPS uses, and set the project settings to match

    Then in the render queue, color management tab, there is a "preserve" rgb option.

    Note if you are using alpha channel effects and want to preserve them for further editing, you have to use RGB+A (not checked off in your huffyuv settings in that screenshot). The apple animation codec set to millions of colors+ , and huffyuv set to RGBA are common lossless ways to export out of AE to do this

    When you get to the RGB=>YV12 conversion stage from converting Huffyuv to x264 or other format, you can choose to keep full 0-255 levels

    Quote Quote  
  4. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    I was talking in general for 0-255 RGB vs. 16-235 YCbCr but yes you can save Y as 0-255 but when displayed on a TV that way, blacks will be crushed and whites will be either too bright or clipped at 235.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  5. Yes, edDV, so it would matter what the intended target was, correct?

    I think something else is going on, like video playback renderer settings, because I can't replicate roper512's issues. I test with avisynth and AvsP to rule out the renderer to be consistent. eg. if you use vmr9 vs. overlay you will get duller colors, but the underlying video is the same.

    I already mentioned this to roper512 in PM, but what I do now is make a test video using the belle nuit test chart with the same characteristics of my input format and simulate the workflow I might be doing (I learned this "trick" from edDV from another thread, and it saved my a$$ a number of times and it's great for learning & testing and figuring out how different video apps treat different formats).

    So I made a RGB32 fraps avi, imported into AE, exported huffyuv using your same settings.

    Besides the colorspace conversion that fraps originally does when making the RGB32 video (you can see the line shift), the levels/gamma/saturation are virtually identical in the Fraps input vs. Huffyuv export.


    ss from original RGB video UT video codec



    ss from fraps AVI video (notice the line shifting)



    ss from huffyuv export video
    Quote Quote  
  6. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Thanks for all the information guys..

    I tried doing as poison said.. I went into AE, took a tiny clip of the animation and went through rendering out many times with all the colorspaces in that list (with preserve RGB enabled)... Some were totally out of wack, some were closer, but none matched the original footage.. I guess I'm stuck with how it is?

    edDV - yeah I'm familiar with crushed blacks and whatnot but anything I record through FRAPS will never go through TV.. would just stay as played back on computer monitors or whatever.. Camcorder stuff would be a different story but that won't suffer from the same problem..?
    Quote Quote  
  7. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray
    Yes, edDV, so it would matter what the intended target was, correct?

    I think something else is going on, like video playback renderer settings, because I can't replicate roper512's issues. I test with avisynth and AvsP to rule out the renderer to be consistent. eg. if you use vmr9 vs. overlay you will get duller colors, but the underlying video is the same.

    I already mentioned this to roper512 in PM, but what I do now is make a test video using the belle nuit test chart with the same characteristics of my input format and simulate the workflow I might be doing (I learned this "trick" from edDV from another thread, and it saved my a$$ a number of times and it's great for learning & testing and figuring out how different video apps treat different formats).

    So I made a RGB32 fraps avi, imported into AE, exported huffyuv using your same settings.

    Besides the colorspace conversion that fraps originally does when making the RGB32 video (you can see the line shift), the levels/gamma/saturation are virtually identical in the Fraps input vs. Huffyuv export.
    pdr - how did you record video with fraps on the desktop? were you in d3d or opengl application viewing the image? I couldn't seem to record video with fraps even in after effects with the openGL accelerated window... Strange..
    Quote Quote  
  8. When you get to that stage of encoding to the final format (e.g. in handbrake or whatever) you can specify the different matrices or levels with avisynth

    e.g. ConvertToYV12() will use Rec.601 16-235

    If you used ConvertToYV12(matrix="pc.601"), it would use rec601 coefficents, but full 0-255 range (i.e PC levels)

    There are several other combinations, and it also depends if you are using SD vs HD, because the graphics card drivers handle SD vs HD differently. You typically use Rec.709 coefficients for HD content.
    Quote Quote  
  9. Originally Posted by roper512
    pdr - how did you record video with fraps on the desktop? were you in d3d or opengl application viewing the image? I couldn't seem to record video with fraps even in after effects with the openGL accelerated window... Strange..
    When you have more than 1 video rendering app open, the overlay can only be used for 1, so make sure you are testing with 1 window open (e.g. VLC might be using the overlay, another player might be using VMR9 (renderless) etc...), the second instance will look dull with washed out colors.

    I made a lossless RGB32 avi video using UT video codec and avisynth. I played that video in MPC, and used fraps to record
    Quote Quote  
  10. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by roper512

    edDV - yeah I'm familiar with crushed blacks and whatnot but anything I record through FRAPS will never go through TV.. would just stay as played back on computer monitors or whatever.. Camcorder stuff would be a different story but that won't suffer from the same problem..?
    I don't have games or Frapps here to play with so I can't study the menus. Poisondeathray's doing what I'd do anyway with the test charts.

    Camcorders all output YCbCr over DV or HDMI. AVCHD, HDV and MPeg2 are also 16-235 YCbCr. Jagabo noted in another thread today that 1080i over HDMI is usually YCbCr where progressive HDMI can be scaled either 16-235 YCbCr or sometimes 0-255 RGB. The HDMI flags tell an HDTV to adapt levels for either.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  11. If it helps your workflow you can use HuffYUV in RGB mode to get lossless RGB compression of RGB sources. Just don't select the "<-- Convert toYUY2" settings under RGB Compression Method.
    Quote Quote  



Similar Threads

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