VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 61
Thread
  1. Member
    Join Date
    Sep 2015
    Location
    valencia
    Search Comp PM
    hello,i had very new to all this,i had now learned litlle about avisynth.i want to advise for restore this clip ,i had captured this clip with jvc hr s9850 with tbc on with hauppauge live usb 2 with iuvcr.codec i used huffyuv.please advise me about good avyisynth filter chain to clean this video and correct color and everything.sorry for bad english.
    Image Attached Files
    Last edited by navi82; 28th Sep 2015 at 08:57.
    Quote Quote  
  2. I recommend you go back and capture without deinterlacing.
    Quote Quote  
  3. Member
    Join Date
    Sep 2015
    Location
    valencia
    Search Comp PM
    yes ,i had captured without deinterlacing and updated samples,now please help.
    Quote Quote  
  4. You're getting a very stable capture with relatively little noise or artifacts given the circumstances. Well done.

    Any further processing is going to be more for aesthetic purposes than technical. That means scene by scene, and Avisynth may not be the most elegant tool for the task.
    Quote Quote  
  5. I agree that your capture is good quality, but you definitely can make it a LOT better, and AVISynth is definitely the right tool for the job.

    1. HuffYUV is not setting the interlaced flag. Make sure that any further work you do on this clip is designed to deal with interlaced footage, with top field first (TTF).

    2. Whatever capture system you are using is setting the frame rate to something that is slightly odd (25.020 fps). See if you can find some setting, and change it so that you get exactly 25.000 fps.

    3. The noise you have in your video is very typical of low-light captures, but because your capture is excellent, you should be able to reduce it. Do NOT try to remove too much of it, however, or you may actually make the video look worse. Resist the temptation to increase the strength of any denoising until all noise is eliminated. Doing this will result in loss of detail, and video that is very artificial looking.

    Here is a simple denoising script that will get you started. It only reduces noise and does not attempt to brighten the image. That work is usually much better to do inside of your NLE (non-linear editing program). Remove the "stackhorizontal" line and instead use the return line when you are finished comparing the original to the denoised version, and are ready to output the final result.
    Code:
    #Denoiser script for interlaced video using MDegrain2
    
    Loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
    
    #Modify this line to point to your video file
    source=AVISource("E:\fs.avi").killaudio().AssumeTFF()
    
    output=MDegrain2i2(source,16,2,0)  
    
    #Alternate denoising. Each line is slower than previous line
    #Slower does NOT always mean better. You need to do your own testing, and make your own decision.
    #output=MDegrain2i2(source,8,0,0)  
    #output=MDegrain2i2(source,8,2,0)  
    #output=MDegrain2i2(source,8,4,0)  
    #output=MDegrain2i2(source,4,0,0)  
    #output=MDegrain2i2(source,4,2,0)  
    
    #Put a comment in front of the next line and remove the comment (#) from the "return" line 
    #when ready to product final output
    
    stackhorizontal(source,output)
    #return output
    
    #-------------------------------
    function MDegrain2i2(clip source, int "blksize", int "overlap", int "dct")
    {
      overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
      dct=default(dct,0) # use dct=1 for clip with light flicker
    
      fields=source.SeparateFields() # separate by fields
    
      super = fields.MSuper(pel=2, sharp=1)
      backward_vec2 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
      forward_vec2 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
      backward_vec4 = super.MAnalyse(isb = true, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
      forward_vec4 = super.MAnalyse(isb = false, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
    
      MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400) 
      Weave()
    }
    [edit]Increase the thSAD setting in the MDegrain2 line in order to increase the strength of denoising. You can use any number, but you won't get much improvement with anything beyond 1500.
    Last edited by johnmeyer; 28th Sep 2015 at 11:53. Reason: added thSAD comment at end
    Quote Quote  
  6. I noticed some glitches in the 1st sample. I didn't have time to look in detail - but there appear to be some field repeats . For example , field 314 is a repeat of 312 . field 1614 is a repeat 1612 . There are probably more . You can probably delete them through a script with decimation but it would be better to fix it earlier in the workflow if you can isolate the underlying problem. Probably your USB device

    It might be related, but the framerate is read as 25.02 when using AVISource of FFMS2, so your device might be inserting spurious fields. John mentioned this frame rate issue too above

    It's subjective what you plan to do with it - but I would probably brighten it up (at least the shadows) and denoise it moderately as well
    Quote Quote  
  7. I agree it's in pretty good shape. You might look at increasing the gamma a bit to bring out some of the dark detail. The brights are a bit high too. Something like:
    Code:
    ColorYUV(gamma_y=100, gain_y=-15, off_y=-9, cont_u=40, cont_v=40)
    on the birthday cake video. Deinterlacing, even with QTGMC, is going to mess up those Venetian blinds in the background. That one is better left interlaced.
    Quote Quote  
  8. Originally Posted by poisondeathray View Post
    I noticed some glitches in the 1st sample. I didn't have time to look in detail - but there appear to be some field repeats . For example , field 314 is a repeat of 312 . field 1614 is a repeat 1612 . There are probably more.
    How the heck did you find these? I went through some of the fields, just to make sure it was interlaced (since HuffYUV and Mediainfo weren't sure), and also to check field dominance, but I only looked at a few dozen frames from the beginning, middle, and end. Do you have some software that looks for repeats?
    Quote Quote  
  9. Originally Posted by johnmeyer View Post
    Originally Posted by poisondeathray View Post
    I noticed some glitches in the 1st sample. I didn't have time to look in detail - but there appear to be some field repeats . For example , field 314 is a repeat of 312 . field 1614 is a repeat 1612 . There are probably more.
    How the heck did you find these? I went through some of the fields, just to make sure it was interlaced (since HuffYUV and Mediainfo weren't sure), and also to check field dominance, but I only looked at a few dozen frames from the beginning, middle, and end. Do you have some software that looks for repeats?

    No it's just pure luck - I just "eyeballed" it and noticed something weird - beyond the regular issues . It was something subliminal, just an impression. So I looked closer with avisynth field by field in that section and found a few. 302 and 304 as well. There's probably more. I didn't download the 2nd video, but I'm guessing they are there too. Probably worth taking a closer look at the capture setup
    Quote Quote  
  10. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    In sample_20150928-150209.avi frames 151 and 152 are duplicates, so are frames 156-157. Wasn't sure the first time around, so I checked again.

    Darks in clothing are crushed.
    - My sister Ann's brother
    Quote Quote  
  11. Actually, it's not duplicate fields, it's duplicate frames. 151 and 152 are the same. 156 and 157. 807 and 808.

    <edit>
    Oops. No, it's 806 and 807
    </edit>
    Last edited by jagabo; 28th Sep 2015 at 17:55.
    Quote Quote  
  12. Member
    Join Date
    Sep 2015
    Location
    valencia
    Search Comp PM
    how to pervent duplicate frame,i know when i stoped caturing this sample ,end of capturing appear massage about 4 duplicate frames .i use iuvcr for capture with hauppauge usb live 2,with virtualdub i have too much dropped frames,with iuvcr no dropped frames
    Quote Quote  
  13. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by jagabo View Post
    Actually, it's not duplicate fields, it's duplicate frames. 151 and 152 are the same. 156 and 157. 807 and 808.
    Yep, that's what I said. Frames. I didn't get as far as 807/8.
    - My sister Ann's brother
    Quote Quote  
  14. I said "fields" - my fault - but jagabo is right, they are entire frames that are duplicates . Anyways there is a problem with the capture. I'm not familiar with usb live 2, so I don't know what to suggest, but that would be my guess as to the culprit
    Quote Quote  
  15. Originally Posted by LMotlow View Post
    Originally Posted by jagabo View Post
    Actually, it's not duplicate fields, it's duplicate frames. 151 and 152 are the same. 156 and 157. 807 and 808.
    Yep, that's what I said. Frames. I didn't get as far as 807/8.
    It's just a cross post. I started writing my post before you posted. Then finished and posted after you. So my post was a reply to pdr's post, not yours.
    Quote Quote  
  16. Originally Posted by navi82 View Post
    how to pervent duplicate frame
    I don't know about your capture card. But if you can't solve the capture problem you can remove the duplicate frames with
    Code:
    Loop(0,807,807) # remove frame 807
    Loop(0,157,157) # remove frame 157
    Loop(0,152,152) # remove frame 152
    Note that it's easier to work in reverse because the higher numbered frames change number when you remove an earlier one.

    Or you can replace progressive frames with motion compensated frames with ReplaceFramesMC(). So you could use:
    Code:
    QTGMC(preset="fast") # smart bob to make progressive frames
    ReplaceFramesMC(304,2) # replace frames 304 and 305 with motion interpolated between 303 and 306
    ReplaceFramesMC(314,2) # etc.
    ReplaceFramesMC(1614,2) # etc
    This type of motion interpolation doesn't always work well. You can find ReplaceFramesMC() somewhere in these forums.
    Quote Quote  
  17. I would advise against doing the frame replacement, because that is almost certainly only half your problem. I haven't looked carefully, but most bad captures involve two related problems. The first problem is that the capture card can't keep up and it drops a frame. You end up with a jump from the missing frame. These are tough to detect reliably via a script, but they are often obvious, and very annoying. Then, a few frames later, the capture card duplicates a frame in order to keep the audio in sync. Duplicates are extremely easy to detect, and I have all sorts of scripts that I can post that do this so you don't have to walk through, frame-by-frame, and then create ReplaceFrame() statements. Writing a script which finds duplicates is easy; finding dropped frames via a script is really hard.

    I am almost certain this is what is going on with your video, because the audio will drift out of sync if you have multiple duplicate frames without corresponding drops.

    I can post a link to a thread in another forum where, with the help of a now-retired guru, I was able to come up with a script that does, more or less, fix both of these things. Unfortunately, as good as the script is, it still isn't perfect.

    So, my advice is to figure out why your capture equipment is malfunctioning, and then re-capture.
    Quote Quote  
  18. Member
    Join Date
    Sep 2015
    Location
    valencia
    Search Comp PM
    i had now captured with virtualdub with same hardware,not get any dropped or inserted frame.please anyone confirm if i get any duplicate frame.
    Image Attached Files
    Quote Quote  
  19. I didn't notice and dropped or duplicate frames.
    Quote Quote  
  20. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    1) As per the quality, I don't see anything troublesome. It's VHS, so expectations should be realistic. But you have a good start regardless. Good going. You can run denoising scripts, etc, but many are subjective. But there is a way you can do even better.

    2) As per the dropped/inserted frame issue of previous, there are several guides around the 'Net on minimizing this. It could be your VCR, your capture device, your computer, your tape, etc. If it's only a few frames, and they're in different places each time you capture, there is a way to correct this.

    Having said that, the corrections/improvements I was referring to in both 1) and 2) of the above is in utilizing multiple captures and median methods. I use median(clip1,clip2,clip3).

    If you capture a tape 3 times, you can remove many of the random errors that occur. You will notice a dramatic cleanup in your captures, even before you decide on a denoiser method. This alone will make a difference between a good capture (which is what you have) to a very good capture, and you will get this improvement even on the best of tapes.

    You will also take care of all the dropped and inserted frames, assuming they're in different places each time. I personally do this manually by scrubbing through the video using trim() to align them, stackhorizontal(clip1,clip2,clip3) to see them together and look for such frames, and use duplicateframe() or deleteframe() where appropriate when I find a dropped or inserted frame. If you're getting lots of dropped frames then this will be very time consuming but possible to correct, but it's better to look at your setup if that's the case.
    I hate VHS. I always did.
    Quote Quote  
  21. Member
    Join Date
    Sep 2015
    Location
    valencia
    Search Comp PM
    when i capturing with virtualdub not getting any droped o inserted frame.
    Quote Quote  
  22. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    Originally Posted by navi82 View Post
    when i capturing with virtualdub not getting any droped o inserted frame.
    You can see the inserts, but unless you know your content frame-by-frame you will not know about the drops.

    VirtualDub is good capture software IMO, and I've used it extensively over the years. However, there are reports that it drops frames (something to do with sync, or audio, timing, buffer, etc - don't care personally since it didn't affect me with any problem that wasn't easily correctable).

    The only way you will know for sure if your setup is dropping frames, at least if they're in random places, is to try the same capture, from the same tape, say 30+ minutes of sample video, multiple times (try 3X or 4X).

    Then, starting from the same frame, brush through the video, of each (such as with multiple instances of VirtualDub and ^TAB), scene-by-scene, or 500-1000 frames at a time. Is frame 17755 of clip 1 the exact same frame as that of clip2 or clip3, etc.?

    Or, look for scene changes, which is easier to notice. Is the scene change at frame 32822 in clip1 also at frame 32822 in clip2, clip3, etc.?

    Are all the videos perfectly matched frame-by-frame all the way to the end?

    If not, then you have dropped frames. You should even find them too.
    I hate VHS. I always did.
    Quote Quote  
  23. Member
    Join Date
    Sep 2015
    Location
    valencia
    Search Comp PM
    Hello i am using script that johnmeyer recomend me for denoising.but with this i am using also some color and brightness and QTGMC filter,but when i using script like first attechment is not working ,but when i doing like second attachment is working well.in second script where everything in source line is working good and i got good result with this .you can see sample i done with this script below,where i am doing wrong.i am very new for this,please help.
    Image Attached Files
    Quote Quote  
  24. One thing you should know before you start: when you don't specify a stream by name AviSynth assumes the name "last". So a script that like:

    Code:
    AviSource("D:\new2.00.avi")
    ConvertToYV12(interlaced=true)
    is saying:

    Code:
    last = AviSource("D:\new2.00.avi")
    last = ConvertToYV12(last, interlaced=true)
    In your first script you create a stream called Source. Then you call ConvertToYV12() but don't specify a stream. AviSynth will fail right there because it will assume "last" which hasn't yet been defined. Later in the script you call MDegrain(), specifying Source as the video stream. That will throw away all the intermediate results. Try this as the main thread:

    Code:
    Source=avisource("D:\new2.00.avi").assumetff()
    converttoyv12(source, interlaced=true)
    Tweak(Bright=12,Cont=0.75,Coring=False)
    YLevelsS(0,1.8,255,0,255)
    QTGMC(Preset="slow")
    SelectEven()
    MDegrain2i2(16,2,0) # "source" was remove so MDegrain uses the result of SelectEven()
    stackhorizontal(source,last)
    Since your video is interlaced you will lose half the temporal resolution if you use SelectEven(). Unless you really need 30p video you shouldn't do that (maybe you did it here just to compare frame-by-frame with SelectEven()). If you need 30i for DVD uses SeparateFields().SelectEvery(4,0,3).Weave() instead.
    Quote Quote  
  25. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by jagabo View Post
    Since your video is interlaced you will lose half the temporal resolution if you use SelectEven().
    Not only does it lose temporal resolution (definition), it can also create odd effects during rapid motion:

    frame 42: arm motion distorted instead of blurred:
    Name:  42 - motion distorted A.jpg
