I am trying to transcode the Fraps lossless RGB video captures into h264 using handbrake and am encountering a weird problem where the output video has the "washed out" look. I understand it has something to do with the colorspace (RGB vs YV12). I read somewhere that there is a avisynth command:
that fixes the colorspace issue. But I am a noob and do not know how to use this command. I have lots of video captures that I would like transcoded without loosing the contrast fidelity found in the original file. I have MEGUI, avisynth, and avidemux, but not sure if any of these can accomplish what I want. Can someone give me steps and what programs I need to use to achieve this?Code:ConvertToYV12(matrix="PC.709")
I also read about using DNxHD as an intermediate encode that can be fed into handbrake to get results without changes in contrast, or getting the "washed out" effect. Which freeware programs can I use with DNxHD?
Thanks in advance.
+ Reply to Thread
Results 1 to 18 of 18
-
-
How are you comparing the source and encoded videos? I suspect you just need to adjust your graphics card's video proc amp settings.
-
I used MPC-cinema and VLC. Both of which are showing the same exact "faded" output when compared to source. I am aware that Fraps does RGB colors and something colorsphere shift when transcoding to x264 from Fraps RGB. I know that the avisynth command shown in my first post can correct the issue, but how exactly can I use that command on a single or group of files? Thanks.
-
Handbrake uses the normal rec.601 or rec.709 matrices when converting RGB to YUV (just like most other video editors). The problem you are having is a display problem, not a conversion/encoding problem. When playing a YUV video in a media player the graphics card is converting YUV to RGB for display. You need to fix the video proc amp settings in your graphics card's setup applet so that conversion works properly.
I've attached two video files which will let you verify this. One is an uncomrpessed RGB the other a h.264 MKV file made from that RGB file with Handbrake. They both look the same on my computer with properly calibrated video proc amp settings.
Using ConvertToYV12(matrix="PC.709") will indeed give darker darks and lighter lights but it's not the right thing to do unless the darks are too light and the lights are too dark in your RGB source video (ie, the source is sRGB, not RGB). In any case Handbrake doesn't support AviSynth scripts as input. If you really want to screw up your videos use a program that supports AviSynth, like Xvid4PSP. Create a plain text file (Notepad) that reads:
AviSource("filename.avi")
ConvertToYV12(matrix="PC.709")
Actually, I think you can simply modify the script that Xvid4PSP uses internally. So you can just open the AVI file, set up Xvid4PSP, modify its internal AviSynth script, then encode.
If you must use Handbrake you'll have to convert the source with another program first -- like VirtualDub. Open the above AVS script and encode it to a new file with a lossless compression codec like HuffYUV. When that's done you can convert the resulting file with Handbrake.Last edited by jagabo; 1st Jul 2011 at 20:38.
-
Thank you for correcting my flawed and noob logic. You are right, the two test videos are different. I never tinkered with the color settings in Nvidia control panel (GTX 460). Now I have it forcing full range (0-255) across all applications and both the test videos are identical. Does this color setting affect Youtube videos I upload and watch? So the reason the two videos are different is because RGB videos don't require conversion and is played exactly as is intended, but with encoded videos, which are mostly YUV, they undergo conversion through the video player settings or video card settings, which in my case was limited range (16-235)?
Now when I play some of my mkv x264 movies/animes, they also seem darker, but to a point where dark areas that I can normally see details are completely black. When I watch videos now, how do I know I am watching them as the author/creator originally intended? Is what I am seeing suppose to be this dark? The top frame is limited dynamic range (16-235) and the bottom frame is full dynamic (0-255). See how the left shoulder area of the father is completely dark and loss the detail of his flannel shirt?
I just want to make sure what I watch is what was intended by the artist/director/animator etc.Last edited by userix; 2nd Jul 2011 at 00:09.
-
The browser based players perform the conversion to RGB in software and send RGB to the screen. So the video overlay controls don't make any difference there (the Desktop proc amp controls control RGB colors). If you download a video and play it with a media player the video overlay controls will be used.
Yes. RGB video is sent to the graphics card as RGB and displayed as-is (unless overridden by the Desktop color controls). Media players send YUV video to the graphics card as YUV and the graphics card does the conversion to RGBG using the video overlay proc amp.
The darker video is a little too dark. As you noticed, all the details in the darkest areas are gone. You need to fine tune the brightness and contrast controls in the video proc amp settings. In the test video the bars labeled 10 and above should be visible. The 5 an 2 bars will usually be very difficult to differentiate from the background. If you view the monitor from an extreme angle they may become more visible. At the top end you can usually see all the bars. The highest bar, 253, may be a little hard to see.
What I usually do is adjust the monitor's controls using the RGB chart. First set the Desktop brightness, contrast, gamma, etc. settings to neutral. Then play the RGB video and adjust the monitor's controls. Try to get the blacks as black as they can get -- while still being able to see most of the darkest bars. The brightest parts should be at a comfortable brightness (they don't have to be as bright as your monitor can get) and all the bars should be visible. Then use the YUV video to adjust the video proc amp settings to match the RGB video as closely as possible. -
Thanks again for the help! Wow, so this whole time I have been watching movies and anime with the faded appearance, but never realized it was because of video proc amp settings. Now, is there a surefire or automated way to get the RGB and YUV levels tuned exactly, or does it have to be done manually with my eyes via trial and error method? Is there a certain order to adjust each contrast, brightness, gamma? Or is it a willynilly trial and error method?
I notice the standard Windows video properties box has a color management tab. Does this has anything to do with video luma/contrast/gamma etc? Mine is empty and I remember seeing on my other computers having Adobe RGB 1999 or something and another having Sony color profiles.Last edited by userix; 3rd Jul 2011 at 02:07.
-
-
Oh, so stuff like Huey Pro from Pantone will do the trick? It's not just for color calibration, but also gamma,brightness, contrast? I thought those were mainly for photographs or stills so prints will match what's on the screen exactly. Didn't know it worked for videos and such.
-
Well the devices are to let you calibrate the monitor for Desktop use. You still have to eyeball the video proc amp settings.
-
I've been thinking, if I adjust the settings as mentioned, won't the RGB video be different than the YUV all the time? If my RGB and YUV look indentical now, any changes I make to the proc amp settings will make it so the RGB will not be the same as YUV anymore?
-
Your goal is to get RGB displayed properly on the monitor. Then to adjust the video proc amp so that YUV displays the same way.
-
Actually, if I am adjusting the monitor settings, the YUV and RGB will always look the same, so I wouldn't really have to adjust the proc amp settings?
-
You adjust the monitor settings using an RGB chart. Then you adjust the graphics card's video proc amp settings to make the YUV video match.
-
Oh, does the RGB chart have to be a picture file and not the video RGB file you posted? Because the RGB video file would already be the same as the YUV. Doesn't matter how i set the monitor controls, it displays both the RGB video and YUV video identical, without me adjusting the proc amp settings.
-
Only one player at a time will get to use the video overlay system. The other player will convert to RGB in software. If you want to compare the two at the same time start the YUV video first. Then start the RGB video. The video proc amp controls should then control the YUV player.
Or export a frame from the RGB file and display it with Picture and Fax Viewer.Last edited by jagabo; 8th Jul 2011 at 19:48.
-
Thanks. I guess what I don't understand is the need to adjust proc amp for YUV video, since adjusting the monitor settings will apply to everything that is displayed, meaning once I get the RGB frame to proper adjustements via monitor controls, the YUV video will already be identical, since RGB is identical to YUV prior to adjustments.
-
The graphics card uses a different system to output YUV video. That system must be calibrated so that it converts the YUV to the correct RGB values before sending it to the monitor. That's what the video proc amp settings are for.
1) RGB text/graphics and RGB video --> RGB monitor
2) YUV video --> converted to RGB via proc amp settings --> RGB monitorLast edited by jagabo; 9th Jul 2011 at 06:57.
Similar Threads
-
Output of both m2v AND ac3 during single "Render As" event in Vegas?
By Smells_Like_Feet in forum EditingReplies: 3Last Post: 28th Oct 2011, 19:08 -
Set "Output filename" As Default Global "File/segment title" In MkvMerge?
By LouieChuckyMerry in forum Video ConversionReplies: 0Last Post: 9th Jul 2011, 01:52 -
Problem Using ProjectX: the sound's output is "corrupted"
By devilcoelhodog in forum Newbie / General discussionsReplies: 0Last Post: 12th Nov 2010, 16:22 -
Quality problem "caused" during "deinterlacing" ?
By Hombre_86 in forum DVD RippingReplies: 26Last Post: 25th May 2010, 21:28 -
XviD4PSP Brightness/Contrast setting to reduce PSP "Ghosting"?
By stephens in forum Video ConversionReplies: 0Last Post: 13th Sep 2009, 11:42