I am trying to compress a YUV 4:2:0 (full color range) clip to YUV 4:2:0 (also full color range).
The file compresses well on the default x264vfw settings, but the output file lacks color range information ("Color range: full" is missing).
I tried to add "--range pc" to the codec parameters. The color range information then appears, but codec also converts the luminance from 16-235 to 0-255.
Adding "--input-range pc" doesn't help - the conversion is still being done.
How do I add this information about the color range?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 14 of 14
Thread
-
-
0-255 is full range. If your clip's range is 16-235 then it's not full range.
-
My clip has a range of 0-255.
The problem is that x264vfw, after adding "--range pc" information, cuts the ranges 0-15 and 236-255 and converts 16-235 to the range 0-255. -
Are you sure this isn't happening earlier in the process? Many filters in VirtualDub only work in RGB. Incoming YUV video will be converted to RGB using a limited range rec.601 matrix -- thereby crushing your superblacks and superwhites.
-
Share the sample and describe what you are doing with Vdub.
-
Here's a full range YV12 example saved with VirtualDub2 and the 8 bit x264 encoder with "--range pc", fullrange.avi. Blacks extend to Y=0, whites to Y=255, and MediaInfo reports full range.
The same source with the Blur filter applied in VirtualDub2, then saved as with the first video, filtered.avi. MediaInfo still reports full range but blacks are crushed at y=16, whites at y=235. VirtualDub2 crushed the blacks and whites when int converted to RGB for filtering. -
Can't replicate your "filtered.avi", my output looks OK:
-
Thanks to everyone for the answers. I did everything right, but it looks like both MPC-HC and MPC-BE have a problem with correctly displaying mp4 clips with "Color range: full".
Both programs washed out ranges 0-16 and 235-255, and range 16-235 transcodes to 0-255.
In MPC-BE it can be healed by changing the range to... 16-235 (in Settings), in MPC-HC only by changing the renderer to a regular EVR (without the custom presenter) - here the change does not do anything at all.
I have already reported bugs to developers.
And tomorrow I will re-render my project and check it again because I have already deleted it
Attached is a test clip with "Color range: full" - you also have washed out ranges 0-16 and 235-255? -
Whether players respond to limited/full range or rec.601/rec.709 flags is dependent on the player and and how it's set up. You're much safer using rec.601 with SD material and rec.709 with HD material, using limited range for both, and flagging them in your videos. But even then not all players/setups will play them right.
-
I checked everything again and my conclusions are as follows:
1. Virtualdub and x264vfw work OK (I set full range and video is properly rendered as full range).
2. MPC-BE and MPC-HC do not work properly with "Enhanced Video Presenter renderer (custom presenter)". As I described earlier - full range flips are treated as limited range clips. The performance of this renderer is so unstable that it may work differently on different configurations. Overall ECR(CP) sucks.
3. On the advice of the author of one of these programs, I changed the renderer to MPC Video Renderer and all the problems disappeared. ALL VIDEO ARE PLAYBACK CORRECTLY AS THEY SHOULD (full range as full range, limited as limited).
I don't know who is responsible for the ECR (CP), but it's a pity it works like that.Last edited by rgr; 6th Jul 2022 at 16:39.
-
I think you don't see a difference because you are watching the files on your monitor in RGB TV range.
Open this script in Vdub2, set Video->Decode format..... -> Component range: Full (0....255) and step through the frames. You will see the difference.
Code:full=AVISource("fullrange.avi") filtered=AVISource("filtered.avi") interleave(full,filtered) turnright().histogram("classic").turnleft()
-
I believe it's the graphic driver that's responsible for that. At least in part. Use the manufacture's graphics config applet to make sure it's not forced to limited range or full range. Intel for example has a pulldown where you can select None, Limited, or Full.
[Attachment 65770 - Click to enlarge] -
Last edited by rgr; 6th Jul 2022 at 16:52.
Similar Threads
-
Need help updating Color Mill plugin for VirtualDub2 to 64bit
By Bassquake in forum ProgrammingReplies: 7Last Post: 27th Feb 2024, 10:04 -
Adjusting color saturation of color range
By Ygramul in forum Software PlayingReplies: 3Last Post: 24th Jan 2021, 09:07 -
USB3HDCAP - Problem With Output Color Range on Composite
By Powerstars in forum CapturingReplies: 1Last Post: 15th Nov 2020, 16:32 -
MPC-HC: Output dynamic range / black level / color range stuck? Washed out
By vlad992 in forum Newbie / General discussionsReplies: 16Last Post: 10th Nov 2020, 07:54 -
ffmpeg 4.1.4 question regarding "limited color range" output file
By bokeron2020 in forum Newbie / General discussionsReplies: 12Last Post: 1st Aug 2019, 17:28