Problem: VDMod/Avisynth Crop Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • infiniter
    Junior Member
    Junior Member
    • Dec 2003
    • 27

    Problem: VDMod/Avisynth Crop Error

    Hello!

    I use GordianKnot, which uses Avisynth. When encoding a .AVS, VirtualDub pops up an error:
    Avisynth open failure
    Crop: you cannot use crop to enlarge or "shift" a clip, line 35


    I didn't find any answer in the FAQs for Avisynth and VD.
    I didn't find any answer on related forums.
    I can't see any error or what I done wrong, since I crop and
    resize the video from DVD size to smaller size, so it's not enlargement. But I don't know what is meant by "shift a clip".
    I even set MOD value to 2.


    Any clue to solve this?

    TIA!

    infiniter
  • Enchanter
    Old member
    • Feb 2002
    • 5417

    #2
    Sounds like you have improperly input the wrong parameters for the crop function. Could you post the entire content of your .avs script so we can have a look?

    Regards.

    Comment

    • infiniter
      Junior Member
      Junior Member
      • Dec 2003
      • 27

      #3
      #
      # Created with Gordian Knot
      #
      # http://gknot.doom9.org
      #
      # PLUGINS
      SetWorkingDir("C:\PROGRA~1\GORDIA~1\")
      LoadPlugin("mpeg2dec3.dll")
      LoadPlugin("decomb.dll")
      #LoadPlugin("dgbob.dll")
      #LoadPlugin("Convolution3d.dll")
      #LoadPlugin("FluxSmooth.dll")
      #LoadPlugin("TomsMoComp.dll")
      #LoadPlugin("VSFilter.dll")
      #LoadPlugin("SimpleResize.dll")
      #
      # SOURCE
      mpeg2source("E:\Temp\biester.d2v")
      #
      # TRIM
      #trim(startframe,endframe)
      #
      # IVTC
      #Telecide(guide=1).Decimate(5)
      # or use
      #IVTC(44,11,95)
      #GreedyHMA(1,0,4,0,0,0,0,0)
      #
      # DEINTERLACING (1)
      FieldDeinterlace()
      #FieldDeinterlace(blend=false)
      #TomsMoComp(1,5,1)
      #
      # CROPPING
      crop(10,50,700,476)
      #
      # DEINTERLACING (2)
      #SeparateFields().SelectEven()
      # or maybe
      #DGBob(order=0,single=true)
      # DEINTERLACING (3) - special requests
      #GreedyHMA(1,0,0,0,0,0,0,0)
      #Telecide()
      #SeparateFields()
      #
      #
      # SUBTITLES
      #VobSub("FileName")
      #
      # RESIZING
      LanczosResize(578,360)
      #
      # DENOISING: choose one combination (or none)
      # 1) little noise
      #Temporalsoften(2,3,3,mode=2,scenechange=6)
      #mergechroma(blur(1.3))
      #FluxSmooth(5,7)
      #
      # 2) medium noise
      #Temporalsoften(3,5,5,mode=2,scenechange=10)
      #Convolution3d("moviehq")
      #FluxSmooth(7,7)
      #
      # 3) heavy noise
      #Temporalsoften(4,8,8,mode=2,scenechange=10)
      #Convolution3d("movielq")
      #FluxSmooth(10,15)
      #
      # BORDERS
      #AddBorders(left,top,right,bottom)
      #
      # COMPRESSIBILITY CHECK
      # !!!!Snip Size now has to be 14 for use in GKnot!
      #SelectRangeEvery(280,14)
      #
      # FOOL CCEnc
      #ResampleAudio(44100)

      Comment

      • infiniter
        Junior Member
        Junior Member
        • Dec 2003
        • 27

        #4
        This script is generated by GordianKnot. Cropping is done with the AUTOCROP function. It's very effective.

        Comment

        • Enchanter
          Old member
          • Feb 2002
          • 5417

          #5
          Is the source in PAL?

          Comment

          • infiniter
            Junior Member
            Junior Member
            • Dec 2003
            • 27

            #6
            Yes, but interlaced. But even if I don't use deinterlace, this error keeps occuring.

            Comment

            • Enchanter
              Old member
              • Feb 2002
              • 5417

              #7
              The error seems to lie with the Crop function, but strangely the cropping parameters look fine with me (unless the resolution of the source is anything but 720x576). Try disabling the Crop function (by adding # at the beginning of the Crop line) and see whether the same error occurs.

              Cheers.

              Comment

              • infiniter
                Junior Member
                Junior Member
                • Dec 2003
                • 27

                #8
                Thanks, Enchanter. But a crop command error can only occur when crop is enabled. Of course it will work when cropping is disabled. But that's not the solution. I would have to re-encode the video a second time, just to crop it after the first conversion with GKnot.

                Comment

                • Enchanter
                  Old member
                  • Feb 2002
                  • 5417

                  #9
                  You might as well disable both cropping & resizing (thus using Avisynth for frameserving purposes only), and perform those two functions using Virtualdub's filters.

                  Thus the resulting .avs script becomes:

                  SetWorkingDir("C:\PROGRA~1\GORDIA~1\")
                  LoadPlugin("mpeg2dec3.dll")
                  LoadPlugin("decomb.dll")
                  mpeg2source("E:\Temp\biester.d2v")
                  FieldDeinterlace()

                  Open the .avs script in Virtualdub and load up the Null Transform & Resize filters in order to do cropping and resizing respectively.

                  Regards.

                  Comment

                  • infiniter
                    Junior Member
                    Junior Member
                    • Dec 2003
                    • 27

                    #10
                    Well, I know how to circumvent this problem, like you suggest or another way. But, I would rather like to know what causes this error. It must work. I could, of course, trim the script to basic functions, but GKnot control VD and I had to interrupt the encoding progress to set crop and resize filter. Well, I would do, anyway.

                    Too bad, no one has had this error, as it seems. So he would very likely have an answer.

                    Comment

                    • Enchanter
                      Old member
                      • Feb 2002
                      • 5417

                      #11
                      You can always open the .AVS file GK generated in Virtualdub (i.e. without having to activate GK) and carry out those tasks (cropping, resizing and encoding) manually in VirtualdubMod.

                      Cheers.

                      Comment

                      Working...