VideoHelp Forum




+ Reply to Thread
Page 4 of 5
FirstFirst ... 2 3 4 5 LastLast
Results 91 to 120 of 122
  1. I thought I'd try adding a "luma ramp" to the borders. After a bit of messing around I finally worked out how to make it work in practice much the way it was working in my head. I used jagabo's method for creating a "ramp", only I used the very edge pixels from the video to create the ramp rather than a greyscale ramp as such. That seemed to work better, although I'm still not sure I like the ramp idea after all that.

    I also added a InPixelAR option to the script, so it'll resize anamorphic sources to square pixels now, and add frosty borders as required.
    I think I discovered a silly in the previous method of copping/resizing while I was at it, so that's now fixed.

    See post #72 for details. The new version is FrostyBorders 2017-10-28.avsi

    Here's screenshots. With and without the gradient option enabled.
    Image Attached Thumbnails Click image for larger version

Name:	top-bottom.jpg
Views:	205
Size:	155.1 KB
ID:	43510  

    Click image for larger version

Name:	top-bottom gradient.jpg
Views:	143
Size:	157.1 KB
ID:	43511  

    Click image for larger version

Name:	left-right.jpg
Views:	106
Size:	160.5 KB
ID:	43512  

    Click image for larger version

Name:	left-right gradient.jpg
Views:	111
Size:	162.1 KB
ID:	43513  

    Last edited by hello_hello; 27th Oct 2017 at 20:59.
    Quote Quote  
  2. I had a thought..... maybe instead of a InDAR option, I should have added as source pixel aspect ratio option instead.
    The logic being, if you crop a DVD, the display aspect ratio obviously changes, whereas the pixel aspect ratio remains unchanged (referring to the Input pixel aspect ratio).

    What do you think? I'd use the Yoda Resize Calculator to work out the new InDAR after cropping so it's not a big deal for me, as long as I remember to do it.

    Edit: The "2017-10-27" version of the script might result in an error. I must have had two instances of it open at some stage and made changes using the second instance and saved them, only to over-write them when I saved the first instance of the script again.

    I'll replace the InDAR option with an InPixelAR option while I'm at it, so the fixed version won't be uploaded until that's done.
    It might even have to be tomorrow as I've not got much time today. It depends how long it takes me to get it right.
    Last edited by hello_hello; 28th Oct 2017 at 00:20.
    Quote Quote  
  3. When you use
    Eval("""
    """)
    In a function, why does Avisynth tell you any syntax errors/illegal operations are after
    Eval("""
    """)
    rather than somewhere inside it, where they really are. It makes it harder to track down problems when Avisynth says every error is on the same line.
    Quote Quote  
  4. I've made the switch to InPixelAR instead of InDAR. I'll confess I've only testing it briefly but it worked correctly when I did. I'll test again tomorrow, just in case....

    I've also toned down the border gradient just a little bit (when gradient=true).

    New version: FrostyBorders 2017-10-28.avsi
    Last edited by hello_hello; 27th Oct 2017 at 21:09.
    Quote Quote  
  5. mmmm exactly in this moment both the script seems to work well, however I keep as good the latest. I'm using Avisynth+ R1576

    Code:
    Import("v:\automazioneclip\avisynth\plugins\IResize.avsi")
    Import("v:\automazioneclip\AviSynth\plugins\FrostyBorders.avsi")
    Import("V:\automazioneclip\AviSynth\plugins\CropResizeBorder_ColouredBorders3.avsi")
    LoadPlugin("v:\automazioneclip\AviSynth\Lsmash64perVirtualDub64\LSMASHSource.dll")
    LoadPlugin("V:\automazioneclip\AviSynth\plugins64\ffms2.dll")
    LoadCPlugin("v:\automazioneclip\avisynth\plugins64\yadif.dll")  
    FFVideoSource("C:\Users\Administrator\Desktop\Nuova cartella\Test1.mp4", timecodes="timecodes.txt") 
    vfrtocfr(fpsnum=50000, fpsden=1000, timecodes="timecodes.txt") 
    assumeFPS(50, sync_audio=false)  
    #TurnRight()
    #Turn180()
    #TurnLeft()      
    #robocrop()
    ConvertToYUY2(interlaced=false)
    SmoothFPS2(50000,1000)
    x = float(width) / float(height)         
    LancZosResize(m4(x * 1080.0),1080)        
    #FuzzyBorders(16,9)
    FrostyBorders(1920,1080)
    #BlackBorders(1920,1080)
    function m4(float x) {return( x<16?16:int(round(x/4.0)*4))}
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    AssumeFPS(25)
    Last edited by marcorocchini; 28th Oct 2017 at 05:13.
    Quote Quote  
  6. please cat I need to reduce a little the granularity of the colored/blurred borders, how to do it? thanks
    Quote Quote  
  7. As a rule, reading the instructions at the top of the script helps. The options are listed there. For my script, I think the option you want is Texture, but my script probably won't look as good as raffriff42's without it, because it doesn't use as many pixels from the edge of the video to create the borders.
    Quote Quote  
  8. Originally Posted by marcorocchini View Post
    please cat I need to reduce a little the granularity of the colored/blurred borders, how to do it? thanks

    FrostyBorders
    (..., Texture=1)
    or
    SuperSexyWidescreen(..., noise=2)

    >reading the instructions at the top of the script helps
    I found it very helpful, thanks, but then I always was a RTFM kind of guy.
    Quote Quote  
  9. oh yea yea thanks I'm reading the avsi instruction

    Image
    [Attachment 43528 - Click to enlarge]
    Quote Quote  
  10. Originally Posted by hello_hello View Post
    When you use
    Eval("""
    """)
    In a function, why does Avisynth tell you any syntax errors/illegal operations are after
    Eval("""
    """)
    rather than somewhere inside it, where they really are. It makes it harder to track down problems when Avisynth says every error is on the same line.
    Yes, that's the way the Wiki says to do multi-line statement blocks, but for large blocks, there are better ways to get what you need - break them into functions, for example (see attached - I tried to change as few lines as possible in your script). Using AVS+ it is way easier; you can use GScript if {...} else {...} statements.
    Image Attached Files
    Quote Quote  
  11. That makes sense. Using Eval hasn't been a problem for me except on an occasion where there's a syntax error and I don't know where to start looking. I think I spent over half an hour tracking down something stupid like a missing line break or a closing bracket that wasn't particularly obvious yesterday, which is when I developed my workaround.......

    Return c

    I added it near the top of a multiline statement block and if the source opened, I moved it down a few lines and tried again, then again.... and when the syntax error appeared I'd know where to to look.

    A question if I may...... you used global variables in the modified version of the script. Are they not quite the work of Satan as I'd been led to believe? I assume you could copy the defaults into the individual functions instead of making them global, but is there any need?

    The new version of the cropping script I should get around to finishing, originally had lines like this:

    Uncropped = c
    Autocropped1 = c.Autocrop(some options)
    Autocropped2 = c.Autocrop(some other options)
    Cropping = (sunny day) ? Uncropped : (cloudy day) ? Autocropped1 : Autocropped2

    And logically to me that'd mean autocrop wouldn't get involved on sunny days, but I assume it was anyway, as the script was slow to open, so I started wrapping the slow stuff in Eval, which seemed to do the trick. Thinking about it, I guess turning Autocropped1 and Autocropped2 into functions would do the same job?
    I'm still relatively new to creating functions so it's still a learning process, and for some reason I haven't quite got my head around GScript yet. I'll have another look later.

    Cheers.
    Quote Quote  
  12. Originally Posted by hello_hello View Post
    A question if I may...... you used global variables in the modified version of the script. Are they not quite the work of Satan as I'd been led to believe?
    Yes they are! If I was really doing this, I would split up the arguments properly.

    Originally Posted by hello_hello View Post
    And logically to me that'd mean autocrop wouldn't get involved on sunny days, but I assume it was anyway,
    Yes, I am surprised by this sometimes too. In the script I attached, I had to test each condition twice, with a Nop on the "fail" branch, to avoid executing both alternatives. Still not sure why it should be needed.
    Code:
    CWIDE = (Float_Total_Aspect > Float_Video_Aspect) ? C.FrostyBorders_wide : Nop
    CTALL = (Float_Total_Aspect < Float_Video_Aspect) ? C.FrostyBorders_tall : Nop
    
    return (Float_Total_Aspect > Float_Video_Aspect) ? CWIDE
    \    : (Float_Total_Aspect < Float_Video_Aspect) ? CTALL
    \    : (Total_Width==Video_Width) && (Total_Height==Video_Height) 
    \        ? c
    \    : c.Spline36Resize(Total_Width, Total_Height)
    EDIT fixed a small bug too... moved c.Spline36Resize to the other branch
    Last edited by raffriff42; 29th Oct 2017 at 10:11.
    Quote Quote  
  13. One other question if you don't mind......

    I was reading the info on the Apply function earlier, and then I tried standing on my head and reading it again, but no matter which way I tried, I can't see how it'd make life easier. It says here that "it simplifies calling functions by their name", but either there's a definition of "simplifies" with which I'm not familiar that actually means "makes harder", or I'm seriously missing the point. Does Apply get used much?

    Thanks.
    Quote Quote  
  14. Never used or even recall reading about Apply before.

    Seems you might use it to allow the user to name the function that will be called (EDIT like the wiki page shows)
    It's a little easier to code than Eval, maybe.
    Code:
    #RandomResize_Eval("PointResize", 1024, 768)
    RandomResize_Apply("GaussResize", 1024, 768)
    return Last
    
    function RandomResize_Eval(clip C, string resizer, int width, int height)
    {
        C
        Eval(resizer + "("+String(width)+","+String(height)+")")
        return Last
    }
    
    function RandomResize_Apply(clip C, string resizer, int width, int height)
    {
        Apply(resizer, C, width, height)
        return Last
    }
    Last edited by raffriff42; 29th Oct 2017 at 10:37.
    Quote Quote  
  15. Originally Posted by raffriff42 View Post
    Yes, I am surprised by this sometimes too. In the script I attached, I had to test each condition twice, with a Nop on the "fail" branch, to avoid executing both alternatives. Still not sure why it should be needed.
    Code:
    CWIDE = (Float_Total_Aspect > Float_Video_Aspect) ? C.FrostyBorders_wide : Nop
    CTALL = (Float_Total_Aspect < Float_Video_Aspect) ? C.FrostyBorders_tall : Nop
    
    return (Float_Total_Aspect > Float_Video_Aspect) ? CWIDE
    \    : (Float_Total_Aspect < Float_Video_Aspect) ? CTALL
    \    : (Total_Width==Video_Width) && (Total_Height==Video_Height) 
    \        ? cCWIDE = (Float_Total_Aspect > Float_Video_Aspect) ? C.FrostyBorders_wide : Nop
    \    : c.Spline36Resize(Total_Width, Total_Height)
    EDIT fixed a small bug too... moved c.Spline36Resize to the other branch
    I did wonder if something like:

    return (Float_Total_Aspect > Float_Video_Aspect) ? C.FrostyBorders_wide : C.FrostyBorders_tall

    would produce the same error I'd been using Eval to avoid. I was going to test it a little later, but now there's no need and I know to use something like this instead.

    return (Float_Total_Aspect > Float_Video_Aspect) ? Eval(""" C.FrostyBorders_wide """) : Eval(""" C.FrostyBorders_tall """)

    (I'm very tired and I think it's making me silly)
    Quote Quote  
  16. Originally Posted by raffriff42 View Post
    Never used or even recall reading about Apply before.

    Seems you might use it in the following way - to allow the user to name the function that will be called.
    It's a little easier to code than Eval, maybe.
    Code:
    #RandomResize_Eval("PointResize", 1024, 768)
    RandomResize_Apply("GaussResize", 1024, 768)
    return Last
    
    function RandomResize_Eval(clip C, string resizer, int width, int height)
    {
        C
        Eval(resizer + "("+String(width)+","+String(height)+")")
        return Last
    }
    
    function RandomResize_Apply(clip C, string resizer, int width, int height)
    {
        Apply(resizer, C, width, height)
        return Last
    }
    I'm definitely too tired. I didn't take any of that in so I'll try again tomorrow.

    Thanks.
    Quote Quote  
  17. I get it in theory now but I'll probably have to play with it to lock it in, because at the moment I'm still not seeing the "simplify"aspect of using it.
    Mind you I think I may have a problem, as I appear to have developed a bit of an Eval addiction. I want to Eval everything.

    Cheers.
    Quote Quote  
  18. I finally got around to having a less rushed look at the script today and found a couple of bugs. The only one that matters in respect to adding borders was a potential aspect error when resizing the width (I forgot a bracket). If there was an error, it should have only been wrong by a few pixels.

    A new version of the script with a bunch of changes. Follow this link for details and download.
    Image Attached Thumbnails Click image for larger version

