VideoHelp Forum
+ Reply to Thread
Results 1 to 25 of 25
Thread
  1. I have an old tape from an old recorder which didn't exist anymore.
    In one field i have black streaks.
    I can duplicate the "working field" with VirtualDub but it looks very angled and I don't want to deinterlace it actually.
    Is there an other method to fix that?

    Click image for larger version

Name:	black streaks.png
Views:	390
Size:	925.1 KB
ID:	22577
    Quote Quote  
  2. Black "comets" like that can be removed with three caps and a median filter if they appear in different places each time you capture. Also, since the appear in only one field, a head cleaning might help. But I guess you no longer have the tape.

    A filter like RemoveSpots or RemoveSpotsMC in AviSynth can sometimes get rid of them. Can you upload a short sample?
    Quote Quote  
  3. Originally Posted by jagabo View Post
    Black "comets" like that can be removed with three caps and a median filter if they appear in different places each time you capture.
    I have 2 caps (but not from the hole tape) and I'm comparing them in Virtual Dub. I think 50-60% of the "comets" are in both caps.

    Originally Posted by jagabo View Post
    Also, since the appear in only one field, a head cleaning might help. But I guess you no longer have the tape..
    I think the tape is recorded with the comets because this was the only tape which was recorded from the old vhs (might be 25 years old with only Mono Audio) and the only tape which I had this problem.
    I remember that I've tested the tape in an other vhs player some years ago and having the same "comets"problem.

    Originally Posted by jagabo View Post
    A filter like RemoveSpots or RemoveSpotsMC in AviSynth can sometimes get rid of them. Can you upload a short sample?
    I will try that.
    Image Attached Files
    Quote Quote  
  4. RemoveSpots is not working.

    Have you found a resolution with the example clips from the two caps?
    Quote Quote  
  5. I can verify that RemoveSpots doesn't work for those clips. For some reason RemoveSpotsMC() isn't working (crashes) on my computer right now. I'm still playing around with some other options. Since only one field has the problem it shouldn't be too hard to fix. There's another big thread here about dark comets:

    https://forum.videohelp.com/threads/357149-Can-someone-create-a-comet-removal-Avisynth-...ht=dark+comets
    Quote Quote  
  6. Is you whole video like the sample? With the small live picture in the top right and text overlays at the left and bottom? I only saw comets in the text (except for a few times where the tail of the comet reached into live picture).

    A sequence like this helps with the text overlays:

    Code:
    SeparateFields()
    PointResize(width, height*2)
    odd=SelectOdd()
    evn=SelectOdd().DoubleFPS2().SelectOdd().Loop(2,0,0)
    Interleave(evn,odd)
    PointResize(width, height/2)
    Weave()
    That works by substituting the even field with a motion interpolated version of the odd field. It does leave a few artifacts from the motion interpolation. I'd use Overlay() to keep the original live video part of the frame intact.
    Quote Quote  
  7. Sometimes there are comets here (arrows), but 90% of the recordings are like the sample.
    Click image for larger version

Name:	black streaks2.png
Views:	331
Size:	798.7 KB
ID:	22633 Click image for larger version

Name:	black streaks3.png
Views:	287
Size:	618.8 KB
ID:	22634

    Trying your script get an error that he don't know the function named DoubleFPS2 and I can't find the script/plugin for that.
    Quote Quote  
  8. Originally Posted by diginoob View Post
    Trying your script get an error that he don't know the function named DoubleFPS2 and I can't find the script/plugin for that.
    Oops, I was going to give a link to that but forgot:
    https://forum.videohelp.com/threads/329754-Help-deinterlacing-IVTC-ing-VHS-material-con...=1#post2042689
    Quote Quote  
  9. OK, but don't know whyI can't find this post with google...

    Now it worked. The "still standing" texts are angled as I use the dublicate Filed in VirtualDub.
    Click image for larger version

