VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 54
Thread
  1. is there any better way to restore the crushed blacks or repair the luminance?
    i had tried with gradation curve but didn't get any satisfied results
    i got confused whether smoothlevels could help me out in such occations

    i'll be really grateful if u can teach me to enhance the color too, actually i'm ripping this movie.....so any type of suggestions are really welcome

    thanx in advance

    http://www.mediafire.com/?47pljjp5uq3uo5u
    Quote Quote  
  2. There's no detail in the darkest areas to restore.
    Quote Quote  
  3. try something like that:
    Ylevels(0,1.000,255,16,235)
    coloryuv(gain_v=2)

    if you wanna learn use the histogram with its levels mode to begin and also coloryuv(analyze=true) , play with the values for each filter mainly ylevels,and coloryuv and see what happens
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  4. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    ColorYUV and/or Y/Levels won't help that much. You'd need something like gradation curves in RGB to severely limit the range of brightening, otherwise the night scene will start looking like daylight. I agree with jagabo, there's scant detail "down there" anyway, if anything.

    The images below have the black letterboxing clipped off to aid corrections and histogram use. I don't know if anyone noticed, but (1) the darks are green, (2) the highlights on the seat's headrest are blow away (clipped). Original frame 362:
    Image
    [Attachment 14569 - Click to enlarge]


    With a little ColorYUV: Raised gamma_y and gain_y by 15, then used gradation curves to raise the darkest areas by about 5 RGB points between RGB 20 and RGB 50, plus took the green cast out of the shadows. The darkest shadows are about NTSC RGB16 or so, the headrest clipping was lowered a but but it didn't help-, so I it remains clipped.
    Image
    [Attachment 14570 - Click to enlarge]


    All one has to do is raise the darkest colors just a tad to see that (a) no more detail, and (b) nothing but noise and color corruption below the darkest "blacks":
    Image
    [Attachment 14571 - Click to enlarge]


    Crushing doesn't just wipe out detail. It corrupts everything below the crush point, and does the same thing to clipped highlights.
    Last edited by sanlyn; 23rd Mar 2014 at 12:30. Reason: the usual stream of typos!
    Quote Quote  
  5. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    There's a terrific amount of noise in the dark areas (not unusual with crushed darks). So here's another "learning lesson" video. Still trying to figure out if it's telecined, blended, interlaced, or what. Any take on the noise and combing is welcome. One of these days I'm going to get all this down pat -- it's a tough row to hoe, this Avisynth. But it's the only way.
    Last edited by sanlyn; 23rd Mar 2014 at 12:31.
    Quote Quote  
  6. Yes, it looks like a field blended frame rate conversion. Yadif(mode=1, order=0).SRestore(frate=25).
    Quote Quote  
  7. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Ah, yes! Srestore! Thanks, jagabo, about time I learned to recognize these configurations and handle them. I think QTGMC instead of yadif, maybe some of that noise will go away. Will try both.

    After playing tricks with hurricane Sandy, looks like I'll be outta power and internet again with a Nor'Easter tomorrow. Just when I was getting back into the game!
    Last edited by sanlyn; 23rd Mar 2014 at 12:31.
    Quote Quote  
  8. thanx to all for ur efforts
    actually i selected the darkest portion of the movie
    throughout the film i can see lots of dark and lack of details, i just want to know if the other bright or dark parts (which are not so dark) can be improvised or not
    i know the source is one of the worsts, but there should be some areas which can be improvised by some extent, like sharpness or color or details
    http://www.mediafire.com/?vamj5l7ochnvaxc
    Quote Quote  
  9. Of course you can lighten up some of the shadow detail with a gamma and offset adjustment of the luma channel.

    Code:
    ColorYUV(gamma_y=75, off_y=-8)
    Click image for larger version

