VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hi cats

    please consider this avisynth script-base

    Code:
    videofile0 = LWLibavVideoSource("c:\myfolder\C0060.MXF")
    audiofile0 = LWLibavAudioSource("c:\myfolder\C0060.MXF")
    file0 = audiodub(videofile0,audiofile0)
    Now I would like apply a .IResize(1920,1080) like
    Code:
    videofile0 = LWLibavVideoSource("c:\myfolder\C0060.MXF").IResize(1920,1080)

    only if the video resolution is different from 1920x1080

    And also add a line so that is apply a .convertToYUY2() only if the colorspace is different from 4:2:2

    How can I do? thanks
    Quote Quote  
  2. if/then

    I'm pretty sure it was covered in one of your previous threads

    Here is one way to do it: if width is < 1919, then apply iresize(1920,1080), otherwise return videofile0 . (or you can use something else , like height to be the determining factor, adjust as you see fit)

    Code:
    videofile0.width<1919 ? videofile0.IResize(1920,1080) : videofile0


    For the YUY2 - You probably just want to use ConvertToYUY2(interlaced=true, matrix="rec709") . If file is already YUY2, it's a no-op (nothing is processed). You don't need any if/then or logic, avisynth already does this. I'm assuming all your files are interlaced (hence the interlaced=true switch)
    Quote Quote  
  3. One note: "<1919" would allow clips that are 1919 pixels wide through without resizing. You should use "<1920" or "<=1919" instead.

    I would use "!= 1920" (ie, not equal) instead so that larger clips would get downsized, as well as smaller clips getting upsized.

    Why use IResize if the clips aren't interlaced?

    And do you really want to distort sources that aren't 16:9?
    Last edited by jagabo; 13th Mar 2016 at 10:49.
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I think because historically the OP has dealt with lots of interlaced material.

    Scott
    Quote Quote  
  5. mmmmm

    Click image for larger version

Name:	mmmcat.jpg
Views:	191
Size:	51.6 KB
ID:	36144
    Last edited by marcorocchini; 13th Mar 2016 at 12:41.
    Quote Quote  



Similar Threads

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