Views: 413
Size:  17.8 KB

    frame 59: lower arm disappears into background:
    Name:  59 - hand disappears B.jpg
Views: 363
Size:  16.4 KB

    frame 385: motion distorted:
    Name:  385 - notion distorted C.jpg
Views: 369
Size:  14.8 KB

    frame 387: lower leg disappears:
    Name:  387 - leg disappears D.jpg
Views: 367
Size:  13.7 KB
    - My sister Ann's brother
    Quote Quote  
  26. Originally Posted by LMotlow View Post
    Originally Posted by jagabo View Post
    Since your video is interlaced you will lose half the temporal resolution if you use SelectEven().
    Not only does it lose temporal resolution (definition), it can also create odd effects during rapid motion:...
    Navi, note that SelectEven() didn't cause those distortions. They were either in the source or caused by the other filtering.
    Quote Quote  
  27. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    No, SelectEven() didn't "cause" it (and how do you know, anyway. Care to share your private copy of the original with us?) -- although the filtered sample certainly looks like it's been under the grinding wheel. Those effects are "caused" by the fact that half of the original images and data that defined those motions went down the toilet. Because 25 out of every 50 of the original motion instants are missing, the eye has no information to fill in those missing details. Therefore rapid motion in this video is indistinct and has a horizontal stutter instead of the usual blur. Maybe SelectEven() itself didn't cause it, but using it did. That, I think, is one of the things that "loss of temporal resolution" means when half of an interlaced video is thrown away. Some guys around here can be a hoot sometimes when they nit-pick about refresh rates, but my 60Hz monitors have seen a slew of 25fps and 24fps progressive videos that play with a lot less stutter than I'm seeing here.

    The figures look pasty and unreal, and the scene is washed out. Autogain controls are a curse because (a) they never get it right in the first place, and (b) the user learns nothing about making proper corrections. The brain has a tough time with this scene (that is, if you aren't the typical viewer who's been trained by years of bad video processing and will watch anything that moves), because it's pumped up for bright daylight -- but the eye sends information that says the scene is indoors, with indoor lighting. The eye also knows that there's a strong blue color imbalance. That's really odd for "indoor" video, because indoor scenes have warmer lighting and softer effects than daylight. I don't like watching videos where people have blue skin. It's not convincing, it doesn't look real, it's ugly, and it makes me think that somebody made a mistake. It's a bigger problem here because if you correct for the blue girls on the right and in the middle, the girls on the left turn yellow or orange. This means that either the tape is turning blue on one side, or there was different lighting to the right of the camera and a bright incandescent lamp was at the camera's left above the table in the left corner. If the light to the right was a photo lighting unit, its color temperature didn't match the other lighting in these rooms. It would be possible to get a compromise color balance using various techniques. That's hardly worth the trouble for most viewers, who wouldn't know correct color from a hole in the ground. But zombie skin tones are a turn-off for a lot of people, and the girls are too cute to be looking that way.

    Pumping the scene's gamma for false daylight also revealed all the speckly CMOS noise in the darks, so the video had to go through a double dose of industrial strength denoising that makes it look two dimensional and over smoothed.

    But, what the heck, those are concerns for another forum. As long as the video moves and makes sounds, it's probably OK in the present context. For a first effort it's a good sample. You should see some of the total disasters that less conscientious newcomers have submitted.
    Last edited by LMotlow; 1st Oct 2015 at 02:51.
    - My sister Ann's brother
    Quote Quote  
  28. It appears that MDegrain2i2() is causing the blocky artifacts and disappearing arms -- that gigantic thSAD at the end of MDegrain2().

    Also, the video is no longer interlaced after QTGMC so there's no need for an interlaced denoiser.
    Quote Quote  
  29. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Right-on about that, and I didn't get into specifics about MDegrain2i2. I understand why both denoisers were used. Low light shooting with consumer cameras is full of crappy noise, especially in the darks, and it blows up big-time when you make those shadows too bright. So dropping fields is one thing, but with both denoisers at play you're bound to overdo it. Sometimes a certain amount of noise (with VHS, take "noise" to include detail) is inevitable. If you mask that with some dithering, it's tolerable in the end. Probably better to use a couple of milder smoothers and degrainers instead of two big guys. With low light you also have to accept the fact that the dark stuff is really, really dark and won't look like daylight no matter how bright you make it. So some non-essential details will be lost in the shadows and some nominal noise comes with the territory.

    I worked on the capture from post 18 and tried something less extreme, and it looked more natural that way. But I waited for another sample. It would have been nice to have an unprocessed sample of the original from the results posted in #23 so people could get into more detail about the best ways to handle low light scenes like these. It's one thing to look only at the results and say, well, this doesn't look right, but with the original at hand folks could be more specific about how to make it better.
    - My sister Ann's brother
    Quote Quote  
  30. Member
    Join Date
    Sep 2015
    Location
    valencia
    Search Comp PM
    here is original from the results posted in #23.
    Image Attached Files
    Quote Quote  



Similar Threads