VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 45
Thread
  1. I have some "jumping frames" like this.

    Click image for larger version

Name:	jump.jpg
Views:	182
Size:	116.1 KB
ID:	46406

    Correct this with following script:

    avisource("Jumptest.avi").assumetff
    separatefields()
    e = selectodd()
    o = selecteven().crop(0,1,0,0).addborders(0,0,0,1)
    interleave(e, o)
    weave
    cropbottom(2).addborders(0,2,0,0)


    The result:

    Click image for larger version

Name:	Cleaned.jpg
Views:	173
Size:	109.3 KB
ID:	46407

    Convert it to a 25p file, everything is OK. When you move the mouse on screenshot, the next deinterlaced frame (wich is neddn't to fix) is shown.
    Nothing jumps or have artefacts.

    http://screenshotcomparison.com/comparison/118029

    But when I use QTGMC to make a 50p file, theres something strange.
    Here you can see the two fields from the one fixed frame.
    It's jumping/glitching or so.

    http://screenshotcomparison.com/comparison/118030

    OK, it's a small issue, but I have more than one "jump" in one second sometimes and it looks very glitchy then.

    Why is this happen when I convert to 50p but deinterlacing is OK.

    Hope someone can help me. With this issue i won't go on with digitized.
    I think the picturequality is very good (see horrible other qualitys here in the forum), so I want the best result and I want a good 50p file

    PS: Don't look at the other improvement issues in this testfile clip
    Image Attached Files
    Quote Quote  
  2. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    I think that similar jumps are in file you uploaded. Do you capture throught VHS or directly from TV? I think this jumps are caused by VHS.
    Simply I think that jumps are parts of original video. If you open video, that you uploaded in VD, check frames 18,19 and 20. Just not so noticable, but there is a jump.


    Bernix
    Quote Quote  
  3. AviSource("Jumptest.avi")
    AssumeTFF()
    ConvertToYV12(interlaced=true)
    QTGMC()
    Stab(range=3, dxmax=2, dymax=2)
    Quote Quote  
  4. I looked at testfile.avi and agree with Bernix: this looks like a capture problem. A TBC would probably stop it from happening.
    Quote Quote  
  5. Yes, it's obviously a capture problem. The bouncing fields are a very common capture issue. If you want to locate all the bad frames manually and fix them:

    Code:
    AviSource("testfile.avi") 
    AssumeTFF()
    src=last
    
    Crop(0,0,-0,-1)
    AddBorders(0,1,0,0)
    SwapFields()
    ReplaceFramesSimple(src, last, mappings="19")
    
    ConvertToYV12(interlaced=true)
    QTGMC()
    
    #if you want to replace the missing field that caused the bounce:
    ReplaceFramesMC(39)
    Last edited by jagabo; 8th Aug 2018 at 10:25.
    Quote Quote  
  6. With your first script I get little jumps when QTGMC is activate also.

    Originally Posted by jagabo View Post
    AviSource("Jumptest.avi")
    AssumeTFF()
    ConvertToYV12(interlaced=true)
    QTGMC()
    Stab(range=3, dxmax=2, dymax=2)
    It's difficult (for me) to demonstrate the problem.

    Open each picture in one tab so you can switch quickly between them or download and switch with your programm and see the problem.

    The 50p looks like so:

    The second field frame before the issue frame (Or the "reference Frame", or frame 37):
    Click image for larger version

Name:	Script1_reference_frame.jpeg
Views:	107
Size:	218.5 KB
ID:	46415

    The First Field from the issue frame (Frame 38):
    Click image for larger version

Name:	Script1_First_frame_issue.jpeg
Views:	114
Size:	219.2 KB
ID:	46417

    The Second Field from the issue frame (Frame 39):
    Click image for larger version

Name:	Script1_Second_frame_issue.jpeg
Views:	111
Size:	221.4 KB
ID:	46416

    See it's jumping also a little bit (see at the numbers).


    The second Script WITHOUT the ReplaceFramesMC(39) (With this in the script is not working) I get gltiches at the moving text crawls (best see in the red / white ones)

    [QUOTE=jagabo;2526356]
    Code:
    AviSource("testfile.avi") 
    AssumeTFF()
    src=last
    
    Crop(0,0,-0,-1)
    AddBorders(0,1,0,0)
    SwapFields()
    ReplaceFramesSimple(src, last, mappings="19")
    
    ConvertToYV12(interlaced=true)
    QTGMC()
    Reference Frame (Frame 37):
    Click image for larger version

Name:	Script2_referecne.jpeg
Views:	106
Size:	215.3 KB
ID:	46418

    The First Field from the issue frame (Frame 38):
    Click image for larger version

Name:	Script2_first frame issue.jpeg
Views:	107
Size:	215.4 KB
ID:	46419

    The Second Field from the issue frame (Frame 39):
    Click image for larger version

Name:	Script2_second frame issue.jpeg
Views:	121
Size:	215.5 KB
ID:	46420

    It's not perfect, but close.

    I hope you guys understand what I mean.
    Please ask, when you don't understand something.
    Quote Quote  
  7. Jagabo had 99% of the problem solved, but since the problem only affects one field, it has to be done on a field basis.

    For this one clip, this variation of Jagabo's script seems to work perfectly:

    Code:
    AVISource("E:\Documents\Dnload\UNPACK\testfile.avi")
    assumeTFF()
    bob(0.0,1.0)
    src=last
    Crop(0,0,-0,-2)
    AddBorders(0,2,0,0)
    SwapFields()
    ReplaceFramesSimple(src, last, mappings="39")
    separatefields().selectevery(4,1,2).weave()
    
    #Uncomment one (not both) of the following to check your work
    #return src
    #bob(0.0,1.0)
    Last edited by johnmeyer; 8th Aug 2018 at 14:18. Reason: clarity
    Quote Quote  
  8. Is this your results, too?
    Looks not so good.
    Or what did i wrong?

    Result

    PS: I get Timeout when I upload it on internally page.
    Quote Quote  
  9. Originally Posted by diginoob View Post
    The second Script WITHOUT the ReplaceFramesMC(39) (With this in the script is not working) I get gltiches at the moving text crawls (best see in the red / white ones)
    Oops. I was using a screen magnifier and watching the white text on blue at the bottom of the frame -- so I could see the frame numbers (in VirtualDub) along with the video. So I didn't notice the screwed up white text on red at the top of the frame.

    Originally Posted by johnmeyer View Post
    Jagabo had 99% of the problem solved, but since the problem only affects one field, it has to be done on a field basis.

    For this one clip, this variation of Jagabo's script seems to work perfectly:

    Code:
    AVISource("E:\Documents\Dnload\UNPACK\testfile.avi")
    assumeTFF()
    bob(0.0,1.0)
    src=last
    Crop(0,0,-0,-2)
    AddBorders(0,2,0,0)
    SwapFields()
    ReplaceFramesSimple(src, last, mappings="39")
    separatefields().selectevery(4,1,2).weave()
    
    #Uncomment one (not both) of the following to check your work
    #return src
    #bob(0.0,1.0)
    Yes, that looks better. Another variation:

    Code:
    AviSource("testfile.avi") 
    AssumeTFF()
    
    SeparateFields()
    e = SelectEven()
    o = SelectOdd()
    o2 = o.Crop(0,0,-0,-1) # the odd fields shifted down by one scan line (2 lines of the original interlaced frame)
    o = ReplaceFramesSimple(o, o2, mappings="19") # fix only the one bad field
    Interleave(e,o)
    Weave()
    
    ConvertToYV12(interlaced=true)
    QTGMC()
    Quote Quote  
  10. Originally Posted by jagabo View Post
    Originally Posted by johnmeyer View Post
    Jagabo had 99% of the problem solved, but since the problem only affects one field, it has to be done on a field basis.

    For this one clip, this variation of Jagabo's script seems to work perfectly:

    Code:
    AVISource("E:\Documents\Dnload\UNPACK\testfile.avi")
    assumeTFF()
    bob(0.0,1.0)
    src=last
    Crop(0,0,-0,-2)
    AddBorders(0,2,0,0)
    SwapFields()
    ReplaceFramesSimple(src, last, mappings="39")
    separatefields().selectevery(4,1,2).weave()
    
    #Uncomment one (not both) of the following to check your work
    #return src
    #bob(0.0,1.0)
    Yes, that looks better.
    That looks very bad for me. (see my result at download-link in my upper post)

    Is your result with this script another? What do i wrong?

    Originally Posted by jagabo View Post
    Another variation:

    Code:
    AviSource("testfile.avi") 
    AssumeTFF()
    
    SeparateFields()
    e = SelectEven()
    o = SelectOdd()
    o2 = o.Crop(0,0,-0,-1) # the odd fields shifted down by one scan line (2 lines of the original interlaced frame)
    o = ReplaceFramesSimple(o, o2, mappings="19") # fix only the one bad field
    Interleave(e,o)
    Weave()
    
    ConvertToYV12(interlaced=true)
    QTGMC()
    That's (for me) the first script that looks like works fine.
    Go sleep now, give a answer tomorrow...

    Thanks until then.
    Quote Quote  
  11. johnmeyer selected the wrong fields to weave together at the end. That lead to a lot of blurring. Change selectevery(4,1,2) to selectevery(4,0,3) and it will look almost exactly like my last script.
    Quote Quote  
  12. Originally Posted by jagabo View Post
    johnmeyer selected the wrong fields to weave together at the end. That lead to a lot of blurring. Change selectevery(4,1,2) to selectevery(4,0,3) and it will look almost exactly like my last script.
    Oops, my bad. I almost always remember to check which of the two selectevery() statements to use. If you use the wrong one, you get field reversal. I don't know why I didn't spot that. Thanks jababo for correcting my mistake.

    Just to make sure everything is OK, I made Jagabo's suggested (4,0,3) change to the script I posted. I then temporarily added this test code to the very end of the script, in order to check the results:

    Code:
    bob(0.0,1.0)
    return Interleave(
    \    src
    \  , last
    \ )
    This lets me walk through the finished video field-by-field and compare a field in the original source with the same field in the final output. Only the one field that is shifted looked different. The rest were perfectly identical. If the results of this script look blurry or bad, then the OP is doing something different than I am.
    Quote Quote  
  13. I like to use something like this to compare:

    Code:
    return(Subtract(original.SeparateFields(), last.SeparateFields()).Levels(120,1,136,0,255))
    Even tiny differences become very obvious.
    Quote Quote  
  14. Originally Posted by jagabo View Post
    I like to use something like this to compare:

    Code:
    return(Subtract(original.SeparateFields(), last.SeparateFields()).Levels(120,1,136,0,255))
    Even tiny differences become very obvious.
    Nice tip. I'll be using that one.
    Quote Quote  
  15. You don't even need the SeparateFields(). I used them here to make it obvious only one field of a single frame was changed.
    Quote Quote  
  16. Originally Posted by jagabo View Post
    You don't even need the SeparateFields(). I used them here to make it obvious only one field of a single frame was changed.
    NOW you tell me! I hate to admit it, but I spent four minutes trying to figure out what was going on until I realized I was applying SeperateFields() to video that had already been bobbed. It got it figure out, and you are right that this trick from the AVISynth documentation really does work. I don't know how I overlooked it all these years.
    Quote Quote  
  17. Originally Posted by johnmeyer View Post
    this trick from the AVISynth documentation
    I didn't know it was in the docs (I see now it's in the Subtract section). I first saw it here many years ago where someone compared two clips with the clips stacked side by side, and below them the subtracted clips, and the levels stretched subtracted clips. Something like this:

    Code:
      #
      # given two clips, v1 and v2:
      #
      sub = v1.subtract(v2)
      substrong = sub.levels(112,1,144,0,255)
      StackVertical(StackHorizontal(v1, v2), StackHorizontal(sub, substrong))
    Quote Quote  
  18. Originally Posted by jagabo View Post
    o = ReplaceFramesSimple(o, o2, mappings="19") # fix only the one bad field
    What I have to do , when I want the script working on all frames of the video?
    Kill this line complete from the script?

    Ok guys, I think I can get 90% from the jumps repaired with this script.
    But I found some other more "jumping variations" (and there are still more I think)
    Image Attached Files
    Last edited by diginoob; 9th Aug 2018 at 06:55.
    Quote Quote  
  19. I just noticed there's a big bug in my script in post #9. After cropping the field I forgot to AddBorders to restore the field height. So instead of:

    Code:
    o2 = o.Crop(0,0,-0,-1)
    it should have been:

    Code:
    o2 = o.Crop(0,0,-0,-1).AddBorders(0,1,0,0)
    I'm surprised that the code worked!

    Originally Posted by diginoob View Post
    I found some other more "jumping variations"
    What you really need to do is fix your capture process so these jumps don't happen. Your capture device is skipping the first line of some fields -- so the remaining lines are shifted up. Time base correction will probably eliminate that.

    The above bug gave me an idea, instead of crop/addborders, use overlay. That way the original top scanline is left intact and you don't get a bouncing black border. And it's not really necessary to separate even and odd fields into separate streams and later interleave them. For jump_01.avi and jump_02.avi:

    Code:
    AviSource("jump_01.avi")+AviSource("jump_02.avi")
    AssumeTFF()
    
    SeparateFields()
    
    f_down = Overlay(last, last, y=1).Subtitle("f_down")
    
    ReplaceFramesSimple(last, f_down, mappings="3 8")
    
    Weave()
    I subtitled the shifted fields to it's easy to see which fields were replaced. You would remove that code for production.

    jump_03.avi is only two frames long. I need more than that to figure out exactly what's wrong.
    Quote Quote  
  20. A TBC probably will do it, but I don't want to spent more money to this project.

    Want to kill most of the jumping fields and done.

    Another broken field, here you can't see it jumping when you look at the interlaced frame, but after 50p QTGMC you will.
    Image Attached Files
    Quote Quote  
  21. The bounce in jump_04.avi is caused by QTGMC getting confused by the upper part of the picture. There's nothing wrong with the cap. You can verify this with:

    [CODE]AviSource("jump_04.avi")
    ConvertToYV12(interlaced=true)
    StackVertical(QTGMC(), Crop(0,420,-0,-0).QTGMC())[CODE]
    Quote Quote  
  22. The bounce in jump_04.avi is caused by QTGMC getting confused by the upper part of the picture. There's nothing wrong with the cap. You can verify this with:

    Code:
    AviSource("jump_04.avi")
    ConvertToYV12(interlaced=true)
    StackVertical(QTGMC(), Crop(0,420,-0,-0).QTGMC())
    Last edited by jagabo; 9th Aug 2018 at 16:41.
    Quote Quote  
  23. Sorry, but check the script again. There's something not right a bit

    Click image for larger version