Name:	Frosty Borders A.jpg
Views:	75
Size:	116.3 KB
ID:	43737  

    Click image for larger version

Name:	Frosty Borders B.jpg
Views:	128
Size:	101.1 KB
ID:	43738  

    Last edited by hello_hello; 13th Aug 2019 at 12:14.
    Quote Quote  
  19. I fixed a stupid error in my version of the script when specifying a pixel aspect ratio (it worked fine if you didn't), and it now adds plain black borders until they're 16 pixels wide rather than producing an error saying the borders are too narrow. The new version is attached to the post above this one.
    Quote Quote  
  20. thank you C*T
    Quote Quote  
  21. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    That's is so damned distracting.
    Leave it black pillarbars. The video was 4x3. Enjoy it for what it was.
    Quit molesting it.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  22. I don't find it all that distracting as long as the borders don't change too much or too quickly (except on a scene change), and when you own a Plasma it's not a good idea to watch a great deal of 4:3 because it can cause the screen to "wear" unevenly, or worse case scenario, leave a permanent "burned in" effect down each side. "Burned in" is probably not the correct description there, but you only have to watch half an hour of 4:3 and when you go back to 16:9 you can see where the black borders were at the sides. That doesn't take long to fade away, but alternatively you can put the TV in 4:3 mode so it'll add either dark grey or light grey borders to the sides itself to help age the screen evenly, but I find the constant grey more distracting.

    I often zoom 4:3 to 16:9, cropping a bit more from the bottom of the picture than the top to centre the action (it's amazing how often you can do that and quickly forget it's really 4:3), or sometimes I might just watch it as 4:3, or sometimes I might want to combine 4:3 and 16:9 in a single encode and the coloured borders could make the switch to 4:3 and back less obvious (TV stations do something similar), or sometimes I might just want to add coloured borders. Assuming of course, that's okay with you.
    Last edited by hello_hello; 23rd Dec 2017 at 08:36.
    Quote Quote  
  23. Hello_hello please help a cat:

    I have now installed this Avisynth+ 64bit R2574: https://www.videohelp.com/download/AviSynthPlus-MT-r2574-with-vc-redist.exe

    and use your https://forum.videohelp.com/attachments/43454-1508563458/CropResizeBorder_ColouredBorders3.avsi

    in a script that use the CropResizeBorder function:

    Code:
    Import("v:\automazioneclip\avisynth\plugins\IResize.avsi")
    Import("V:\automazioneclip\AviSynth\plugins\smoothFPS2.avsi")
    Import("v:\automazioneclip\AviSynth\plugins\FrostyBorders.avsi")
    Import("V:\automazioneclip\AviSynth\plugins\CropResizeBorder_ColouredBorders3.avsi")
    LoadPlugin("v:\automazioneclip\AviSynth\Lsmash64perVirtualDub64\LSMASHSource.dll")
    LoadPlugin("V:\automazioneclip\AviSynth\plugins64\ffms2.dll")
    LoadCPlugin("v:\automazioneclip\avisynth\plugins64\yadif.dll")  
    vid=FFVideoSource("C:\Users\Administrator\Desktop\particolare1\input.mp4")          
    aud=FFAudioSource("C:\Users\Administrator\Desktop\particolare1\input.mp4")
    left=GetChannel(aud, 1)
    right=GetChannel(aud, 2)
    both=mergechannels(left, right)
    audiodub(vid, both)
    ConvertAudioTo16Bit()
    #TurnRight()
    #Turn180()
    #TurnLeft()      
    #robocrop()
    ConvertToYUY2(interlaced=false)
    colorMatrix(mode="Rec.601->Rec.709")
    SmoothFPS2(50000,1000) 
    CropResizeBorder(Cmode="NR", InDAR=480.0/368.0, PicDAR=16.0/9.0)
    LanczosResize(1920,1080)
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() 
    AssumeFPS(25)
    If I use avisynt+ R1576 (my old version) the script works ok

    But only if I try to install the Avisynth+R2574 (the new version) I get this error:

    Click image for larger version

Name:	vderr9.png
Views:	123
Size:	6.8 KB
ID:	44120
    Quote Quote  
  24. I'm guessing, but line 281 in the script involves autocrop.dll, so I'd be thinking that's something to do with it.

    Try the new version of the script. I finished it a little while ago.
    CropResize

    It'll do everything the old version can (it also has coloured borders), but it only uses autocrop.dll when auto-cropping is specifically enabled, so if autoctop.dll is the problem it'll hopefully go away.

    Keep in mind the new version no longer has a Cmode option, so to disable resizing you need to set Resize=false instead, but the following should give you the same result as the example in your previous post, only with more accurate cropping.

    CropResize(InDAR=480.0/368.0, PicDAR=16.0/9.0, Resize=false)

    In fact if you want to use LanczosResize for upscaling you should be able to do it the following way with the CropResize8() version of the script. It uses the Resize8 script to do the resizing. The defaults for Resize8 are Lanczos4 for luma upscaling, Lanczos for chroma upscaling, and Spline36 for luma and chroma downscaling.

    CropResize8(1920,1080, InDAR=480.0/368.0, Resizer="Lanczos")

    The PicDAR option has no effect when both OutWidth and OutHeight are specified, unless the script is adding borders, so in the above example "PicDAR=16.0/9.0" would be obsolete. If you specify 16:9 dimensions the script will still crop to 16:9 before resizing.

    Also keep in mind the new script automatically converts between rec.601 and rec.709 when resizing between HD and SD. That can be disabled with ColorCorrect=false (or there's instructions in the help file for disabling it by default), but I suggest checking what the script is doing with Info=true until you get to know it. Info=true is a lot more informative than the old script. It shows you exactly what cropping is being applied along with the source and output aspect ratios etc, and whether colour correction is taking place (there's screen shots in the second post of the thread I linked to). If you try the new version, and I recommend you do because it's better than the old script, I'd suggest looking through the help file because there's a few new options even though the basic functionality is the same.

    PS. I do the following when cropping 4:3 to 16:9 as it forces the script to crop a little more from the bottom than from the top, which usually works better, but the extra cropping is proportional to the resolution of the source (you'll need to use the new version of the script for it to work predictably though).

    c=last
    CropResize8(1920,1080, CB=-(floor(height(c)*0.075/2.0)*2), InDAR=4.0/3.0)
    Last edited by hello_hello; 27th Dec 2017 at 19:45.
    Quote Quote  
  25. Image
    [Attachment 44225 - Click to enlarge]


    oh my c*t: but the new script is extremely compliCatEd for me

    it don't have the same "CropResizeBorder" function of the old CropResizeBorder_ColouredBorders3.avsi

    and for example I need to input parameters as : Cmode="NR", InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0

    Please consider the script I have wrote with my paw (renamed from bat to txt):

    what I have to change to use the new "CropResize.avsi"?
    Code:
      rem *** necessario CropResize per correzione aspect ratio verso 16:9 Sorgente progressiva non 25fps e non 50fps ***  
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if "%PROGRESSIVE%"=="1" echo SmoothFPS2^(50000,1000^)>>"%~n1_HD.avs" 
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if "%PROGRESSIVE%"=="1" echo CropResizeBorder^(Cmode="NR", InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if "%PROGRESSIVE%"=="1" echo LanczosResize^(1920,1080^)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if "%PROGRESSIVE%"=="1" echo AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()>>"%~n1_HD.avs" 
    
            rem *** necessario CropResize per correzione aspect ratio verso 16:9 Sorgente interlacciata non 25fps e non 50fps ***
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if NOT "%PROGRESSIVE%"=="1" echo yadif^(1,1^)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if NOT "%PROGRESSIVE%"=="1" echo SmoothFPS2^(50000,1000^)>>"%~n1_HD.avs" 
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if NOT "%PROGRESSIVE%"=="1" echo CropResize^(Cmode="NR", InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if NOT "%PROGRESSIVE%"=="1" echo LanczosResizeBorder^(1920,1080^)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if NOT "%fps25OR50%"=="1" if NOT "%PROGRESSIVE%"=="1" echo AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()>>"%~n1_HD.avs"  
    
            rem *** necessario CropResize per correzione aspect ratio verso 16:9 Sorgente progressiva a 25fps ***  
            if "%necessarioCropAndResize%"=="1" if "%fps25%"=="yes" if "%PROGRESSIVE%"=="1" echo CropResizeBorder^(Cmode="NR", InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if "%fps25%"=="yes" if "%PROGRESSIVE%"=="1" echo LanczosResize^(1920,1080^)>>"%~n1_HD.avs"
            
            rem *** necessario CropResize per correzione aspect ratio verso 16:9 Sorgente interlacciata a 25fps ***   
            if "%necessarioCropAndResize%"=="1" if "%fps25%"=="yes" if NOT "%PROGRESSIVE%"=="1" echo yadif^(1,1^)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if "%fps25%"=="yes" if NOT "%PROGRESSIVE%"=="1" echo CropResizeBorder^(Cmode="NR", InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if "%fps25%"=="yes" if NOT "%PROGRESSIVE%"=="1" echo LanczosResize^(1920,1080^)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if "%fps25%"=="yes" if NOT "%PROGRESSIVE%"=="1" echo AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()>>"%~n1_HD.avs" 
    
            rem *** necessario CropResize per correzione aspect ratio verso 16:9 Sorgente progressiva a 50fps ***  
            if "%necessarioCropAndResize%"=="1" if "%fps50%"=="yes" if "%PROGRESSIVE%"=="1" echo CropResizeBorder^(Cmode="NR", InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if "%fps50%"=="yes" if "%PROGRESSIVE%"=="1" echo LanczosResize^(1920,1080^)>>"%~n1_HD.avs"
            if "%necessarioCropAndResize%"=="1" if "%fps50%"=="yes" if "%PROGRESSIVE%"=="1" echo AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()>>"%~n1_HD.avs"  
    
            rem ***********************************************************************************************************************************************************
    
            if NOT "%fps25OR50%"=="1" if not "%necessarioCropAndResize%"=="1" if NOT "%necessarioFuzzy%"=="1" echo AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()>>"%~n1_HD.avs"
            if "%fps50%"=="yes" if not "%necessarioCropAndResize%"=="1" if NOT "%necessarioFuzzy%"=="1" echo AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()>>"%~n1_HD.avs"    
            echo AssumeFPS^(25^)>>"%~n1_HD.avs"
    Image Attached Files
    Quote Quote  
  26. Originally Posted by marcorocchini View Post
    oh my c*t: but the new script is extremely compliCatEd for me

    it don't have the same "CropResizeBorder" function of the old CropResizeBorder_ColouredBorders3.avsi

    and for example I need to input parameters as : Cmode="NR", InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0
    The Cmode option is gone. I explained that in my last post. Cmode="NR" needs to be changed to Resize=false. The InDAR and PicDAR options are still the same.

    Or you can use the following script. Dump the old CropResizeBorder script and load this one instead. Also load the new CropResize script.
    This is a wrapper function that translates the old Cmode option to the CropResize equivalents, so as long as you load CropResize, you won't have to change your script. It also disables the new CropResize ColorCorrection option, as you mightn't want it automatically converting the colours.

    function CropResizeBorder(clip c, int "OutWidth", int "OutHeight", int "CL", int "CT", int "CR", int "CB", int "Cthresh", int "Cstart", int "Csample", val "PicDAR", int "Mod", val "InDAR", int "Cpreview", string "Cmode", val "Bcolor") {

    Cmode = default(Cmode, "R")
    CL = default(CL, 0)
    CT = default(CT, 0)
    CR = default(CR, 0)
    CB = default(CB, 0)
    Cthresh = default(Cthresh, 30)
    Cstart = default(Cstart, 250)
    Csample = default(Csample, 5)
    PicDAR = default(PicDAR, float(0))
    Mod = default(Mod, 4)
    InDAR = default(InDAR, float(c.width) / float(c.height))
    Cpreview = default(Cpreview, 0)
    Bcolor = default(Bcolor, $000000)

    Resize = (Cmode == "R") ? true : (Cmode == "NR") ? false : nop
    Borders = (Cmode == "RB") ? true : false
    ResizeWO = (Cmode == "RW") ? true : false
    CleanBorders = (Cmode == "B") ? true : false
    Info = ((Cpreview == 1) || (Cpreview == 2)) ? true : false
    ColorCorrect = false

    return c.CropResize(OutWidth=OutWidth, OutHeight=OutHeight, CL=CL, CT=CT, CR=-CR, CB=-CB, CThresh=CThresh, CStart=CStart, CSample=CSample, InDAR=InDAR, PicDAR=PicDAR, Mod=Mod, Resize=Resize, ResizeWO=ResizeWO, Borders=Borders, CleanBorders=CleanBorders, BColor=BColor, ColorCorrect=ColorCorrect, Info=Info) }
    By the way, there's a new version of Avisynth+. I don't know if it'll fix your problem but version R2574 apparently had a few bugs.
    https://github.com/pinterf/AviSynthPlus/releases/tag/r2580-MT
    Last edited by hello_hello; 1st Jan 2018 at 09:54.
    Quote Quote  
  27. Code:
    Import("v:\automazioneclip\avisynth\plugins\IResize.avsi")
    Import("V:\automazioneclip\AviSynth\plugins\smoothFPS2.avsi")
    Import("v:\automazioneclip\AviSynth\plugins\FrostyBorders.avsi")
    Import("v:\automazioneclip\AviSynth\plugins\CropResizeBorderSimply.avsi")
    LoadPlugin("v:\automazioneclip\AviSynth\Lsmash64perVirtualDub64\LSMASHSource.dll")
    LoadPlugin("V:\automazioneclip\AviSynth\plugins64\ffms2.dll")
    LoadCPlugin("v:\automazioneclip\avisynth\plugins64\yadif.dll")  
    vid=FFVideoSource("C:\Users\Administrator\Desktop\particolare1\input.mp4")          
    aud=FFAudioSource("C:\Users\Administrator\Desktop\particolare1\input.mp4"       )
    left=GetChannel(aud, 1)
    right=GetChannel(aud, 2)
    both=mergechannels(left, right)
    audiodub(vid, both)
    ConvertAudioTo16Bit()
    #TurnRight()
    #Turn180()
    #TurnLeft()      
    #robocrop()
    ConvertToYUY2(interlaced=false)
    colorMatrix(mode="Rec.601->Rec.709")
    SmoothFPS2(50000,1000) 
    CropResizeBorder(Cmode="NR", InDAR=480.0/368.0, PicDAR=16.0/9.0)
    LanczosResize(1920,1080)
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() 
    AssumeFPS(25)


    Unable to open file: C:\Users\Administrator\Desktop\particolare1\input_ HD.avs
    [avisynth @ 00000000025381a0] Script error: There is no function named 'CropResize'.
    (v:\automazioneclip\AviSynth\plugins\CropResizeBorderSimply.avsi, line 24)
    (C:\Users\Administrator\Desktop\particolare1\input _HD.avs, line 22)

    I get this error BUT:

    I have try the new script (the big) and it works!!
    Quote Quote  
  28. Code:
    CropResize(Resize=false, ColorCorrect=false, InDAR=%V_Width%.0/%RealV_Height%.0, PicDAR=16.0/9.0)
    this, with the new script https://forum.videohelp.com/threads/386195-CropResize-script-updated-version-with-sub-pixel-cropping works

    The problem with avisynth is solved only using this new script, independetly from R2574 or R2580. Thank you very cat

    Image
    [Attachment 44248 - Click to enlarge]
    Quote Quote  
  29. Originally Posted by marcorocchini View Post
    Unable to open file: C:\Users\Administrator\Desktop\particolare1\input_ HD.avs
    [avisynth @ 00000000025381a0] Script error: There is no function named 'CropResize'.
    (v:\automazioneclip\AviSynth\plugins\CropResizeBorderSimply.avsi, line 24)
    (C:\Users\Administrator\Desktop\particolare1\input _HD.avs, line 22)
    That's why I mentioned twice it would only work if you also load the new CropResize script.

    Originally Posted by marcorocchini View Post
    The problem with avisynth is solved only using this new script, independetly from R2574 or R2580.
    I imagine it was something to do with AutoCrop.dll. Probably not AutoCrop's fault, but related to one of the Avisynth R2574 bugs.

    Originally Posted by marcorocchini View Post
    Thank you very cat
    You're welcome.
    Last edited by hello_hello; 1st Jan 2018 at 09:57.
    Quote Quote  



Similar Threads

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