VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. Hello,

    Need help writing a script - say I only want to deinterlace 2-4 specific lines, is there a way to do this?
    Quote Quote  
  2. Yes. Crop everything away from those 4 lines and run them through a deinterlacer. Let's call that clip A. Then create a clip B where you only crop away those 4 lines, i.e. you get all other lines. Then StackVertical() clip A and B to make a combined clip. If the lines are not at the very top or bottom you need three clips. Beware that there are limits on cropping interlaced content depending on colorspace (mod4 should be safe) and that the resulting fps should be the same. You'd probably use singe-rate interlacing.

    Without a sample of your clip it is difficult to give good advice. Never saw it necessary to deinterlace only 4 lines.
    Quote Quote  
  3. Here's one way (assuming I understand what you're asking):

    Deint=(Deinterlacer here)
    Deint=Deint.Crop(0,200,0,-200)###Crop down to place needing deinterlacing
    Overlay(Last,Deint,0,200)
    Quote Quote  
  4. https://drive.google.com/open?id=0B8es6v9TRPiOakh4YlFZS3RsSXc

    I have a recurring line through the captures inserted by the VCR in the same place - I was thinking I could potentially deinterlace it out. When I tried Bob or Weave (don't remember) it disappeared, but I don't want to deinterlace the entire video if it isn't necessary. Would those methods fit the bill?

    Thanks for the help!
    Last edited by premiumcapture; 11th Sep 2016 at 20:40.
    Quote Quote  
  5. There's a zillion places you could have uploaded it (including here) and you chose DigitalFAQ? I don't remember my name and password there.
    Quote Quote  
  6. My mistake, it had already been uploaded so I thought it was shareable but was wrong. Below is Google Drive. I also updated the prior link as well.

    https://drive.google.com/open?id=0B8es6v9TRPiOakh4YlFZS3RsSXc

    Originally Posted by manono View Post
    There's a zillion places you could have uploaded it (including here) and you chose DigitalFAQ? I don't remember my name and password there.
    Quote Quote  
  7. It's not just a few lines that show comb artifacts. It's normal telecined film -- two out of every five frames has comb artifacts. Just use TFM() and TDecimate():

    Code:
    AviSource("Line noise.avi") 
    TFM()
    TDecimate()
    That will leave you with 23.976 fps progressive.
    Quote Quote  
  8. Thanks, though I realize I was not being specific enough:
    Click image for larger version

Name:	line noise.jpg
Views:	432
Size:	417.5 KB
ID:	38538

    I tried to highlight it the best I could but it's so high in the image it may be hard to see - it's like the second or third line down. The issue is not so much the interlacing but the colored lined that shows up at the top of the image, which is consistent through any SP played tape. Watching the video it is visible throughout. I figured I could use hard deinterlacing to get rid of the issue itself unless there's a better solution.

    Thanks for the help so far.

    Originally Posted by jagabo View Post
    It's not just a few lines that show comb artifacts. It's normal telecined film -- two out of every five frames has comb artifacts. Just use TFM() and TDecimate():

    Code:
    AviSource("Line noise.avi") 
    TFM()
    TDecimate()
    That will leave you with 23.976 fps progressive.
    Quote Quote  
  9. Copy chroma from line 1 over line 2 after TFM and TDecimate:

    Code:
    AviSource("C:\Users\John\Desktop\Line noise.avi") 
    TFM()
    TDecimate()
    line=Crop(0,1,-0,1)
    Overlay(last, line, mode="chroma", x=0, y=2)
    You could do something similar at the bottom:

    Code:
    bot=Crop(0,height-12,-0,6).FlipVertical()
    Overlay(last, bot, mode="chroma", x=0, y=height-6)
    Last edited by jagabo; 12th Sep 2016 at 08:15.
    Quote Quote  
  10. I had to install TFM to get it going but it worked like magic Thank you!

    Originally Posted by jagabo View Post
    Copy chroma from line 1 over line 2 after TFM and TDecimate:

    Code:
    AviSource("C:\Users\John\Desktop\Line noise.avi") 
    TFM()
    TDecimate()
    line=Crop(0,1,-0,1)
    Overlay(last, line, mode="chroma", x=0, y=2)
    You could do something similar at the bottom:

    Code:
    bot=Crop(0,height-12,-0,6).FlipVertical()
    Overlay(last, bot, mode="chroma", x=0, y=height-6)
    Quote Quote  
  11. You could get slightly better results by using the average chroma of lines 1 and 3 to replace line 2:

    Code:
    line1 = Crop(0,1,-0,1)
    line3 = Crop(0,3,-0,1)
    line2 = Merge(line1, line3)
    Overlay(last, line2, mode="chroma", x=0, y=2)
    Quote Quote  
  12. Originally Posted by jagabo View Post
    You could get slightly better results by using the average chroma of lines 1 and 3 to replace line 2:

    Code:
    line1 = Crop(0,1,-0,1)
    line3 = Crop(0,3,-0,1)
    line2 = Merge(line1, line3)
    Overlay(last, line2, mode="chroma", x=0, y=2)
    I will try it out. Thanks for the advice.

    As a follow up, how would I alter the script for straight 60i sources? Would I just remove the portions that detelecine or does something else need to replace it?

    Also, if I get some vertical jitter and the frame gets shifted up for a frame or so, would I be required to split the source into sections and apply seperately and then rejoin?

    Thanks again!
    Quote Quote  
  13. Originally Posted by premiumcapture View Post
    As a follow up, how would I alter the script for straight 60i sources? Would I just remove the portions that detelecine or does something else need to replace it?
    You would remove the TFM().TDecimate(), then copy the chroma from two lines above or two lines below. Or interpolate between two lines above and two lines below. That is, the copied chroma should come from the same field.

    Originally Posted by premiumcapture View Post
    Also, if I get some vertical jitter and the frame gets shifted up for a frame or so, would I be required to split the source into sections and apply seperately and then rejoin?
    Yes. Or you could create two versions of the video one with one line patched, one with the other line patched. Then use ReplaceFramesSimple() to manually specify which of the two patched versions are used when. Or you might just always patch both lines. It won't be very noticeable.

    A more ambitious method would be to use the runtime functions to select the frames automatically based on the chroma values of the bad line. But that might run into problems if the normal frames start having greens and purples (the "bad" colors in line 2) there.
    Quote Quote  
  14. Originally Posted by jagabo View Post
    Originally Posted by premiumcapture View Post
    As a follow up, how would I alter the script for straight 60i sources? Would I just remove the portions that detelecine or does something else need to replace it?
    You would remove the TFM().TDecimate(), then copy the chroma from two lines above or two lines below. Or interpolate between two lines above and two lines below. That is, the copied chroma should come from the same field.
    That makes a lot of sense. Since this is interlaced and the issue is on line 2 most of the time, what would I do to copy 2 above? Should I try to average 1 and 4 or would that get messy?

    Originally Posted by jagabo View Post
    Originally Posted by premiumcapture View Post
    Also, if I get some vertical jitter and the frame gets shifted up for a frame or so, would I be required to split the source into sections and apply seperately and then rejoin?
    Yes. Or you could create two versions of the video one with one line patched, one with the other line patched. Then use ReplaceFramesSimple() to manually specify which of the two patched versions are used when. Or you might just always patch both lines. It won't be very noticeable.

    A more ambitious method would be to use the runtime functions to select the frames automatically based on the chroma values of the bad line. But that might run into problems if the normal frames start having greens and purples (the "bad" colors in line 2) there.
    I will check it out - ReplaceFramesSimple() looks like the most straightforward way to go with a clean source.
    Quote Quote  
  15. Originally Posted by premiumcapture View Post
    Originally Posted by jagabo View Post
    Originally Posted by premiumcapture View Post
    As a follow up, how would I alter the script for straight 60i sources? Would I just remove the portions that detelecine or does something else need to replace it?
    You would remove the TFM().TDecimate(), then copy the chroma from two lines above or two lines below. Or interpolate between two lines above and two lines below. That is, the copied chroma should come from the same field.
    That makes a lot of sense. Since this is interlaced and the issue is on line 2 most of the time, what would I do to copy 2 above? Should I try to average 1 and 4 or would that get messy?
    Line numbers start at zero. So you could copy the chroma from line 0 to line 2, or from line 4 to line 2, or average the chroma from lines 0 and 4 to replace the chroma of line 2.
    Quote Quote  



Similar Threads

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