Hi,
Does anyone know if there is an existing function for Avisynth that can be used to adjust the brightness of a specific vertical section of the frame?
One option that came to mind is to try using ColorYUV(off_y = XXX) on a specific part of the frame, but perhaps there is already a ready-made implementation for this?
I’ve attached a screenshot and a short AVI clip showing the problem I’m trying to fix.
[Attachment 93471 - Click to enlarge]
+ Reply to Thread
Results 1 to 8 of 8
-
-
Using Overlay() and an alpha mask you could smooth out the edges.Code:
LWLibavVideoSource("example-1.avi") left = Crop(0,0,112,-0) mid = Crop(110,0,64,-0).ColorYUV(off_y=-3) right = Crop(174,0,-0,-0) StackHorizontal(left, mid, right) -
Alternatively consider shifting the superblacks (y~10...13) up by ~3...4 steps.
-
-
Thanks for noticing that
. My capturing method is able to capture wider than 16-235. Also, if I have understood it right, levels over 16-235 causes problems only if I would do RGB -> YUV conversion somewhere at the process? (usually I try to keep captures in 16-235 range).
-
Y levels below 16 will all be crushed to 0, and levels above 235 will all be crushed at 255 upon a limited range YUV to full range RGB conversion. Note that TVs convert YUV to RGB that way for display so super black and super white details will be lost (there will be no visible detail in those areas).
-
So this has not been clear to me
. I had understood that the conversation from YUV to RGB is not problematic but problems raises if there would be transformation back from RGB to YUV. Fortunately, I have generally kept the captures within the 16–235 range. I need to do some own testing to understand this a little bit better, generate somehow a gradient image from pure white (255) to pure black (0) and see what happens at different phases / converastion steps
Last edited by Rolletus; 18th Aug 2026 at 07:20.
-
Good exercise, yes. Here is an example with Y (0....255), as shown on top.
The YUV video has been decoded using the standard Rec.601 (TV) matrix, therfore you can't distinguish the bars Y<16 and Y>235 as these became RGB(0,0,0) or RGB(255,255,255) respectively.
If it had been decoded using the PC.601 matrix one would see the superblacks and superwhite bars.
What your TV actually does depends on its renderer. Usually it uses "studio equations (matrix)" acc. ITU recommendations. So it may show (some of) the superblacks and superwhites, but these are normally intended as margins for over-/undershoots and other imperfections. That's why staying in the 16....235 luma range is good practice - at least for the final distribution.Last edited by Sharc; 18th Aug 2026 at 05:58.
Similar Threads
-
Measuring the luminance of mp4
By banaguitar in forum Video ConversionReplies: 0Last Post: 14th May 2025, 15:45 -
How can you avoid luminance halows on VHS and RCA?
By anonymoustly in forum Off topicReplies: 2Last Post: 15th Jun 2024, 07:25 -
Export AVCHD frame specific metadata to subtitles
By HD65 in forum SubtitleReplies: 130Last Post: 8th May 2024, 08:41 -
Avisynth start video from specific frame (not beginning)
By VidNoob123 in forum Newbie / General discussionsReplies: 2Last Post: 11th Jul 2023, 12:28 -
Mp4Box - Output is generated without frame Width, frame height & frame rate
By Saptarshi in forum Newbie / General discussionsReplies: 0Last Post: 25th Nov 2022, 08:27


Quote
