VideoHelp Forum




+ Reply to Thread
Page 6 of 11
FirstFirst ... 4 5 6 7 8 ... LastLast
Results 151 to 180 of 318
  1. Looks good so far

    How did you end up dealing with the other problems ? like the noise in the fire& smoke section , the jittery titles, the breaks in the tape, I could go on ....
    Quote Quote  
  2. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Looks good so far

    How did you end up dealing with the other problems ? like the noise in the fire& smoke section , the jittery titles, the breaks in the tape, I could go on ....
    Had to spend a few days with chores and PC repairs, then moved all the opera work to an external drive so I could use it on other machines. The fire/smoke is about 2 hours in; I'll try something with Fizick's stuff later. BadFrames has helped a bit, still deciding on where to use it; it works OK in some spots, but many "flashes" are so brief they hardly matter. It's more a matter of aesthetics at times, if you know what I mean (?!). This week I'll be back at work on this disaster.
    Quote Quote  
  3. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Finding different problems everywhere with this video (why am I not surprised?). The sample clips below are from the end of Act Two, Scene1. It fades to black, then fades up to Scene 2. Lotta tape damage, looks like another section where the owner ruined some tape with the fast-rewind-fast replay feature. All 4 links are the same clip, about 9MB, 20 seconds.

    Left-click to play directly in your PC's media playr. Takes about 40 seconds to load.
    Right-click, then use the popup menu to download.

    (A) is from the original AVI converted from VOB with the ChubbyRain2 in AviSynth. The (A) clip has no denoising, just a color tweak and some border cleaning. Each version is a first try (after 5 hours of playing). I'm able to slightly alter the color of the remnants of red stain in the right-hand border, to the point where I can modify it to look more like the backgrounds from scene to scene. I didn't do much of that here. The top green stain is easier, for some reason; often it almost disappears.
    http://dc207.4shared.com/download/UICowpoW/A01_Wk50_TestA.mpg

    (B) is Clip A after using one of a great many versions of FFT3D. Works OK in other scenes, but was only -so-so here.
    http://dc207.4shared.com/download/WDWXueN_/A01_Wk50_TestA_FFT3D.mpg

    (C) is Cip A after NeatVideo. Results look pretty much the same as (B).
    http://dc207.4shared.com/download/WDWXueN_/A01_Wk50_TestA_FFT3D.mpg

    (D) is Clip A after VirtualDub's temporal smoother set at 5. I'm using this filter on many "easy" (sic) scenes. Sometimes it delivers, sometimes not. Go figure. I can't. Whatever works, people.
    http://dc207.4shared.com/download/nrRidZCR/A01_Wk50_TestA_Temp5xs.mpg
    Last edited by sanlyn; 1st Sep 2010 at 12:22. Reason: correct link
    Quote Quote  
  4. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Fiddling with denoisers for the part of this horrible video (but great music) that starts with Act 2. This is apparently from a 2nd VHS casette -- and you thought the first part looked bad! I used the same ChubbyRain2 script to make AVI's and then MPEG-2. The links below are for a cut-up of a 20-second group of short segments about 2 hours into the video. Smoke! Fire! Awful VHS noise! But no audio here.

    Here's the .M2V cut (about 6.7mb) from the original VOB (YV12, unprocessed).
    http://dc218.4shared.com/download/H2YB-pa6/Wk50_TestB.m2v

    This is what I get from one of many, many FFT3D scripts (YUY2). Not that I didn't try many other plugins, but FFT3D gave the "best" results.
    http://dc218.4shared.com/download/IjE0VwwM/Wk50_TestB_FFT.mpg

    Here are two FFT3D script statements from the many I tried. The MPG is from script #2, below:

    #1 (adapted from a sample in Fizick's HTML for the plugin):
    YToUV(fft3dfilter(bt=4,sigma=4,plane=1,sharpen=0.9 ,interlaced=true).UToY,\
    fft3dfilter(bt=4,sigma=4,plane=2,sharpen=0.9,inter laced=true).VToY,\
    fft3dfilter(sigma=4, plane=0))

    #2:
    fft3dfilter(bt=4,sigma=3,plane=4,sharpen=1.0,inter laced=true)

    This MPG is with NeatVideo, from my version #20 or so.
    http://dc218.4shared.com/download/w4Z4tCx_/Wk50_TestB_NV.mpg

    So far I'm leaning toward tweaking with NeatVideo, but I'm open. Because there was still some residual disturbance remaining from FFT3D and NeatVideo, both MPG's went thru thru a second step of very light VirtualDub temporal smoother (value=1) and some really mild xsharpen. I tried other sharpeners. They do little to improve the original, uh, details (?). Just makes it worse.
    Quote Quote  
  5. The NV version is way better.

    If you wanted to pursue avisynth route, you wouldn't use FFT3DFilter for one of the the main denoising filters. It works spatially only , and the type of noise that you see in that sample has a large temporal component (the fact that you used vdub's temporal smoother on both after denoising also strongly suggests temporal noise, even without looking at the video) . You could use FFT3DFilter as a subfilter for the chroma plane only (plane=3) (there is some chroma noise in that sample) , but I wouldn't use it for anything else in that sample
    Quote Quote  
  6. Originally Posted by poisondeathray View Post
    you wouldn't use FFT3DFilter for one of the the main denoising filters. It works spatially only...
    From the FFT3DFilter doc:
    So, it is a spatial-temporal (3D) filter...
    and sanlyn is using some 3D settings (BT=4), which definitely also works temporaly.

    I have no idea whether or not it's the best filter for the work here, and don't really much care.
    Quote Quote  
  7. You're right manono, I missed the BT settings . I guess what I'm trying to say is there are better avisynth temporal filters . Some of the mvtools1/2 filters , mvdegrainmulti , or even MCTemporalDenoise tend to work better in my experience . But some of them don't have interlaced modes , or work a lot worse on interlaced material . I know some people would approach this by bob-deinterlacing it first . I'm not sure what approach would be better, but I doubt anyone would disagree that the NV version looks better in that comparison
    Quote Quote  
  8. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I fiddled some more with two filters used in the previous videos, and got cleaner (much) results from both. Figures in fog were more distincty a little more streaky stuff gone too. It got to the point where both filters looked so much alike, I'll have to leave the clip alone for a few days because I'm starting to see no difference. Most of the noise is in the Y channel. I also tried MCTemporalDenoise, various degrainers, smoothers, and others that were suggested, and even some combo scripts I found on Doom9. Not finished with those yet. The level and character of noise in the last 2 hours is like that in the sample. So once I get a filter combo that works, I just need one filter.

    Agreed, manono, the source PQ is atrocious. Even with work, it'll still be atrocious. Great learning tool, though. Hopefully the thread can offer something substantial to anyone stuck with similar garbage. BTW, the music is good stuff, and the gal playing Mignon does great work. Too bad the owner had to ruin the damn video.
    Last edited by sanlyn; 3rd Sep 2010 at 16:35.
    Quote Quote  
  9. I think the NV did a fairly good job on that section considering what you started from. Even with lots of avisynth tweaking, I doubt it will be signicantly better than what NV could do for that type of noise. (But I've been surpised before by some of the avisynth gurus at doom9). It's hard to take away the that type of shimmering noise, and retain any detail (not that there was much detail to begin with)

    I mentioned this earlier, but another thing you could look at is feathering the edge overlays. In some sections , the transition is too sharp, and it doesn't blend very well. I asked how to do it at doom9 , but it involves making masks , and your masks might change for different sections. It might be too troublesome to do in avisynth compared to doing it in other programs, but if you wanted to look at it see post#9 http://forum.doom9.org/showthread.php?t=156383
    Quote Quote  
  10. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Thanks, poison, I found that link about a week ago. No time to use it yet. Also looking up various ways people have used MaskTools. Even searching the newsgroups now.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    I mentioned this earlier, but another thing you could look at is feathering the edge overlays. In some sections , the transition is too sharp, and it doesn't blend very well. I asked how to do it at doom9 , but it involves making masks , and your masks might change for different sections. It might be too troublesome to do in avisynth compared to doing it in other programs, but if you wanted to look at it see post#9 http://forum.doom9.org/showthread.php?t=156383
    I played with that post for a while, and some other desperate tricks. Then, a few hours playing with the red border this weekend. Below are a few lines from the original script that works with the 330 pixels of that red border. Note that the Tweak statement reduces saturation of the entire "c" image and then ColorYUV subtracts a bit of red and adds a little blue. But this method changes all colors in the red border, not just red. When the cleaned "c" image is overlaid onto the frame, it's less red but any other color in the overlay fails to match the originals.

    Code:
    #right overlay
    a
    chubbyrain2()
    smoothuv(radius=7)
    tweak(sat=0.80)
    ColorYUV(off_v=-1.0,off_u=0.1)
    crop(330,0,0,0,true)
    #levels(50,1,255,0,255)
    c=last
     
    #overlay the right border onto the last composite above (\\\\\\"d\\\\\\")
    overlay(d,c,x=330)
    weave()
    e=last

    So I "tweaked the Tweak", so to speak, and got cleaner results. The routine has to be tweaked again a few times during the video (but not often) to make the overlaid border less apparent. I tried applying Tweak mostly to Reds spread over RGB 80 to 150, and avoid affecting Green and Blue. In the overlay" statement, using a little transparency also helped, since the original Red border is slightly feathered on its left edge. Works so far. I also changed the width of the "c" image from 330 to 332 pixels, so I'd get a 4-pixel spread for YV12. That, too, looked cleaner. Will try to post examples later.

    Code:
    #right overlay
    a
    chubbyrain2()
    smoothuv(radius=7)
    ColorYUV(off_v=-3.0,off_u=-1.0)
    ##### apply some color correction to reduce Red intensity only #####
    Tweak(coring=false,starthue=1,endhue=135,Hue=-60)
    crop(332,0,0,0,true)
    #levels(50,1,255,0,255)
    c=last
     
    #overlay the right border onto the last composite above (\\\\\\"d\\\\\\")
    overlay(d,c,x=332,opacity=0.85)
    weave()
    e=last
    Quote Quote  
  12. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    A link to another version of the smoke-and-fire clip posted earlier (Wk50_TestB, original, FFT3D, and NeatVideo versions). After tweaking Tweak and ColorYUV, the bright border is less distinct. Each bsegment of this clip has different background colors, so a few more minor tweaks might kill this border altogether. Good thing there are only a handful of major background changes in this show. Clip is about 10-MB.
    http://dc221.4shared.com/download/1UUzlOC9/Wk50_TestB_Borders.mpg

    Below, the old right border is on the left, new work on the right.

    Click image for larger version

Name:	Before_After.jpg
Views:	465
Size:	32.8 KB
ID:	3399

    I was disappointed with the way Tweak "de-saturates" a color. Normally it's done by adding or subtracting white; Tweak does it by adding or subtracting unequal amounts of the other 2 colors, or just 1 color. Tsk, tsk. That doesn't desaturate, it just changes hue. They should know better. I tried playing with Tweaks "mask" parameters to get a grayscale involved, but AviSynth gives no clue how it works in Tweak.
    Last edited by sanlyn; 7th Sep 2010 at 20:34.
    Quote Quote  
  13. Nice improvement

    So adjustments on the overlay using tweak() and opacity of the overlay() ?

    Were there other sections you had to adjust for ? (ie. is it going to be a lot of work, or does it match ok pretty much overall)

    I know the hue parameter in tweak() doesn't work properly, or as expected - was that what you were referring to ? or were you referring to the sat parameter ?
    Quote Quote  
  14. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Nice improvement

    So adjustments on the overlay using tweak() and opacity of the overlay() ?

    Were there other sections you had to adjust for ? (ie. is it going to be a lot of work, or does it match ok pretty much overall)

    I know the hue parameter in tweak() doesn't work properly, or as expected - was that what you were referring to ? or were you referring to the sat parameter ?
    I was referring to "Sat". Didn't expect it to turn Red into Brown. I'm certain there are more sophisticated ways to do this, but time is getting to be an element. Found more precise stuff in Doom 9 tonight, so heavy I had to lie down 15 minutes after reading only 1 forum page!. Food for (later) thought, for sure. Yep, that "Hue" is an odd critter, I', not quite sure what it's doing in certain ranges, but it's unpredictable and changes every color drastically if you don't watch it.

    I think I have some basic Tweak and Coloryuv workarounds, as posted earlier, that effect the Red in that border. Tough to filter, because unlike the Green stain that hops around and blinks, Red just hangs there, the same, all the time (so many filters won't see it as "noise", very likely). Red gets thicker and darker as the video runs. These little tricks work most of the time. So far, I don't see having to tune them very often.

    I don't know if anyone noticed, but VHS cassette #2 starts with a darker red border, the same green junk at top, and adds a very wide, diffuse blue cloud at the left. I don't see any way to filter every stain and rainbow outta this video without processing it to death. So a few booboos will just have to stay there...at least, until I learn some fancy masking techniques that won't take a month of Sundays to master.

    Remember when you used to just shove a tape into the front drawer and hit "Record" ?
    Quote Quote  
  15. yes, everything is so inconsistent and changes each scene - it's hard to do in avisynth - or you have to divide up into many segemnts, it would be easier to keyframe in other programs

    Another approach might be to do the overlay in RGB (since the avisynth tweak esp. hue command are "wonky") , you can overlay RGB onto YV12 base video (or use different colorspaces, you just have to correct for PC vs. TV levels) - overlay() works ok like that . I personally find everything easier in RGB, maybe because I'm more used to color wheels & photoshop style CC .
    Quote Quote  
  16. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    poisondeathray, I just spent several hours browsing thru AviSynth/VirtualDub docs, scripts, posts, etc., about everything you've mentioned. Still don't see what I'm looking for exactly, but will keep on while the denoisers keep working on another opera segment. There's only so much one can do with a bad source. I'm just now looking up everything I can find on fizick's stuff (and even have my ancient C++ manuals nearby! But just no time to go back 8 years into that!). The denoisers and stuff like ColorMill are doing an acceptable job so far, and I'm halfway into the opera.

    Brother, if only a line-level TBC had been used here! I once transferred a 3-hour football game for my nephew. His VHS had similar physical damage (at least it had an otherwise clean, sharp image!). I used a Toshiba DVD recorder as a TBC pass-thru device. Worked wonders, all ripples and most of the torn/wrinkled frames recorded just beautifully. Too late for this opera, though.
    Quote Quote  
  17. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Rant: Y'know, I just spent most of the past 3 weeks scouring deeply into AviSynth and VirtualDub alike for ways to make more improvements in this godawful video (Never mind "why". That would be a fit discussion for starting a Philosophy section in the forum). Some of this research has been profitable. As I did a few years back, I'm re-learning that VirtualDub is essential for some types of work, and AviSynth is indispensable for other tasks. What I have against AviSynth, however -- and VirtualDub to a lesser extent -- is the sloppy, haphazard, often cryptic and sometimes undecipherable documentation. Some of AviSynth's docs are apparently in Croate or even Martian; not even online translators can help.

    I'm proceeding with the tools we've developed so far in this thread, but while my PC's run those jobs I'm looking into masks and AviSynth functions. Here is just one example of why, as I found years earlier, AviSynth is akin to an exercise in shooting yourself in both feet. The AviSynth doc explains stuff like moving U or V data into the Y-channel for various reasons. Easy enough to understand. But then they give this wonderful example script to "illustrate" their point:

    Code:
    # Blurs the U chroma channel 
    video = Colorbars(512, 512).ConvertToYV12
    u_chroma = UToY(video).blur(1.5)
    YtoUV(u_chroma, video.VToY)
    MergeLuma(video)
    Perhaps someone other than yours truly can see what is accomplished by this script. It generates exactly the same output you'd get if you simply generate an unmodified Colorbars video. You can always just exclude some of the command lines to see what each line does, but that's an absurd way of presenting an explanation.

    End rant. As you were, troops.
    Quote Quote  
  18. If you open 2 tabs in avsp, flip back & forth (push f5 to preview, press the 1&2 keys to toggle back & forth) you will see they are different (the lines are more blurred between the u channel blur and normal colorbars().converttoyv12() )

    It's about as profound that comparing colorbars(). to colorbars().ConvertToYV12() - i.e. comparing the quality loss from RGB=>YV12 conversion

    You can stack blurs or use different blur functions if you want greater magnitude of effect
    Quote Quote  
  19. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Yes, I can see the lines are slightly blurred, but a novice trying to learn from the example wouldn't notice. Anyway, it was just a temporary rant (I almost went back to delete it, but what the heck). My complaint is that the (typical) example just doesn't explain much. Some of the docs on MaskTools mention umpteen parameters and states something like "values can be 0 to 10". But what does this param actually do? You run 4 or 5 scripts with 4 or 5 values, and you figure it out. Or you scour Doom9 and (maybe) find a clean explanation and practical applications. Not that you always have to have a push-button answer on a silver platter. It literally took days of searching to find this very useful thread on Tweak:

    http://forum.doom9.org/showthread.php?t=153945

    which eventually led to this conclusion:

    http://forum.doom9.org/showthread.php?p=1405481

    I'm playing with the ideas in those posts right now. Voila! Several solutions at once, at last. Also have 5 Photoshop web pages open on my laptop explaining how to use masks for sharpeners, etc., and feather mask edges (now all I have to do is figure how to make gradient masks in either YUV or RGB. Another week maybe? Looking at MaskTools docs for that tonite). Eventually all this stuff comes together, but wow! I'm exhausted.

    It's age, people. That what does it. Time for an Emergen-C moment.
    Quote Quote  
  20. Yes , masktools documentation is really hard to understand. You have to be a programmer to understand it (and I'm not). Definitely not user friendly. But many of the complex functions and good filters rely on masktools - but you don't have to understand masktools mechanics unless you're writing your own function

    I like the functions where there is 1 parameter like strength from 0 to 100 , but thankfully people often put together some filters more user friendly like that selsah function

    RE: gradient masks - in most programs, 100% white = transparent , 0% white = opaque . But avisynth uses inverted masks, where 100% white = opqaue . Obviously, the mask itself would be easier to do in photoshop (or gimp or some image editor) . This is still going to suck, because you would have to swap masks out for different sections when the edges change if you wanted to get it perfect. You might be able to use animate() to animate some parameters like opacity or tweak, but the mask shape itself cannot be keyframed in avisynth

    For sure avisynth can get frustrating with all the detective work. There are easier ways for things feathered overlays, keyframming masks, and selective desaturation, but unfortunately those are retail comopsiting products
    Quote Quote  
  21. Great tool, avsp. I didn't knew about that.

    Good to know and can compare scripts with GUI.

    Thank you.
    Quote Quote  
  22. ^ yes it's a godsend

    There are sliders for some function parameters ... just like a normal GUI (e.g. adjusting strength etc..) , and if there isn't any for that particular function you can use program it to generate your own sliders in avsp
    Quote Quote  
  23. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    The idea behind a partially-gradient mask arose from the need to feather overlay and mask edges -- e.g., a few pixels along one edge of the mask get gradually closer to white or black than the inner part. This, as I learned from another site lost in my Notepad files of thousands of found sites, is one method used by Photoshop designers to feather the edges of applied masks. I did figure out a way to do it in AviSynth, but it involved saving the filtered borders as separate files, saving parts as "strips" of varying density, etc., blah, balh........

    But wait! Thankee, poison, this had me ranting again, which led my ossified brain to an easier way .

    Now, all I need is time to do it.
    Quote Quote  
  24. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I managed to make gradient grayscale masks in Photoshop. The original photoshop BMP's are gradients that start out white on one side (RGB 255,255,255), while the last few edge pixels fade to a darker gray (128,128,128 or so, but I tried many different grays). Also made inverted (gray-toward-white) versions.

    Made the BMPs into 1-minute AVI's, 24x480 frame size -- same frame size as the "c" clip (right-border cropped from the original video) that gets filtered by ChubbyRain2 and then overlayed onto the main video. The mask's bright and dark areas affect how much of the original image shows thru after the filtered "c" clip is laid onto it (i.e., the mask will control the opacity of the overlay, from transparent to invisible).

    In the original VOB-to-AVI script posted earlier, there's lots of processing and border cleaning in YV12 before the source is converted to RGB32 AVI. After the reddish right border is cleaned by ChubbyRain2, its 24-pixel width (named "c") is overlaid onto the original clip (named "d") with this statement:

    overlay(d,c,x=328,opacity=0.8)

    After a mask clips was made, it was inserted into the script as follows:

    mask_c=AviSource("J:\Mignon02\Work02\MaskA\C1_Grad ientA_128_24pix.avi")
    mask_c.ConvertToYV12(interlaced=true).ColorYUV(lev els="TV->PC")

    The clip names don't matter here, as I tried several versions with different names and with variations of the load statements. Then the overlay statement was changed to this:

    overlay(d,c,x=328,mask=mask_c)

    Guess what? The effort made very little difference. Just using Tweak and ColorYUV workarounds alone, the filtered overlay is difficult to detect. You have to know it was there in the first place, and still you have to look for it.

    Anyway, at least I refreshed my AviSynth knowledge of overlay masks. And the masks did work in the test frames. Will be useful in other ways. Here are images of two of the 24x480 gradient masks I made (one is just an inversion of the other). Each has a "feathered" edge:

    Click image for larger version

Name:	two_gradients.gif
Views:	437
Size:	7.8 KB
ID:	3429
    Last edited by sanlyn; 10th Sep 2010 at 18:19.
    Quote Quote  
  25. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Um, I did notice one thing in the original VOB->AVI script. Look at the crop statement in this routine (original script):

    #right overlay
    a
    chubbyrain2()
    smoothuv(radius=7)
    Tweak(coring=false,starthue=1,endhue=130,Hue=-40)
    ColorYUV(off_v=-2.0)
    crop(330,0,0,0,true)
    c=last

    Then look at what happens when "C" is overlaid:

    ##overlay the right border onto the last composite above ("d")
    overlay(d,c,x=330,opacity=0.8)

    "c" is being overlaid on the wrong pixel. Orginially "c" was the same width as the video (352 pixels). It then has 330 pixels cropped off its left side, so it's only 24 pixels wide when it's overlaid onto position 330. It should have been overlaid at position 331 to cover the remaining 24 pixels of the original frame. If it's overlaid at pixel #330 it covers only pixels 330-to-351, not 331-to-352.

    Why does it take so long to notice this stuff?

    Earlier in the script the green stain at the top isn't affected; it's always overlaid by default at pixels x=0,y=0.
    Last edited by sanlyn; 17th Sep 2010 at 09:00.
    Quote Quote  
  26. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Made some improvements in filtering the green top and red right borders, with better results. Below is an extract from the script that (a) scrubs the two borders, (b) cleans up remnant stains after running ChubbyRain2, (c) overlays onto the original clip, (d) makes overall color balance correction, (e) converts YV12->RGB32. I get tired just thinking about it. The script changes use Tweak, ColorYUV, and overlay. The sample code is a general idea of the tricks played. Only minor changes are required for a few short scenes.

    # --------------- top overlay -----------------
    a
    chubbyrain2()
    smoothuv(radius=7)
    # -------------- Clean up green/cyan remnants ------------------
    Tweak(coring=false,startHue=215,endHue=270,sat=0.5 )
    ColorYUV(off_v=0.5)
    crop(0,0,0,-220,true)
    b=last

    # -------------- right overlay --------------
    a
    chubbyrain2()
    smoothuv(radius=7)
    # ------------- Reduce Red remnants, tougher to remove --------------
    Tweak(coring=false,startHue=90,endHue=125,maxsat=1 15,minsat=75,sat=0.6)
    ColorYUV(off_v=-2.0,off_u=0.5)
    crop(328,0,0,0,true)
    c=last

    # -------------- overlay the top onto original --------------
    overlay(a,b)
    d=last

    # -------------- overlay the right border onto the last composite above ("d") --------------
    overlay(d,c,x=328,opacity=0.9)
    e=last
    weave()
    ColorYUV(off_u=+6,cont_u=-100)
    ConvertToRGB32(matrix="Rec601",interlaced=true)
    Quote Quote  
  27. I was disappointed with the way Tweak "de-saturates" a color. Normally it's done by adding or subtracting white; Tweak does it by adding or subtracting unequal amounts of the other 2 colors, or just 1 color. Tsk, tsk. That doesn't desaturate, it just changes color.
    (...)
    I was referring to "Sat". Didn't expect it to turn Red into Brown.
    In YCbCr space, the saturation is calculated as sat = sqrt(cb^2+cr^2) with 0<=cb,cr<=1. Setting the sat option in Tweak scales cb and cr by the same amount (namely by "sat"). I don't see how that changes color as you claim. (If you create a red clip using blankclip, you will see it doesn't turn brown.) Are you sure that you didn't confuse the sat and hue setting by accident?

    Btw, we are talking about AviSynth's internal function Tweak right (because there are some other versions floating around)?

    Hue is calculated as 180 * atan2((Cr-128), (Cb-128)) / PI. (Cb,Cr) and it is modified as follows
    SIN = sin(Hue)
    COS = cos(Hue)
    destCb = Cb-128
    destCr = Cr-128
    [dCb; dCr] = [COS -SIN; -SIN COS] * [destCb; destCr]
    Looks good to me. Of course, it might be that there's something terribly wrong withe code.
    They should know better. I tried playing with Tweak's "mask" parameters to get a grayscale involved, but AviSynth gives no clue how it works.
    Which mask parameters are you refering too? Could you elaborate on what you are trying to do here?

    @poisondeathray,
    I know the hue parameter in tweak() doesn't work properly, or as expected - was that what you were referring to ?
    Please elaborate.
    Quote Quote  
  28. Originally Posted by Wilbert View Post
    @poisondeathray,
    I know the hue parameter in tweak() doesn't work properly, or as expected - was that what you were referring to ?
    Please elaborate.
    Tweak's hue function doesn't correlate to most other traditional color correction & programs, because it's working in YCbCr space . Perhaps it works properly in YCbCr space, but I don't find it very useful.
    Quote Quote  
  29. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    poisondeathray, I found good notes on working with Tweak in several doom9 posts by trevlac. It's possible to use "Hue" in Tweak to change a color (like from Green to Red). Of course if someone wearing a green garment appears inside the filtered border, the garment turns green! The idea of using start/end points was to affect only a specific color range, not the entire border. One of trevlac's posts gave this guide to the YUV color wheel as seen by Tweak's Hue parameter:

    startHue=20, endHue=80 #magenta
    startHue=80, endHue=140 #red
    startHue=140, endHue=200 #yellow
    startHue=200, endHue=260 #green
    startHue=260, endHue=320 #cyan
    startHue=320, endHue=359 #blue

    The only range not mentioned in this table are 0 - 29 (which is, of course, a really reddish magenta) . What I actually did was make several frame captures and work with them in Photoshop to determine the exact RGB value of the remnants, then translate the basic RGB number into Hue. That seems to work pretty well targeting a color with Tweak. There are a few brief sequences in the video that require minor fiddling with start/end numbers, but once you zero-in on the color range the corrections work tolerably well.

    When I referred to a "mask" I spoke of adjustment masks and layers used in Adobe (Photoshop, AfterEffects, etc.). Saw in the past some very clever Adobe plugins using layers and masks to do some great recovery work. I figure for a mere $2500 to $3000 in new software and add-ons these should work even better. AviSynth might get closer to that with MaskTools, but I'm afraid few people have time to get into C++ and assembler to work with that, and posts I've seen about using it are undecipherable, unexplained, and/or impossible to customize. I haven't looked at C++ source code since 1996, but a few quick glimpses since then told me that VC++ has changed a lot since I used it to design a few Windows 95 GUI's.

    Getting more specific with Tweak works OK so far, especially for a relatively quick and manageable fix (not to mention fitting inside the budget!).
    Quote Quote  
  30. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Finally got thru Act One. Made up a quickie (?) 1-1/4 minute before-and-after demo of selected horrible moments from the original. Audio is MPG-Layer2; the DVD will be AC3. NOTE: In the "after" version I made a fooh-pah and used an early clip from which I deleted 2 noisy frames instead of just one. You'll see a movement "jerk" there, but it's undetectable in the final DVD.

    All my monitors are calibrated, so if you use out-of-box settings on your monitor or TV I have no idea what you'll see. If you use uncalibrated monitors for video work, you're beating yourself up anyway (out of the box, a monitor or TV has brights 300% too high, oversaturated red, terrible low-end gamma, etc).

    "Before" demo (32-MB):
    http://dc239.4shared.com/download/PY6qtYoF/VOB15_demo_original.mpg

    "After" demo (50-MB):
    http://dc239.4shared.com/download/4VnvY2_M/VOB15_demo_after.mpg

    Here are half-size pics from the demos. "Before" on the left, "After" on the right:

    Click image for larger version

Name:	Before_After_12.jpg
Views:	344
Size:	55.7 KB
ID:	3601
    Click image for larger version

Name:	Before_After_34.jpg
Views:	338
Size:	49.1 KB
ID:	3602
    Click image for larger version

Name:	Before_After_56.jpg
Views:	382
Size:	45.3 KB
ID:	3603

    On to Act Two! And thanks very much to everyone who contributed to this thread.
    Quote Quote  



Similar Threads

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