Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
15th April 2013, 10:44 | #14821 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
madVR tries to detect the range and matrix of the source, but if the decoder doesn't say which it is, madVR can only guess, based e.g. on source resolution. In your case it seems the resolution is so small that madVR guessed the source to be BT.601 with TV levels. If the source is instead BT.709 with PC levels, you can either manually switch madVR (press [Ctrl+Alt+Shift+i] to switch the source between TV <-> PC levels; press [Ctrl+Alt+Shift+m] to toggle between different decoding matrixes). Or alternatively you could use file name tags to tell madVR what to do (add the text "matrix=bt601 range=pc" to the source file name).
|
15th April 2013, 10:54 | #14822 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
I think i asked this before, but if apparently Fraps is always BT.709, i might as well hardcode that somewhere, guess i forgot to actually follow up on that =p
I created a note in my task list, so i don't forget again.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders Last edited by nevcairiel; 15th April 2013 at 11:18. |
15th April 2013, 11:27 | #14823 | Link |
Registered User
Join Date: Nov 2005
Posts: 693
|
Well, I don't know anymore, because I'm really confused now.
LAV/ffmpeg detects FPS1(yuvj420p) files as Full-range BT.709 and in order to correct the colours, in Avisynth one has to do a "PC BT.709" --> "TV BT.601" conversion, BUT in FFDShow and LAV+madVR it's actually BT.709 that gives the same results . A key-shortcut is the only option available? There are no such settings elsewhere?
__________________
My hobby website |
15th April 2013, 11:44 | #14824 | Link | |
Registered User
Join Date: Oct 2011
Posts: 204
|
Quote:
You indeed have to use fullrange BT.709 to convert the YUV back to RGB. However, because the renderer you use to display the YUV doesn't know this, it guesses that TV-range BT.601 should be used on that stream and subsequently uses that to convert to RGB. This means, of course, that you need to either make the renderer use fullrange BT.709 for conversion, or convert the YUV stream so that it conforms to TV-range BT.601 before sending it to the renderer. This also explains the series of pictures you linked earlier: You took a snapshot of the YUV output without manually converting it to RGB, so the program you used to display the video assumed TV-range BT.601 (just like the video renderer) and the colors were distorted. |
|
15th April 2013, 12:23 | #14826 | Link |
Broadband Junkie
Join Date: Oct 2005
Posts: 1,859
|
I tested some FRAPS 3.5.99 4:2:0 captures of a test pattern downscaled by madVR, and all required use of the fullrange BT.709 matrix to be displayed correctly.
Once you draw near to 307200 total pixels (640x480 or 736x416) or less, FRAPS seems to automatically force capture of lossless RGB. Last edited by cyberbeing; 15th April 2013 at 12:27. |
15th April 2013, 13:27 | #14827 | Link |
Registered User
Join Date: Nov 2005
Posts: 693
|
@ DarkSpace: Those screenshots were extracted with AvsPmod, and whether I put a ConvertToRGB at the end of the Avisynth-script or not, it's doesn't change the result.
Ok, let's say we put "FFDShow raw video filter" between LAV VD and VMR9/madVR, to ensure the renderer doesn't know anything about the stream. FFDShow reports it's getting NV12 (Uncompressed) from LAV and puts out RGB32(VMR9)/RGB24(madVR). With default settings in "FFDShow raw video filter" the output for both renderers is now the same (LAV's default output) (whereas madVR performed a range-conversion before). Now, if I let the "FFDShow raw video filter" convert the stream to Full-range BT.709 ("Output", "RGB conversion"), I get the same result when I go to "AviSynth" and enter ColorMatrix(clamp=0, inputFR=true) (i.e. a Full-range BT.709 to TV-range BT.601 conversion), with both renderers. Now can anyone explain that to me. @ madshi: Makes sense. Ignore my post.
__________________
My hobby website |
15th April 2013, 13:40 | #14828 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
You mean on this screen?
Selecting BT.709 there tells it to use BT.709 to convert to RGB, which is the correct thing to do, because thats what is used for Fraps YV12. If you use AviSynth, it will have to convert to RGB at some point later, so assuming this conversion uses BT.601, and you convert from BT.709 to BT.601 before, it'll then look alright. (original BT.709 -> convert to BT.601 -> convert to RGB using BT.601) Makes perfect sense to me.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
15th April 2013, 13:48 | #14829 | Link | |
Registered User
Join Date: Oct 2011
Posts: 204
|
Quote:
|
|
15th April 2013, 18:17 | #14831 | Link | |
Registered User
Join Date: Oct 2011
Posts: 204
|
Quote:
Do you happen to be able to make the matrix available for anyone who wants to implement it? In that case, maybe a custom matrix designation could be passed to a renderer that supports it and enable it to use that matrix? |
|
15th April 2013, 18:33 | #14832 | Link |
Registered User
Join Date: Dec 2011
Posts: 1,812
|
Sorry, I'm not that techie, nor do I have such information available.
That must be cleared with the Fraps makers, I guess. You may want to take a look at Handbrake, it seems to do a very good conversion for Fraps YV12, almost no difference visible. |
15th April 2013, 20:03 | #14835 | Link |
Registered User
Join Date: Feb 2006
Posts: 1,076
|
@nevcairiel:
Some time ago i asked about ordered chapter MKV ( aka 'x-in-1'). You answered that it would eventually be implemented. And while I was working on my final exam paper, I missed that you've found the time to implement this feature. So I just wanted to post a thank you Nev for this feature |
15th April 2013, 21:39 | #14836 | Link | |||||
Registered User
Join Date: Nov 2005
Posts: 693
|
Quote:
So a standard RGB conversion just assumes(!) TV-Rec.601. That's why... Code:
FFVideoSource("D:\FPS1(yuvj420p)_sample.avi") ConvertToRGB() In this case I used Avisynth in FFDShow yes, where the output will be converted to RGB in the end, but normally that isn't necessary of course. At least I create an Avisynth-script to feed it to x264 ultimately, which only accepts YV12. So when editing FPS1(yuvj420p) files in Avisynth where the end result has to be YV12 for x264 to swallow, a conversion to TV-Rec.601 is needed, but for playback (RGB) a conversion to PC-Rec.709 is needed. Quote:
-------------------------------------------------------------- Quote:
Quote:
__________________
My hobby website Last edited by Reino; 15th April 2013 at 21:47. |
|||||
16th April 2013, 00:17 | #14837 | Link |
Registered User
Join Date: Dec 2012
Location: Neverland, Brazil
Posts: 169
|
I tried a search but nothing definitive came up, so I'm posting this question here.
"My friends sometimes come over and we often watch anime when they do, so I have my TV hooked up to my computer via HDMI and I put the anime on that for easier watching. When I put the player on the TV, should I switch LAV RGB output levels to TV (16-235) and then back to PC (0-225) when I'm done? Or will the difference be so minor that I shouldn't go through the trouble?" I don't have a TV hooked up to a PC with HDMI to see it for myself, so any thoughts?
__________________
madVR scaling algorithms chart - based on performance x quality | KCP - A (cute) quality-oriented codec pack |
16th April 2013, 01:20 | #14838 | Link |
Registered User
Join Date: Dec 2012
Posts: 40
|
That setting has no effect at all if LAV does not do YUV -> RGB conversion. However, if it does, the correct setting depends on whether levels are changed somewhere else or not and whether TV is set for full or limited range input.
|
16th April 2013, 02:34 | #14839 | Link | ||
Registered User
Join Date: Oct 2011
Posts: 204
|
Quote:
About LAV+madVR, you don't need to worry. Once the matrix and range are passed on from LAV to madVR, it'll automatically work correctly. The range and matrix conversion is not done on the RGB but directly on the YUV (actually, the YUV isn't even modified in this case, it's just converted to RGB using different parameters to begin with). Quote:
Code:
x264 --range pc --colormatrix bt709 --output "output.264" --output-csp i444 --input-range pc "input.avs" |
||
16th April 2013, 09:51 | #14840 | Link | |
Registered User
Join Date: Mar 2007
Posts: 934
|
Quote:
__________________
TV Setup: LG OLED55B7V; Onkyo TX-NR515; ODroid N2+; CoreElec 9.2.7 |
|
Tags |
decoders, directshow, filters, splitter |
|
|