VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member
    Join Date
    Apr 2006
    Location
    United States
    Search Comp PM
    Hi forum, I have a question regarding CCE and AviSynth.

    I am trying to convert an MP4 file to a CCE MPEG-2 compliant file. One AviSynth Script works with CCE and does convert the file but another Script causes CCE to crash.

    Here is the script that works. This script was made by FitCD:
    <SCRIPT>
    # -= AviSynth v2.5.7.0 script by FitCD v1.2.8 =-
    DirectShowSource("C:\mymovie.mp4", audio=false)
    LanczosResize(640,440,2,0,636,480)
    AddBorders(40,16,40,24)
    #Trim(0,33252).FadeOut(150)
    ConvertToYUY2() # For VirtualDub or CCE
    </SCRIPT>


    Here is the script that causes CCE to crash. This script was made by a tool that I wrote in .Net a long time ago.
    <SCRIPT>
    DirectShowSource("C:\mymovie.mp4", audio=false)
    LanczosResize(640,440)
    AddBorders(40,16,40,24)
    ConvertToYUY2()
    <SCRIPT>

    I have determined that the problem in the script that fails is:
    LanczosResize(640,440)

    When I replace it with the LanczosResize from the script that works, CCE works fine.

    A prominent poster on this board told me that the only numbers that mattered in the LanczosResize were the first two.

    Is there a way to calculate the 4 other numbers? As I stated, I have a tool that makes my AVS files and right now it only does the first two numbers as the other 4 are unique to each file set.
    Quote Quote  
  2. The 3rd and 4th numbers in LanczosResize() are the X and Y offsets of the subsection of the source to be resized. The 5th and 6th arguments are the size of the subsection of the source to be resized.

    LanczosResize(640,440,2,0,636,480)

    is equivalent to:

    Crop(2, 0, 636, 480)
    LanczosResize(640, 440)

    The crop is probably removing black borders.
    Quote Quote  
  3. The crop lowers the Aspect Error.

    You might open the not-working script in VDubMod and see if it gives out with an error message, something you should do with any AviSynth script before sending it to CCE, which doesn't give any error messages at all.

    And if your AviSynth version isn't the latest, you might upgrade it.
    Quote Quote  
  4. Member
    Join Date
    Apr 2006
    Location
    United States
    Search Comp PM
    Thanks for the responses, I will modify my code to spit out the other 4 values.
    Quote Quote  
  5. Originally Posted by mickgreen58
    Thanks for the responses, I will modify my code to spit out the other 4 values.
    That shouldn't really make any difference. I guess it's still worth a try.
    Quote Quote  
  6. Member
    Join Date
    Apr 2006
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo
    Originally Posted by mickgreen58
    Thanks for the responses, I will modify my code to spit out the other 4 values.
    That shouldn't really make any difference. I guess it's still worth a try.
    That is what I thought.

    I knew adding the extra numbers would work, I had already tested it. I just didn't want to change my code.

    I have a new question, but it requires another thread.
    Quote Quote  



Similar Threads

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