VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. I attempting to encode an Xvid movie in VirtualDubMod from a Huffyuv (RGB) file originally exported from Adobe Premiere CS3.

    I'm getting output that looks crisp and plays fine on standalone players, but has slightly dull colors and slightly reduced brightness compated to the original.

    I understand this can be caused by RGB-YUV conversion issues...you see, I exported as RGB from Premiere in the first place because I was advised that RGB is Premiere's native colorspace and exporting as RGB ensures your colors come out right.

    So I'm inputing my Huffyuv file via an Avisynth script to try and fix the problem but I'm a complete novice when it comes to colorspace conversions.

    Of course it would be easy to simply encode my Xvid movie with AutoGK but that program just doesn't like my Huffyuv files, so I'm doing it all manually with VDM.

    Here's the specs of my Huffyuv file:

    Complete name: D:\XviD projects\Sequence 01.avi
    Format: AVI
    Format/Info: Audio Video Interleave
    Format profile: OpenDML
    File size: 59.2 GiB
    Duration: 1h 32mnVideo
    Format: Huffman
    Codec ID: HFYU
    Codec ID/Info: Huffman Lossless YUV and RGB formats (with Alpha-channel)
    Duration: 1h 32mn
    Bit rate: 86.6 Mbps
    Width: 720 pixels
    Height: 480 pixels
    Display aspect ratio: 1.500
    Frame rate: 29.970 fps
    Standard: NTSC
    Resolution: 24 bits
    Bits/(Pixel*Frame): 8.358

    Here's my current Avisynth script which I worked out:

    AVISource("D:\XviD projects\Sequence 01.avi")
    ConvertToYV12()
    colormatrix(mode="Rec.709->Rec.601")
    Lanczos4Resize(720,304,0,60,0,-56)

    The Xvid version is 1.2.1 and the encoding profile is "Advanced Simple L5".

    I hope that's enough specs for you.

    Am I on the right track here?

    Any help would be much appreciated!
    Quote Quote  
  2. "Rec.709->Rec.601 will not fix "dull colors". Try this:

    AVISource("D:\XviD projects\Sequence 01.avi")
    ConvertToYV12(matrix="PC.601")
    Lanczos4Resize(720,304,0,60,0,-56)

    Put VirtualDub into Fast Recompress mode.
    Quote Quote  
  3. Thanks for the tip.

    I'll give it a try and post back.
    Quote Quote  
  4. Jagabo,

    I applied the Avisynth filter as per your suggestion, and while it restored the vibrant colors of the source, the output file was considerably darker than it should be.

    Perhaps an additional filter will fix...?
    Quote Quote  
  5. Did you examine the Huffyuv export from Premiere and the Xvid export from vdubmod? or are you comparing the xvid to the original source? ie. Are you sure the problem wasn't caused by the Premiere export? I ask because different versions of Premiere handle different input formats differently - sometimes an extra colorspace conversion (and or levels conversion) occurs depending on what you are using

    What version of Premiere? What source format and colorspace (e.g. DV vs. AVCHD vs. avs import etc....)

    Also what software are you using to view this? What decoder? Any filters? or is it just the standalone player?

    Maybe you could post some samples of the source, huffyuv, and xvid if you can't figure this out
    Quote Quote  
  6. Did you watch the resulting file on TV? Or on your computer? Computers have very different gamma curves than televisions so video usually looks dark and drab on a computer.

    You may have to post a representative PNG image from your HuffYUV source. Or a short clip.

    A note on what's going on:

    On computers black is RGB=0 and white RGB=255. In the video world (YUV) black is at Y=16 and white at Y=235. Small excursions below 16 and above 235 are allowable but may not look any different on the screen (ie, Y=0 and Y=16 will be the same shade of black, Y=235 and Y=255 may be the same shade of white).

    So editing applications that work in RGB usually stretch the Y 16-235 range out to RGB 0-255. Conversely, when converting from RGB to YUV they contrast compress RGB 0-255 to Y 16-235.

    But some applications convert without the contrast adjustment, giving RGB 16-235, just like the Y in YUV.

    In your case I was guessing that your RGB data was in the 16-235 range. Hence ConvertToYV12(matrix="PC.601") converts to YUV without compressing the contrast. If your source is already RGB 16-235 and you convert to YUV with the regular ConvertToYV12() you will get blacks at ~32, and whites at ~215. That would get you less contrast and washed out colors.
    Quote Quote  
  7. Originally Posted by poisondeathray
    Did you examine the Huffyuv export from Premiere and the Xvid export from vdubmod? or are you comparing the xvid to the original source? ie. Are you sure the problem wasn't caused by the Premiere export? I ask because different versions of Premiere handle different input formats differently - sometimes an extra colorspace conversion (and or levels conversion) occurs depending on what you are using
    Hi PDR, the version of Premiere is CS3.

    My troublesome Xvid encode is compared with two other exports from the same Premiere Project: the Huffyuv RGB file I've already mentioned and an MPEG-2 DVD file. Those two video exports look fine and are identical in color, contrast and brightness.

    What source format and colorspace (e.g. DV vs. AVCHD vs. avs import etc....)
    The orginal source for my Premiere project is several NTSC DVD video discs (VOB files framserved via Asvisynth to Premiere, with no significant Avisynth filtering on most of the chosen clips).

    Also what software are you using to view this? What decoder? Any filters? or is it just the standalone player?
    My Xvid encode is designed for standalone players and I test it on a flat panel 42 inch screen. The same problem Xvid file also looks wrong on my LCD computer screen, but in a different way - its slightly washed out, as if the brightness was turned up too high.

    Hope that info helps.
    Quote Quote  
  8. Originally Posted by jagabo
    Did you watch the resulting file on TV? Or on your computer? Computers have very different gamma curves than televisions so video usually looks dark and drab on a computer.
    Hi jagabo,

    See my response to PDR in the last post for an answer on what screens I'm viewing the video on.

    One thing I haven't tried yet is exporting the Huffyuv file from Premiere in its native YUV format, not RGB as recommend by some Premiere users. So the Huffyuv codec would do the colorspace conversion, rather than Avisynth. Or perhaps that makes no difference? I think I'll try it anyway....

    SD.
    Quote Quote  
  9. What jagabo was saying with the levels and expansion is often the case, depending on input format, project settings, the NLE, etc...But I did some quick tests with a similar workflow (on Premiere Pro 4, not CS3) and I don't think that's the problem here:

    To rule out workflow problems with NLE's, what I do now is use a belle nuit test chart, and generate a media file of the same characteristics of the input. e.g. In this case I would generate a mpeg2 or vob file, then use the avisynth import plugin into premiere, do some filters/edits as I would with the "normal" project, and export using the same settings and examine the chart. It is very sensitive to colorspace conversions and levels changes. I do this for all NLEs now, and they all handle things differently and often shift the levels as jagabo mentioned above if you're not careful with your settings or workflow. This way, you can figure out what workflow, project settings and export format work the best. For example, I've found out you can keep YV12 maintained (with certain filters) in Premiere4 without the colorspace conversion if you don't use the avs import plugin, so you don't suffer the extra colorspace conversion

    the Huffyuv RGB file I've already mentioned and an MPEG-2 DVD file. Those two video exports look fine and are identical in color, contrast and brightness.
    If the huffyuv export from Premiere looks fine in terms of levels, using converttoyv12() in avisynth on the file should only adjust the colorsapce, not the levels (ie. you should get full PC levels and will only get line shifting, not a brightness/gamma/saturation change - it shouldn't look more dull). If this is true, the problem must be from that point forward (ie not a problem with Premiere workflow/settings).

    The most common cause of looking dull on PC is renderer problems. e.g. VMR9 instead of overlay mixer. The underlying video is fine, but just it's appearance is dulled. Just to make sure, test using overlay mixer or different software e.g. KMPlayer or SMPlayer - but this shouldn't affect your experience on the TV - so I'm not sure what is going on...

    Maybe post some samples, and jagabo will figure it out
    Quote Quote  
  10. Well I've solved it - not sure why but it works.

    Exporting my Huffyuv file as YUV from Premiere instead of RGB now gives me Xvid encodes with identical brightness to the source. Color is still a bit reduced but is easily fixed with a small colour adjustment on any television.

    Thanks guys for the help anyway - at least I'm a little wiser about colorspace conversion in general than I was!
    Quote Quote  
  11. Were you using HuffYUV in RGB mode or RGB->YUY2 mode?

    In RGB mode HuffYUV leaves the video in RGB (RGB in, RGB out). When using RGB->YUY2 mode it converts RGB to YUY2 (RGB in, YUY2 out) using the standard rec.601 matrix (luma compression).
    Quote Quote  
  12. Originally Posted by jagabo
    Were you using HuffYUV in RGB mode or RGB->YUY2 mode?

    In RGB mode HuffYUV leaves the video in RGB (RGB in, RGB out). When using RGB->YUY2 mode it converts RGB to YUY2 (RGB in, YUY2 out) using the standard rec.601 matrix (luma compression).
    My Huff file was originally being exported from Premiere in RGB mode - as recommended by some Premiere users. So I tried the other way instead, and the resulting YUV file gave me a better looking Huff-to-Xvid conversion.

    SD.
    Quote Quote  
  13. Originally Posted by spicediver10191
    My Huff file was originally being exported from Premiere in RGB mode
    Yes, but HuffYUV can compress the video while leaving it in RGB, or it can convert the incoming RGB to YUY2 and compress that.

    Quote Quote  



Similar Threads

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