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!
+ Reply to Thread
Results 1 to 13 of 13
-
-
"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. -
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 -
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. -
Originally Posted by poisondeathray
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....)
Also what software are you using to view this? What decoder? Any filters? or is it just the standalone player?
Hope that info helps. -
Originally Posted by 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. -
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.
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 -
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! -
Originally Posted by jagabo
SD.
Similar Threads
-
color correction in MeGUI
By codemaster in forum DVD RippingReplies: 1Last Post: 2nd Mar 2012, 20:56 -
mpg2 color correction?
By Mike99 in forum RestorationReplies: 74Last Post: 25th Oct 2011, 22:31 -
Increasing color depth and sampling for color correction
By poisondeathray in forum Newbie / General discussionsReplies: 17Last Post: 17th Oct 2009, 09:06 -
Color Correction for DV
By bsuska in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 16Last Post: 23rd Oct 2008, 17:24 -
Color correction issues.
By ziggy1971 in forum Newbie / General discussionsReplies: 0Last Post: 17th Jan 2008, 22:17