Name:	gamma.jpg
Views:	205
Size:	156.4 KB
ID:	14597

    You may have to pump the saturation up a bit too (gamma decreases saturation). And the colors need some other adjustments.

    If you're going to attempt this all in VirtualDub apply the Brightness/Contrast filter first. It can work in YUV, letting you bring out a little detail in the Y<16 areas (the source extends down to about Y=14).
    Quote Quote  
  10. thanx but i couldn't understand the graph like image
    i think its histogram! how can i use i it?
    in the above exmple how could u know from the graph that "yeah!!! this seems legit!"?

    and more thing..." do u think, that seesaw can help me out from this type of source? i've heard that seesaw only works with good source

    i've made a script (off course with ur help) and got this result
    before
    after

    do u think its useless or other filters could give me better results in terms of sharpness/details/noise removal/picture enhancement?
    Yadif(mode=1, order=0)
    SRestore(frate=23.976)
    ColorYUV(gamma_y=75, off_y=-8)
    backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
    backward_vec1 = last.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
    forward_vec1 = last.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
    forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
    a=last.MVDegrain2(backward_vec1,forward_vec1,backw ard_vec2,forward_vec2,thSAD=400,idx=2)
    b = a.FFT3DFilter(sigma=3, sharpen=1.0)
    SeeSaw(a,b, NRlimit=3, NRlimit2=5,Sstr=2, Slimit=7, bias=60, Szp=16, sootheT=40)
    Last edited by baunduley; 10th Dec 2012 at 12:50.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I'm playing with the two samples today while I can, before another storm hits the Long Island shore. Will post some levels and color ideas later. The main point is that the video should be opened using Avisynth and DGIndex in order to fix basic black levels and contrast problems in YUV before going to RGB for more detail. Opening the clips directly in VirtualDub would make matters worse. I'm opening the files this way to get the video into RGB properly, first using DGINdex to make a d2v project and then running an avs script in VirtualDub to protect black levels and highlight clipping (change the path statements in this sample script to specify the path and name of the clip to be opened):

    MPEG2Source("E:\forum\colors\VTS_01_1_VOB.d2v")
    # *************************************
    # Use ColoryuV, etc., to correct levels in YUV
    # (The statement below is a sample fix)
    # *************************************
    ColorYUV(cont_y=-25,off_y=-10)
    ColorYUV(cont_u=-10,off_v=2)

    # ***** do some necessary YUV processing here . . . .

    # ******* convert to RGB for VirtualDub work *****
    # **** (change the "interlace" parameter if needed) *****
    ConvertToRGB32(matrix="Rec601",interlaced=true)

    You must learn to use histograms and pixel samplers to see what's happening with RGB levels and colors. There are histograms for YUV, but because much of the work will be done in VirtualDub (RGB) I'm using RGB histograms to view the results of colorspace conversions:

    Image and RGB histogram, VOB opened directly in VirtualDub without proper RGB conversion. Luma and chroma crushed against left-hand side of histogram. Similar cruishing and clipping would occur when converting to color system on TV:
    Image
    [Attachment 14598 - Click to enlarge]


    Image histogram resulting from sample Avisynth script. Levels are corrected for NTSC 16-235. There is more work to be done in VirtualDub (letterbox borders are red, colors and low-detail gamma are off) but this would be a starting point:
    Image
    [Attachment 14599 - Click to enlarge]


    Back later. Gotta get ready for another storm.
    Last edited by sanlyn; 23rd Mar 2014 at 12:31.
    Quote Quote  
  12. Originally Posted by sanlyn View Post
    There is more work to be done in VirtualDub ......................

    do u mean gradation curve???
    Quote Quote  
  13. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by baunduley View Post
    i think its histogram! how can i use i it?
    in the above exmple how could u know from the graph that "yeah!!! this seems legit!"?
    "Legit" for NTSC video covers the range RGB 16-235 for luma, RGB 16-240 for chroma. You'll find plenty of videos that break the rules, but values such as RGB 0 and RGB 255 are wasted on TV, most of which can't display the same contrast and chroma range as a PC monitor. Crushed darks and clipped highlights can also give DVD and BD encoders problems. Once crushed/clipped colors are encoded, there's no getting the data back again.

    RGB histogram for VirtualDub: http://trevlac.us/colorCorrection/clrtools.vdf
    The web page is here: http://trevlac.us/colorCorrection/colorTools.html
    The original Doom9 post is here: http://forum.doom9.org/showthread.php?p=458048#post458048

    The best way to learn to use RGB histograms and other types of 'scopes is Google for free internet tutorials for graphics apps like Photoshop. These sites are for digital cameras and still photo, but the color and black/white level principles are the same for video. Here is one such tutorial, with samples of crushed and clipped luma and color values:
    Part 1: http://www.cambridgeincolour.com/tutorials/histograms1.htm
    Part 2: http://www.cambridgeincolour.com/tutorials/histograms2.htm

    Avisynth has several histograms for use in YUV. IMO it's easier for newcomers to learn RGB first, but many use YUV only. Both color systems have their pros and cons. I'm using RGB histograms here because I feel some of the color problems are best fixed in RGB. You'll find plenty of debate on using various methods.

    You can't trust eyeball alone to visualize problems and solutions. Hopefully you're working with a properly calibrated monitor. In any case, most people would use some sort of pixel sampler to read RGB pixel values in apps like VirtualDub. One such free tool for the desktop is here: http://www.netreach.net/~gavin/gavsfreeware/files/csamp21.zip .
    The very simple and basic CSamp web page, for what it's worth: http://www.netreach.net/~gavin/gavsfreeware/csamp.htm
    Last edited by sanlyn; 23rd Mar 2014 at 12:31.
    Quote Quote  
  14. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by baunduley View Post
    Originally Posted by sanlyn View Post
    There is more work to be done in VirtualDub ......................

    do u mean gradation curve???
    More than that . I will try to get some details together.
    Your latest samples are improvements, with a few glitches -- but nice work. I have to beg your indulgence, we are just now recovering from hurricane Sandy here and another storm is its way tonight and tomorrow. I'm certain other members are tracking this thread and will chime in.
    Last edited by sanlyn; 23rd Mar 2014 at 12:32.
    Quote Quote  
  15. Waveform monitor:

    https://forum.videohelp.com/threads/340804-colorspace-conversation-elaboration?p=212156...=1#post2121568

    In the image I posted earlier I use VideoScope(), not Histogram(). VideoScope doesn't mark the "illegal" regions of Y<16, and Y>235.
    Quote Quote  
  16. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    jagabo, I used yadif and QTGMC both (QTGMC really helped with the dark-level noise!), but Srestore is giving me jerky playback at 23.97 and 25 fps. I think Srestore's parameters are giving me a problem here. The video appears to be field-blended as well as telecined, and the effect in some areas looks like dropped frames. I'm on doom9 now looking for more insight into SRestore.
    Last edited by sanlyn; 23rd Mar 2014 at 12:32.
    Quote Quote  
  17. SRestore() is never perfect. Of course, the clips don't have a lot of motion, and the motion they do have isn't nice and linear where's it's easiest to see jerks, but they look pretty smooth here.

    Yadif(mode=1, order=0).SRestore(frate=25).
    Image Attached Files
    Quote Quote  
  18. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    OK, I'll keep working with it. Looks like one of those frame-by-frame projects in certain spots. Moving on! And thanks.
    Last edited by sanlyn; 23rd Mar 2014 at 12:32.
    Quote Quote  
  19. thanx
    actually, i couldn't get u first
    i can't force u in such situations.......
    inspite of ur condition what u did is just...........

    please take ur time and pardon me for my ignorance
    Quote Quote  
  20. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Ignorance? Some members are ahead of others, but we're all learning here. Especially me!
    Last edited by sanlyn; 23rd Mar 2014 at 12:32.
    Quote Quote  
  21. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    So here's a first effort on the dark video. Far from perfect (so whaddya want from a re-encode of a low-bitrate original?). Could fiddle and tweak forever, but this is a start. Removed many spots and streaks, somer bad frames around frame 220 or so. Couldn't get all the spots, sorry. You can cleqarly see the effects of low bitrate and crushed details in the darkest areas, and some of the noise in large flat areas is still a problem; will have to learn more about the dither plugin to work with that. There's some odd frame movement and object wiggling in frames 213-220 or so.

    Can't get the whole script together right away. It's a mess right now. But in summary:
    Avisynth filters: QTGMC, Srestore, RemoveSpots, gradfun2DBmod, AddGrainC, TTempSmooth, FreezeFrame, BadFrames, ReplaceFramesMC, ColorYUV.
    VirtualDub: ColorMill, GradationCurves (2 copies -- 1 primary, 1 secondary), NeatVideo (25% power).

    I played with DeBlock and MDegrain, but ran out of time. Posted is a 24fps MPEG2 and the AVI (lagarith YV12). The AVI is a free download at 4shared (78 MB) for those who want to play with encoders: http://dc613.4shared.com/download/Mobe1mZJ/VTS_01_darkYV12.avi . The attached MPEG is much smaller. I apologize for not having had time yet to learn to make mkv's.
    Last edited by sanlyn; 23rd Mar 2014 at 12:33.
    Quote Quote  
  22. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    The attached MPEG is much smaller. I apologize for not having had time yet to learn to make mkv's.
    here you go..re-wrapping containers, mpeg -to- mkv

    ffmpeg -i "d:\TMPGenc.mpg" -vcodec copy -acodec copy -y "d:\TMPGenc.mkv"
    Quote Quote  
  23. Originally Posted by sanlyn View Post
    So here's a first effort on the dark video.
    I think the black level is too high. It looks a little washed out. I'd keep black at y=16 (ignoring the logo and letterbox bars) and use gamma to lighten up the dark areas just above that. Like I did in the sample I posted earlier.
    Quote Quote  
  24. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i don't get it though...why is there a logo on a commercial dvd to begin with ?

    unless this was actually a recorded version from a dvd recorder, perhaps ?

    both (vob) videos seem fine to me as long as you open inside dgindex and select menu\video\yuv->rgb\tv scale.

    the colors (levels) is just the way the studio processed it, whether correct or not--this is, assuming its a commercial dvd release. if its not, (is a dvd recorder version instead) then its a content provider issue plus and/or user equipment limitation.
    Quote Quote  
  25. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by sanlyn View Post
    So here's a first effort on the dark video.
    I think the black level is too high. It looks a little washed out. I'd keep black at y=16 (ignoring the logo and letterbox bars) and use gamma to lighten up the dark areas just above that. Like I did in the sample I posted earlier.
    I did use gamma. The dark colors of the back of the car seats variy between RGB 13 and 15. That will look pretty black on TV. Any darker, and details in the car'[s interior in the following scene will disappear, and so will the details in the shrubs' shadows outside the car window -- in other words, darker means going back where we started. NTSC standard always looks brighter on a PC. Photoshop and AfterEffects BT601 display tells me that the car seat will play as "black" on TV (at about RGB 6 to 8, which TV can't display anyway) one should see very little difference between the black seat backs and the black borders. For PC use, why limit to y'=16? Why not y'=0 for PC?.

    There's a little detail (and I mean a little) in the wall of the car behind the talking guy's head. It's a seat belt anchor, but it's mostly blocky and grimy from being crushed. There's also some detail behind the lower part of the head rest. All that would disappear if any darker. It can barely be seen on TV, but anything darker would just be black blobs. Since TV doesn't display in YUV (mine don't, anyway), I set it up for TV. For PC, make the darks darker.

    The MKV looked pretty good to me, but the blacks bothered me. They aren't black. They're blue. I guess it depends on what one likes. I don't know, I haven't had a chance to work with that yet.
    Last edited by sanlyn; 23rd Mar 2014 at 12:33.
    Quote Quote  
  26. will check myself once u manage to give the whole script/settings........nice work by the way
    but i was hoping if the washed out blacks could be managed
    smoothlevels can help neway? or contrast, or it'll bring us where we started?

    (my english is not good neway)
    Quote Quote  
  27. Originally Posted by sanlyn View Post
    I did use gamma. The dark colors of the back of the car seats variy between RGB 13 and 15. That will look pretty black on TV.
    You should be able to see the difference between all 220 shades of gray (Y = 16 to 235, RGB = 0 to 255) on a TV. (In practice the difference between some adjacent shades may not be visible, especially in small patches or when a wide range of brightnesses is being displayed simultaneously.) Many people have the contrast cranked up so that all the darks and brights are crushed. But that's their problem. You shouldn't be accounting for that.

    Originally Posted by sanlyn View Post
    Any darker, and details in the car'[s interior in the following scene will disappear, and so will the details in the shrubs' shadows outside the car window -- in other words, darker means going back where we started.
    Then use more gamma to increases the difference between near black shades (of course, the cost you pay is a decrease in the contrast of brighter shades). Or use gradations curves with a custom curve (after making sure the luma range is valid).

    Originally Posted by sanlyn View Post
    The MKV looked pretty good to me, but the blacks bothered me. They aren't black. They're blue.
    I was only addressing the OP's issue of bringing out dark details. I made no attempt to fix the colors (I may have bumped the saturation a bit to compensate for the increased gamma -- I don't remember) or anything else.

    I suspect the video was converted from PAL to NTSC without accounting for North American NTSC setup at the analog stage. Hence all the darks were crushed.
    Quote Quote  
  28. dear jagabo
    i'm not so expert so that i can even understand what u've instructed.

    can u please show me the path briefly..........or it was solely for sanlyn, for learning purpose??
    Quote Quote  
  29. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    You should be able to see the difference between all 220 shades of gray (Y = 16 to 235, RGB = 0 to 255) on a TV. (In practice the difference between some adjacent shades may not be visible, especially in small patches or when a wide range of brightnesses is being displayed simultaneously.) Many people have the contrast cranked up so that all the darks and brights are crushed. But that's their problem. You shouldn't be accounting for that.
    I agree, they should be distinct. But below comparable values from RGB 60 on down, the differences have been so compressed by crushing that the data for clear delineation isn't there. That, I think, is what crushing is: smooth transitions between darker and more-darker details is just blown away, contours go from dark dark colors to empty black in one step.
    And, yeah, I see TVs all the time running in volcano mode with reds you can see a block away. It's impossible to compensate for that, I just try to target the standards.

    Originally Posted by jagabo View Post
    I was only addressing the OP's issue of bringing out dark details. I made no attempt to fix the colors (I may have bumped the saturation a bit to compensate for the increased gamma -- I don't remember) or anything else.
    Right, I could see that. That's not a complaint, it's just something I noticed that would need some work. Another pain in the neck with some of the sloppy lab work.

    Originally Posted by jagabo View Post
    I suspect the video was converted from PAL to NTSC without accounting for North American NTSC setup at the analog stage. Hence all the darks were crushed.
    Likely you're correct. It's a shame, because live movies I see from Indian cinematographers usually look gorgeous. It's shame they screw it up on digital transfers, but that seems to be worldwide.
    Last edited by sanlyn; 23rd Mar 2014 at 12:33.
    Quote Quote  
  30. Originally Posted by baunduley View Post
    dear jagabo
    i'm not so expert so that i can even understand what u've instructed.

    can u please show me the path briefly..........or it was solely for sanlyn, for learning purpose??
    Here's the effect of increasing gamma:

    Click image for larger version