Name:	text.png
Views:	303
Size:	731.4 KB
ID:	22641

    But I think it doesn't go better.

    Is there no opportunity to remove the comets with only 2 clips instead of 3 clips?
    I know, that 50% of the comets are in both clips but I want to try it and decide, which method I'll choose.
    Quote Quote  
  10. Originally Posted by diginoob View Post
    Is there no opportunity to remove the comets with only 2 clips instead of 3 clips?
    I would try using a combination of the median technique along with the motion interpolation technique.

    v1 = field from video 1
    v2 = field from video 2
    v3 = motion interpolated field from v1 or v2 (as in my earlier script)
    MedianOf3(v1, v2, v3)
    Quote Quote  
  11. Mh. So its like that?
    v1=(avisource("one.avi").assumetff)
    v2=(avisource("two.avi").assumetff)
    v3=(avisource("script1.avi").assumetff)
    MedianOf3(v1, v2, v3)
    Don't know MedianOf3 script?
    Quote Quote  
  12. The median scripts were originally called Median1() and Median2():

    https://forum.videohelp.com/threads/340963-Best-quality-and-speed-video-denoisers-2011?...=1#post2122313

    I changed the names to the more descriptive MedianOf3() and MedianOf5() when I copied the scripts. I'll see if I can come up with a full script for you later.

    With two captures you could simply blend the two together. That would lighten the comets that are unique, making them less apparent. Merge(v1,v2).

    Something else one could try is to build alpha masks based on edge detection and brightness. Then use those as to protect the rest of the image when you Overlay a less-than-perfectly-fixed version of the video. I'll see if I can come up with something for that too.
    Quote Quote  
  13. Here's what I've come up with using masks:


    Code:
    s1=Mpeg2Source("D:\Downloads\_One.d2v")
    
    # build a mask
    SeparateFields(s1)
    SelectEven()
    edges=mt_edge(mode="0 1 0 0 -2 0 0 1 0", thy1=2, thy2=2).mt_inpand() # find horizontal edges
    dark=mt_binarize(threshold=80, upper=true) # find darkish areas
    Overlay(edges, dark, mode="multiply") # edges AND dark (sort of)
    mask=ColorYUV(cont_u=-256, cont_v=-256) # greyscale
    
    # build a "clean" field by motion interpolating the other fields.
    interp=Bob(s1).SelectOdd().DoubleFPS2().SelectOdd().Loop(2,0,0).BilinearResize(s1.width, s1.height/2)
    
    # overlay even fields with the clean video via the mask
    SeparateFields(s1) # separate the fields
    odd=SelectOdd() # remember the odd fields
    evn=Overlay(SelectEven(), interp, mask=mask) # overlay even fields with the cleaned video via the mask
    Interleave(evn,odd) # evn and odd back to one stream
    Weave() # weave them back into interlaced frames
    StackHorizontal(s1, last) #compare original and cleaned video side by side
    It cleans most of the horizontal lines but generates a few artifacts. You'll need mt_masktools.
    Quote Quote  
  14. This is strange. Load your script but the comets are there anyway.
    Theres no defference between the original.
    Last edited by diginoob; 9th Jan 2014 at 12:33.
    Quote Quote  
  15. The last line of the script displays the original video on the left, the cleaned video on the right. Make sure you've viewing the entire frame (1440x576).
    Quote Quote  
  16. Yes, I rendered the few seconds of the video and I get a "side by side" video. But so different between left and right picture.
    Click image for larger version

Name:	no effect.png
Views:	217
Size:	954.1 KB
ID:	22656
    Quote Quote  
  17. Here's the same frame on my computer:
    Click image for larger version

Name:	same.png
Views:	212
Size:	966.7 KB
ID:	22659
    Quote Quote  
  18. Looks good!
    But don't know, why it's not working on my computer.
    Does it work with (interlaced) avi too?
    Quote Quote  
  19. Maybe you have different version of mt_masktools? Look at edges, dark, and mask. From frame 127:

    edges:
    Click image for larger version

Name:	edges.png
Views:	316
Size:	10.1 KB
ID:	22669

    dark:
    Click image for larger version

Name:	dark.png
Views:	288
Size:	8.1 KB
ID:	22670

    mask:
    Click image for larger version

Name:	mask.png
Views:	252
Size:	6.1 KB
ID:	22671

    Slightly modified script:
    Code:
    s1=Mpeg2Source("D:\Downloads\_One.d2v")
    
    # build a mask
    SeparateFields(s1)
    SelectEven()
    edges=mt_edge(mode="0 1 0 0 -2 0 0 1 0", thy1=2, thy2=2).mt_inpand().ColorYUV(cont_u=-256, cont_v=-256) # find horizontal edges
    dark=mt_binarize(threshold=80, upper=true).ColorYUV(cont_u=-256, cont_v=-256) # find darkish areas
    Overlay(edges, dark, mode="multiply") # edges AND dark (sort of)
    mask=ColorYUV(cont_u=-256, cont_v=-256) # greyscale
    
    return(mask) # or edges, or dark
    
    # build a "clean" field by motion interpolating the other fields.
    interp=Bob(s1).SelectOdd().DoubleFPS2().SelectOdd().Loop(2,0,0).BilinearResize(s1.width, s1.height/2)
    
    # overlay even fields with the clean video via the mask
    SeparateFields(s1) # separate the fields
    odd=SelectOdd() # remember the odd fields
    evn=Overlay(SelectEven(), interp, mask=mask) # overlay even fields with the cleaned video via the mask
    Interleave(evn,odd) # evn and odd back to one stream
    Weave() # weave them back into interlaced frames
    StackHorizontal(s1, last) #compare original and cleaned video side by side
    Replace return(mask) with return(edges) or return(dark) to see each individual mask.
    Quote Quote  
  20. I see no mask. It's strange.
    Can you put your mt_masktools plugin in a zip and upload it? So then we can see if it's the plugin problem.
    Quote Quote  
  21. So mask was all black? What about edges and dark? Here's the version of mt_masktools.dll I'm using.
    Image Attached Files
    Quote Quote  
  22. OK, but don't work again.
    The mask don't work on each frame. It's black and in some frames I see a mask. Very confusing.
    Here the return(mask) video. (Take Xvid for smaller videofile)
    Image Attached Files
    Quote Quote  
  23. Look at edges and dark. Do they look like the images I posted?
    Quote Quote  
  24. I forgot there's a filter called DePulse() that is designed to remove comets like this. DePulse(l=80,d=10) worked fairly well. I'm sure you can further tune it for your video.
    Quote Quote  
  25. DePulse work but not 100%.
    Think the easiest way is to deinterlace it.
    thanks for your help.
    Quote Quote  



Similar Threads

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