Name:	mistake.jpeg
Views:	126
Size:	293.5 KB
ID:	46436
    Quote Quote  
  24. The script is showing exactly what I meant it to show.
    Quote Quote  
  25. I don't understand exactly.
    The bottom, smaller part looks fixed.
    Quote Quote  
  26. The point was that there's nothing wrong with the source video. QTGMC just messes up when deinterlacing the full frame (the top ~3/4 of the output video). If you just deinterlace just the bottom part of the frame in isolation (the bottom ~1/4 of the output video) the text doesn't bounce.
    Quote Quote  
  27. OK I understand.
    But why is QTGMC doing this? There must be any reason for ths problem...
    Just now I found an other Deinterlacer: TDeint

    Code:
    Assumetff()
    TDeint(mode=1)
    And I'm happy. No little juming issues with TDeint.
    http://screenshotcomparison.com/comparison/118180

    But wait, what's that? TDeint make other glitchy things.
    http://screenshotcomparison.com/comparison/118181

    The Deinterlacer from Tom Barry isn't a good choice, too.
    http://avisynth.nl/index.php/TomsMoComp

    Guys, I'm so confused / hopeless / little bit angry / it's killing me.
    I think it's easier to build a house or a car than deinterlace a video glitchless

    I'm still open for suggestions
    Last edited by diginoob; 10th Aug 2018 at 04:35.
    Quote Quote  
  28. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    have you tried Yadif with bob and temporal and spatial check on? It is considered as good deinterlacer also I think


    Edit: in jump_04.avi you posted Yadif do not create jump.



    Bernix
    Last edited by Bernix; 10th Aug 2018 at 06:21. Reason: Edit
    Quote Quote  
  29. Originally Posted by diginoob View Post
    Just now I found an other Deinterlacer: TDeint

    Code:
    Assumetff()
    TDeint(mode=1)
    And I'm happy. No little juming issues with TDeint.
    http://screenshotcomparison.com/comparison/118180

    But wait, what's that? TDeint make other glitchy things.
    http://screenshotcomparison.com/comparison/118181

    The Deinterlacer from Tom Barry isn't a good choice, too.
    http://avisynth.nl/index.php/TomsMoComp

    Guys, I'm so confused / hopeless / little bit angry / it's killing me.
    I think it's easier to build a house or a car than deinterlace a video glitchless
    Your problem with TDeint is that you need to ConvertedToYV12(interlaced=true) before calling it. But...

    There's no such thing as a perfect deinterlacer and there never will be. It's not possible to perfectly restore missing scan lines. For most material QTGMC is far better than any the others. Yadif is a distant second. It leaves little bits of crap all over the place. And buzzing, aliased edges.
    Last edited by jagabo; 10th Aug 2018 at 06:56.
    Quote Quote  
  30. Originally Posted by jagabo View Post
    Your problem with TDeint is that you need to ConvertedToYV12(interlaced=true) before calling it.
    And this makes the line artefacts?

    Yadif does make only 25p, right?
    Last edited by diginoob; 10th Aug 2018 at 07:14.
    Quote Quote  



Similar Threads

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