Name:	gammaUp.png
Views:	181
Size:	13.3 KB
ID:	14623

    Be sure to view the image full size.

    On the left is a chart of all 220 shades of grey from Y=16 to Y=235. If you look closely you should be able to see 16 different brightnesses from left to right across each row. These have already been contrast stretched to RGB=0 to RGB=255 as is usually done when converting YUV to RGB for display on an RGB device. The waveform monitor graph below shows the brightness increasing by 1 unit at each horizontal block.

    On the right is the result of ColorYUV(gamma_y=128, off_y=-12), a fairly extreme gamma change. As you can see the overall range of britnesses is the same. But the difference between consecutive dark shades has increased. At the lighter end of the spectrum you can see that the difference between consecutive shades is reduced. For example, the top line of the left graph shows 12 different intensities whereas the top line of the right graph shows only 7 different intensities. So the result of the increasing the gamma is to bring out detail in the darker areas at the expense of losing detail in the lighter areas.

    By the way, you can get a similar effect by using the gamma control in VirtualDub's levels filter. But the Levels feature will not let you bring out details in portions of the picture below Y=16. Because VirtualDub crushes all darks below Y=16 to the same shade of RGB, 0. Your video didn't have much below that level though.
    Last edited by jagabo; 7th Nov 2012 at 09:10.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!