VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    I have this 16:9 video shot with a Digital8 cam. For some reason it has a 30 pixel border around it. It was shot years ago and has been sitting on an archive hard drive and I have no recollection of how or why it got that way. It definitely didn't come out of the camera that way. What I want to do is get rid of the border and end up with properly sized, properly interlaced 16:9 720x480 video in as few steps as possible. I find that just cropping 30 pixels off all around screws up the interlacing and I end up with a mess.

    What do you suggest?

    Thanks for all input.

    Click image for larger version

Name:	border_frame.jpg
Views:	399
Size:	143.7 KB
ID:	22986
    Image Attached Files
    Last edited by brassplyer; 23rd Jan 2014 at 23:37.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    How about something like this? There are probably some other methods, should be interesting to see any variations.

    Load_Stdcall_plugin("F:\Program Files\AviSynth 2.5\plugins\ConditionalSmoothBob\yadif.dll")
    directshowsource("I:\itemp\#i misc\3secborder.avi")
    yadif(mode=1,order=0)
    #
    crop(28,28,-28,-28)
    lanczosresize(720,480)
    separatefields().selectevery(4,1,2)
    weave()
    Quote Quote  
  3. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by davexnet View Post
    How about something like this? There are probably some other methods, should be interesting to see any variations.

    Load_Stdcall_plugin("F:\Program Files\AviSynth 2.5\plugins\ConditionalSmoothBob\yadif.dll")
    directshowsource("I:\itemp\#i misc\3secborder.avi")
    yadif(mode=1,order=0)
    #
    crop(28,28,-28,-28)
    lanczosresize(720,480)
    separatefields().selectevery(4,1,2)
    weave()
    Where do you find ConditionalSmoothBob?
    Quote Quote  
  4. Originally Posted by brassplyer View Post
    Where do you find ConditionalSmoothBob?
    That's a folder name. It's Yadif he's using to Bob before cropping and resizing, and then finally reinterlacing.

    Keep an eye on the field order.
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Or this variation - skips the Bob, probably much faster.

    directshowsource("I:\itemp\#i misc\3secborder.avi")
    separatefields()
    crop(28,14,-28,-14). lanczosresize(720,240).weave()

    Here is ConditionalSmoothBob in case you couldn't find it.
    Image Attached Files
    Last edited by davexnet; 24th Jan 2014 at 07:13.
    Quote Quote  
  6. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by manono View Post
    Originally Posted by brassplyer View Post
    Where do you find ConditionalSmoothBob?
    That's a folder name. It's Yadif he's using to Bob before cropping and resizing, and then finally reinterlacing.

    Keep an eye on the field order.
    I modified it and am using QTGMC instead. His reinterlace config didn't work right - I believe (4,1,2) sets it to TFF? I used this modification of his script. I cropped 32 pixels instead of 28 since I don't want that slight border at the edges. I can live with 2 fewer pixels. Apparently it needs to be multiples of 4 to work correctly.

    He definitely pointed me in the right direction though.

    What I'm going to do is deinterlace/crop first, hit that file with Neatvideo and possibly Thalin Deshaker, then do the reinterlace in a separate step.

    SetMTMode(3,4)
    directshowsource("W:\sourcevid.avi")
    ConvertToYV12
    SetMTMode(2)
    QTGMC(preset="slow")
    crop(32,32,-32,-32)
    lanczosresize(720,480)
    separatefields().selectevery(4,0,3)
    weave()
    Quote Quote  
  7. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by davexnet View Post
    Or this variation - skips the Bob, probably much faster.

    directshowsource("I:\itemp\#i misc\3secborder.avi")
    separatefields()
    crop(28,14,-28,-14). lanczosresize(720,240).weave()
    You shouldn't do interlaced resizing just by separating fields - the fields end up slightly misaligned. Sometimes visible, sometimes not - depends entirely on the relationship between the original and final vertical height. Not worth taking the chance.
    Quote Quote  
  8. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by brassplyer View Post
    I modified it and am using QTGMC instead.
    much better.

    What I'm going to do is deinterlace/crop first, hit that file with Neatvideo and possibly Thalin Deshaker, then do the reinterlace in a separate step.
    If you weren't doing other processing, I was going to suggest just putting up with the borders. Even with correct deinterlacing, it'll look worse after you've cropped+expanded it. But with other processing to do as well, you might as well remove the borders at the same time.


    separatefields().selectevery(4,0,3).weave()
    If you put assumetff() before this, you get TFF. If you put assumebff() before this, you get BFF. If you put neither, you get whatever AVIsynth thinks is right at that point in the script, which is not something you should rely on.



    Cheers,
    David.
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by 2Bdecided View Post
    Originally Posted by davexnet View Post
    Or this variation - skips the Bob, probably much faster.

    directshowsource("I:\itemp\#i misc\3secborder.avi")
    separatefields()
    crop(28,14,-28,-14). lanczosresize(720,240).weave()
    You shouldn't do interlaced resizing just by separating fields - the fields end up slightly misaligned. Sometimes visible, sometimes not - depends entirely on the relationship between the original and final vertical height. Not worth taking the chance.
    Thanks for the info. Shame it wasn't reliable, would be so much quicker.
    Is the misalignment vertical? Something to do with line bounce?
    Quote Quote  
  10. Originally Posted by davexnet View Post
    Originally Posted by 2Bdecided View Post
    Originally Posted by davexnet View Post
    Or this variation - skips the Bob, probably much faster.

    directshowsource("I:\itemp\#i misc\3secborder.avi")
    separatefields()
    crop(28,14,-28,-14). lanczosresize(720,240).weave()
    You shouldn't do interlaced resizing just by separating fields - the fields end up slightly misaligned. Sometimes visible, sometimes not - depends entirely on the relationship between the original and final vertical height. Not worth taking the chance.
    Thanks for the info. Shame it wasn't reliable, would be so much quicker.
    Is the misalignment vertical? Something to do with line bounce?
    You see the problem easily using sharp horizontal edges or lines.

    I can't seem to embed images?

    orig.png is the source image:

    sep.png:
    Code:
    crop(32,32,-32,-32)
    separatefields()
    lanczosresize(720,240)
    weave()
    qtgmc.png:
    Code:
    crop(32,32,-32,-32)
    QTGMC()
    lanczosresize(720,480)
    separatefields()
    selectevery(4,0,3)
    weave()
    Image Attached Thumbnails Click image for larger version

Name:	orig.png
Views:	263
Size:	2.0 KB
ID:	23053  

    Click image for larger version

Name:	sep.png
Views:	267
Size:	9.3 KB
ID:	23056  

    Click image for larger version

Name:	qtgmc.png
Views:	301
Size:	20.6 KB
ID:	23057  

    Last edited by jagabo; 24th Jan 2014 at 12:20.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by davexnet View Post
    Originally Posted by 2Bdecided View Post
    Originally Posted by davexnet View Post
    Or this variation - skips the Bob, probably much faster.

    directshowsource("I:\itemp\#i misc\3secborder.avi")
    separatefields()
    crop(28,14,-28,-14). lanczosresize(720,240).weave()
    You shouldn't do interlaced resizing just by separating fields - the fields end up slightly misaligned. Sometimes visible, sometimes not - depends entirely on the relationship between the original and final vertical height. Not worth taking the chance.
    Thanks for the info. Shame it wasn't reliable, would be so much quicker.
    Is the misalignment vertical? Something to do with line bounce?
    You see the problem easily using sharp horizontal edges or lines.
    Thanks for posting jagabo,
    good demo.
    Quote Quote  



Similar Threads

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