Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Color Management In Virtualdub?, ICC / ICM profiles
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
Roloc
Posted: Nov 27 2011, 06:12 PM


Newbie


Group: Members
Posts: 2
Member No.: 33683
Joined: 27-November 11



First, let me say thanks for VirtualDub, it's a great piece of software and I've been using it for years now.

A while back, I got my first DSLR and soon after I realized the importance of color management. Without it, a photo tweaked to look great on my monitor (a wide gamut LCD, covering 100% of the AdobeRGB color space) will probably look noticeably different on your monitor, or when printed. So, I profiled my monitor and when using color management aware applications, everything's fine. For still images at least - videos are a different story.

Unfortunately, VirtualDub doesn't seem to be aware of color management. It apparently uses the monitor's native color space. Which means in my case, that if the colors look just right when processing in VirtualDub, the finished video will turn out slightly desaturated. When watched with a player that is aware of color management. Media Player Classic HC is the only player I know of that does (see here).

Anyway, my question is:

Is there a way to make VirtualDub use color profiles? It would be great if you could define a color space for the input (eg. Rec. 709 for HD videos, which is almost the same as sRGB) and have VirtualDub take the monitor profile into account to display the colors accurately. If not, might support for that be included in future versions?

Or maybe someone knows a video filter that can work with color profiles (ICC / ICM files) and adjust the video that way?
 
     Top
Loadus
Posted: Nov 29 2011, 06:32 PM


Advanced Member


Group: Members
Posts: 352
Member No.: 10881
Joined: 1-July 04



Color management for video is a little different story than the normal color management for a photo. To properly color grade your footage, you would need a monitor that natively outputs standard levels (a CRT is always handy). There's so much happening in the transfer that the normal LCD's can't really do the job.

It is possible to correct the video to some degree with a color matrix transformation (done in a GPU filter). If you have measured your camera and you have an ICC profile for it, you could take the matrix coordinates and force them to a certain standard, like 709.

But, that's assuming that you decode the footage to RGB correctly and keep it in RGB until the final encode AND the camera outputs the raw levels of the sensor [usually does not]. You lose a lot of information in the transformation process (if you are doing this with an mp4 from DSLR, it's already heavily compressed with an intra-frame -only encoder).

It's a lot of hassle (done it in After Effects a couple of times myself) and I really don't recommend it. biggrin.gif

My suggestion is that you expose the video correctly and edit it together with a program that does not re-encode it (just stitches the clips together). If all done well, you'll get very balanced colors - I have 550D myself and the colors in video recording are very well [factory]calibrated.

But if you still want to try color managed workflow (like linear or DPX workspaces for color grading) then After Effects is the way to go.

VirtualDub does it's best job to keep the original footage in it's native colorspace (YV12, YUY2 etc) which is the preferred way to edit footage together. If I remember correctly, color management is not on the official TO DO list (Phaeron can correct me, can't remember) because of the necessary transformation to RGB and back (it's a slow process and the footage quality suffers a lot).

But you never know ... : )

--------------------
deviantART behance
 
       Top
phaeron
Posted: Dec 11 2011, 09:06 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



I haven't looked at color management issues yet, but if you're seeing a noticeable shift in contrast, that's usually not a color management problem -- it's a gross mismatch in video levels. It results from video codecs or display filters that are needlessly loose about following level specifications in video formats. The most serious problems are the ones that result from the display filters as it means that it is impossible to encode a video that properly displays across the board -- either some systems will show too high contrast or the others will be too low.
 
    Top
Roloc
Posted: Jan 8 2012, 01:29 AM


Newbie


Group: Members
Posts: 2
Member No.: 33683
Joined: 27-November 11



Thanks for your answers, Loadus and phaeron!

I know that color management is a hassle and most programs don't seem to properly support it for still images, let alone video. Heck, even Microsoft's photo viewer in Windows 7 messes it up - it interprets color profiles in images just fine, until you go to fullscreen / slide show mode (F11), then it suddenly stops interpreting them. So, no blame on VirtualDub here, I was just wondering whether I missed something.

I also think I didn't quite explain my issue well enough, so I'll try again:

Let's assume I take a video and tweak its colors to my liking, eg. with the GPU shader filter and Film.fx (great fun to use, by the way, thanks again, guys!).
Then the colors will look just perfect in VirtualDub's output video pane or preview window, because that's what I use as feedback for judging my settings, after all!

But when I render the video and watch it in MPC-HC with color management enabled, or on a different monitor without a wide color gamut, then my video looks a bit desaturated, mainly in the red tones. Exactly the same thing happens when I take a screenshot of VirtualDub's output video pane and paste it into Photoshop or a similar color management aware program, and have it interpret the screenshot as sRGB.

What happens is that the VirtualDub's output video pane is "unmanaged", ie. its RGB values are treated as if they were in the monitor's color space and they aren't adjusted before displaying them on screen.

What I would like is the option to have a "color managed" output video pane, ie. its RGB values are treated as Rec. 709 / sRGB or some user choice, then adjusted according to the monitor's color profile before they are displayed. Maybe that's just a matter of inserting some Windows API call that does the translation from one color space (the source: video) to another (the target: monitor), but I don't know.

Anyway, that translation would merely affect the display of the output (and perhaps input) video pane, and the preview window for video filters of course. I'm not suggesting some kind of new video filter that operates on the whole video stream itself. Although that could be interesting as well.

Since you normally don't display each and every frame of a video in the input/output panes anyway, it shouldn't be too big of a performance hit. Especially if you have the option to disable this color management, and you can already disable the display of the entire panes too.

I hope I made myself clearer this time. smile.gif
 
     Top
Loadus
Posted: Feb 22 2012, 02:55 PM


Advanced Member


Group: Members
Posts: 352
Member No.: 10881
Joined: 1-July 04



You need to set the transfer function in your encoder (primaries = BT.709 or whatever the desired presentation format is), but it might not come out exactly as hoped. biggrin.gif

If you know the color primaries of the display you're editing the colours with, you could -in theory- create an .fx file that simulates the colors when displaying the video (the custom .fx file in the 'Preferences ... > Display > Use effect file ...' menu) using a transformation matrix. But I haven't tried this myself [I'll look into this]. smile.gif

EDIT: corrected the 709 stuff. tongue.gif

--------------------
deviantART behance
 
       Top
phaeron
Posted: Feb 25 2012, 10:08 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Bit of a problem... I haven't found a way to test this. The two ways I tried to alter the color profile -- f.lux and the built-in Windows 7 display calibration -- work through the device gamma ramp instead of the ICM APIs. This means that they already affect the entire display including VirtualDub. I tried changing the device profiles but none of them seemed to make a difference on-screen.
 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
5 replies since Nov 27 2011, 06:12 PM Track this topic | Email this topic | Print this topic

<< Back to Advanced Video Processing