VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    Hello,

    I'd like to ask if this is correct place for CROP in following script:
    (pls ignore strange parameters since these are from powershell)
    Code:
    SetMemoryMax(950)
    SetMTMode(mode=5, threads=6)
    directShowSource("$($inFile.fullName)",fps=$fps,audio=false,pixel_type="YV12")
    SetMTMode(mode=2)
     
    assumeTFF()
    crop($($left),$($top),$($width),$($height),align=false)
     
    QTGMC(Preset="medium", ChromaMotion=false, EdiThreads=1)
    Distributor()
    to give more information, video after crop is ALWAYS mod16 (vertically and horizontally).
    I hope I do not have to move it below DISTRIBUTOR() command

    edit:
    just in case, input video is a recording from TV via HDPVR as 1080i, 25fps
    Last edited by adom; 5th Jan 2014 at 10:08.
    Quote Quote  
  2. I always crop after having made the video progressive but if, as you say, you crop Mod16, you should be fine doing it while it's still interlaced.

    In any event, I've always seen Distributer listed last in a script so if you crop later on, it would be after QTGMC.
    Quote Quote  
  3. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    PowerShell script takes care about mod16.

    I asked that question because some music videos have big borders (top + bottom > 40% of height of video) and QTGMC does its job much faster when I crop it in advance. I read how to crop interlaced material and just wanted to double checked asking here.

    Thanks for help and I'll keep in mind that DISRTIBUTOR goes last in the script.
    Quote Quote  
  4. Originally Posted by adom View Post
    PowerShell script takes care about mod16.
    You need to worry about the size of the crops as well as the size of the remaining video. With interlaced YV12 you should crop by mod4 on the vertical axis to avoid blurring of the colors. For example, cropping 2 lines off the top and 14 lines off the bottom of a mod 16 frame will leave you with a mod16 frame size -- but the colors will get blurred. It would be better to crop 4 off the top and 12 off the bottom.
    Quote Quote  
  5. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    Frankly speaking I new about it when I read help file for mPlayer - there is very good explanation about interlaced material and how to crop.

    After your post I looked again into my script because I was not so sure anymore if I implemented that part - but yes, it is there, the top cut can only be done mod 4 then remaining vertical resolution is calculated (making mod 16).
    And because of this, I have one more question:

    does resolution of video have to be mod16 or mod8 or can be even mod2 (in case of progressive). I've been using mod16 because I read somewhere about macro-blocks so I decided to stick to it (I think it is even mentioned in mPLayer's manual - to achive the best quality final resolution should be multiplication of minimal macro-block of used codec -in my case avc).
    But looking at 1080 vertical resolution I'd say I can safely use mod 8.
    Quote Quote  
  6. Interlaced YV12 video has to be mod4 vertically, mod2 horizontally. After conversion to progressive it has to be mod 2 on both axis. At least as far as AviSynth is concerned.

    Compression codecs can have different requirements. Form progressive YV12 most MPEG 2 encoders need mod8. h.264 can be mod2 but I'd stick with mod4 as some old decoders have problems with mod2.
    Quote Quote  
  7. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    mod4 is quite enough.

    Thanks again
    Quote Quote  



Similar Threads