VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. Member
    Join Date
    Mar 2011
    Location
    California
    Search Comp PM
    Having read through a couple of different topics on these forums regarding the massive loss in color quality when rendering a video from a lossless AVI file produced by FRAPS to a more compressed h264 mp4 file, I felt it was sort of necessary to register and ask some questions.

    Firstly, I read through these (1 and 2) threads, and while I sort of understand what people are saying, it still isn't clear what sort of steps should be taken to ensure maximum quality (including color).

    I'm currently using Premiere Pro CS5 and After Effects CS5 to edit and render my videos, but each time I notice I'm losing massive amounts of color quality by rendering the FRAPS avi files in After Effects to mp4 using h264.

    So, basically what I'm asking is, what are the steps to producing high quality footage if rendering to h264 (youtube's recommended codec) from FRAPS' lossless avi, without having color loss.
    Last edited by kks; 6th Mar 2011 at 19:48.
    Quote Quote  
  2. You can't avoid RGB 4:4:4 to YUV 4:2:0 chroma subsampling when converting to h.264. So colored edges will get a little blurry:

    https://forum.videohelp.com/threads/294144-Viewing-tests-and-sample-files?highlight=chroma+worked

    There will be a small loss of precision (as RGB has a range of 256 values for each color primary, and YUV only has about 220 for each channel) but that's usually not noticeable.

    The usual problems people have relate to computer vs. studio RGB to YUV conversion (the contrast is screwed up) and too much compression.

    Also, since your video is probably high definition you may want to use the rec.709 color matrix rather than rec.601.

    And lastly, be careful how you compare two videos. Two media players side by side will often result in different looking video -- even when playing the exact same file. That is because only one program can use the graphics card's video overlay feature at a time. And video overlay has its own proc amp settings, separate from the desktop.

    Post short sample of your source and the conversion.
    Last edited by jagabo; 6th Mar 2011 at 19:59.
    Quote Quote  
  3. EDIT: I type too slow. ^What jagabo said
    Quote Quote  
  4. Member
    Join Date
    Mar 2011
    Location
    California
    Search Comp PM
    I know it's not the media player's problem, because YouTube outputs the same color problem. Either way, what would you recommend, mpeg-2 or h264? I had problems with compression and quality with mpeg-2 and had none with h264, which is why I've stuck with it all this time.

    I also generally try not to use wmv, because last time I did youtube desynced the audio from the video.
    Quote Quote  
  5. MPEG 2 and h.264 both use 4:2:0 chroma subsampling and have the same issues with computer vs studio RGB, and rec.601 vs rec.709 colors. As you've found h.264 can compress better than MPEG 2.

    The flash player used when viewing Youtube can deliver different colors because it doesn't use video overlay. So that's no sign that the colors are wrong or different.
    Quote Quote  
  6. Member
    Join Date
    Mar 2011
    Location
    California
    Search Comp PM
    So what would you recommend I do then?
    Quote Quote  
  7. Post a sample of your source and conversion so we can tell you what went wrong (if anything) and give you suggestions on how to fix it.
    Quote Quote  
  8. Member
    Join Date
    Mar 2011
    Location
    California
    Search Comp PM
    Decided to use this since I delete the source files each time I upload them, and I actually kept the files for this one.

    Original FRAPS source files
    https://forum.videohelp.com/images/imgfiles/V5Dn6.jpg

    h264 Rendered through After Effects
    https://forum.videohelp.com/images/imgfiles/5CRmz.jpg

    Those were taken with MPC (Combined Community Codec Pack). I can take them with VLC or WMP if necessary.

    These are my usual render settings
    https://forum.videohelp.com/images/imgfiles/NTYyz.png
    https://forum.videohelp.com/images/imgfiles/NkGva.png
    https://forum.videohelp.com/images/imgfiles/ZJBJG.png

    If it's the bitrate I can bump that up, it would just increase the size of each video slightly, which isn't a huge problem.
    Quote Quote  
  9. you can't be certain with screenshots, because the method in which you take screenshots can change the appearance

    but if we assume those were done properly, you have both problems, the color subsampling (not fixable) , and levels issues (eg. black level is to high, and white is too low, so everything looks washed out)

    does the preview within AE look ok with respect to the black level ?

    export out an intermediate lossless RGB file , then use a different encoder like x264. You can use a GUI like ripbot, megui, handbrake etc...

    AE only supports 1 pass encodes, and the h264 encoder isn't that great either



    EDIT: I just did a quick test with Fraps and AE, and there is no levels shift, only subsampled colors (more blurry). You must be doing something else differently. I didn't have preserve RGB checked
    Last edited by poisondeathray; 6th Mar 2011 at 22:07.
    Quote Quote  
  10. Member
    Join Date
    Mar 2011
    Location
    California
    Search Comp PM
    I already tried that actually. I edited, exported using AE to a lossless AVI, then threw it through Handbrake's h264 encoder to compress the size, and I got pretty much the same result I got from AE's encoder.

    I'll post exactly what I do each time I go to make a video either later tonight or tomorrow afternoon at some point. If I'm doing something wrong I can you can find it, because I've tried various different methods and I keep getting the same result no matter what. :/
    Quote Quote  
  11. When you preview the lossless AVI export out of AE, does it look ok? How are you looking at it ? What software


    Does it look ok in AE's preview window? I'm using an older version of fraps maybe you're decoding it differently ?


    If the levels are incorrect in AE export, you can fix them with avs script before encoding




    Post actual video samples . Only need 1 or 2 frames

    You can use vdub with , video=>direct stream copy , and mark in/out a section to cut, then file=>save avi
    Quote Quote  
  12. Member
    Join Date
    Mar 2011
    Location
    California
    Search Comp PM
    When I preview the lossless AVI it looks OK, in and out of AE. I preview it with various software, and it looks just fine when I upload it. I've used Media Player Classic, Windows Media Player, Quicktime, and VideoLAN to preview it, and it always looks fine.

    I'm using FRAPS 3.2.6 right now.

    Would it simply be more worth my time to use virtualdub, export to xvid, then import to Premiere and edit that way?
    Quote Quote  
  13. JPEG normally uses 4:2:0 chroma subsampling so we can't say for sure what issues may exist there.

    The contrast differences between the two images is the difference between PC and studio RGB. Presumably the RGB source was converted to YUV with a standard rec.601 (or rec.709) matrix which decreases the contrast. But on playback the decoder is using a PC.601 (or PC.709) matrix and not re-expanding the contrast.

    The brightness of an image in computer RGB can range from 0 to 255. But in video YUV the brightness is supposed to range from 16 to 235. So it's normal to squeeze the range from 0-255 to 16-235 when converting from RGB to YUV. Conversely, it's normal to stretch the range from 16-235 back to 0-255 when converting from YUV to RGB. It looks like your RGB source is being converted to YUV properly (and encoded as h.264) but on playback the player isn't stretching the contrast back to full range. Hence the not-so-dark blacks, and not-so-bright brights.

    Since you made those screencaps with MPC your problem is probably there, or possibly in the graphic card's settings. For example, in the NVIDIA Control Panel, in the video section, Avanced tab, there's an option called Dynamic Range. It can be set to either "Full (0-255)" or "Limited (16-235)". The correct setting is the former.
    Quote Quote  
  14. Member
    Join Date
    Mar 2011
    Location
    California
    Search Comp PM
    Well, looks like that was the problem. It seems weird that it was always on my end, and never a problem with the codec. Anyways, thanks for the help. I'll be sure to come here with all of my future video problems, as this was incredibly helpful.

    I think what threw me off the most was I had never actually run into this sort of problems before, because for the last two years I had AMD graphics cards, so this is my first NVidia card since the 8xxx series cards in 2007.

    Lossless: https://forum.videohelp.com/images/imgfiles/9MrwA.jpg
    h264: https://forum.videohelp.com/images/imgfiles/udbot.jpg

    There's still a little color loss, but that's nothing that can't simply be fixed by uping the bitrate a little more.
    Last edited by kks; 7th Mar 2011 at 01:40.
    Quote Quote  



Similar Threads

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