• 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • 美元短线拉升 随后回吐涨幅 2019-03-07
  • 朔州市人大常委会任免名单 2019-03-05
  • “创新从来都是九死一生”(人民论坛) 2019-02-14
  • 端午假期广州铁路运客640.5万人次 创历史新高 2019-02-14
  • 19次生态输水让塔河下游生机勃勃 2018-11-22
  • 男篮再胜伊朗迎热身赛两连胜 任骏飞19+11陶汉林18分 2018-11-22
  • 小卒子,你南街村的代言人啊?扮豬不咋像呢!你滴,大大滴,明白? 2018-11-22
  • 女性之声——全国妇联 2018-11-21
  • 新华网评:凝聚打赢脱贫攻坚战的强大合力 2018-11-21
  • 栗战书:执法检查要直面问题不搞评功摆好 让法律制度成为不可触碰的高压线 2018-11-21
  • Welcome to

    Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

     

    Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

    Reply
     
    Thread Tools Search this Thread Display Modes
    Old 17th March 2019, 17:30   #21  |  Link
    Registered User
     
    Join Date: Mar 2011
    Posts: 3,830
    Quote:
    Originally Posted by Metal-HTPC View Post
    thanks hello_hello

    I inserted

    and then your script worked without additional disabling of specific commands.
    I don't understand much of your "programmer conversion" with stainlesss ;-), so my simple question would be
    should I replace it with "function CR_IsReallyFloatOld(val v) {
    return !IsInt(v) && IsFloat(v) } " now ?
    Yeah, just add the function to the end of the CropResizePicDAR script.

    Quote:
    Originally Posted by Metal-HTPC View Post
    I used it for a DVD which was originally 720x480. So I guess there is really no way to crop it and resize it to prober 720x576 without loosing
    some information if I want to keep the ratio intact
    You can resize to a 4:3 aspect ratio and add borders, which would require less height cropping. For a DVD with a 15:11 display aspect ratio it always works out if you crop 8 pixels from each side, the remaining 704x480 or 704x576 is exactly 4:3.

    CropResizePicDAR(704,576, 12,0,-10,-4, InDAR=15.0/11.0, PicDAR=4.0/3.0, Info=true)
    AddBorders(8,0,-8,0)

    The added borders aren't included in the info as the script doesn't know about them.



    The script can normally add borders for you, but I disabled a lot of stuff for the hacked version so I didn't have to spend time testing it.

    Here's how the new version will do it.
    When you specify a CropDAR, the picture is cropped to that display aspect ratio (or as close as possible for mod dimensions, depending on the resizing). If you also specify an OutDAR and it's different to the CropDAR, the script automatically adds borders to make up the difference.

    CropResizeNew(720,576, 12,0,-10,-4, InDAR=15.0/11.0, CropDAR=4.0/3.0, OutDAR=15.0/11.0, Info=true)



    Or something a little more silly.

    CropResizeNew(720,576, 12,0,-10,-4, InDAR=15.0/11.0, CropDAR=16.0/9.0, OutDAR=4.0/3.0, Info=true)



    Quote:
    Originally Posted by Metal-HTPC View Post
    So the script works and does what it does right. It crops and resizes without destroying the original ratio through stretching.
    Correct.

    Last edited by hello_hello; 17th March 2019 at 17:54.
    hello_hello is offline   Reply With Quote
    Old 17th March 2019, 18:52   #22  |  Link
    Registered User
     
    Join Date: Mar 2011
    Posts: 3,830
    Quote:
    Originally Posted by StainlessS View Post
    If you plan on Never using v2.58 again, then comment out or delete the lines entirely, they serve no purpose at all in v2.60+.

    I'm sure though that HH will make some decision on how to handle it, but for now might as well delete/comment out the lines.

    I started using Type Val args for this reason (you could detect problem args) but sort of gave up as its a little more tedious to do.
    They do serve a purpose. The script already uses the val type for any argument that must be supplied as float, so the IsReallyFloat() checks do work.
    hello_hello is offline   Reply With Quote
    Old 17th March 2019, 20:06   #23  |  Link
    HeartlessS Usurer
     
    StainlessS's Avatar
     
    Join Date: Dec 2009
    Location: Over the rainbow
    Posts: 6,386
    Quote:
    The script already uses the val type for any argument
    Oops yes, that escaped me.
    __________________
    I sometimes post sober.
    [email protected] ::: AND/OR ::: [email protected]

    "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
    StainlessS is offline   Reply With Quote
    Reply


    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT +1. The time now is 00:33.


    Powered by vBulletin® Version 3.8.11
    Copyright ©2000 - 2019, vBulletin Solutions Inc.
  • 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • 美元短线拉升 随后回吐涨幅 2019-03-07
  • 朔州市人大常委会任免名单 2019-03-05
  • “创新从来都是九死一生”(人民论坛) 2019-02-14
  • 端午假期广州铁路运客640.5万人次 创历史新高 2019-02-14
  • 19次生态输水让塔河下游生机勃勃 2018-11-22
  • 男篮再胜伊朗迎热身赛两连胜 任骏飞19+11陶汉林18分 2018-11-22
  • 小卒子,你南街村的代言人啊?扮豬不咋像呢!你滴,大大滴,明白? 2018-11-22
  • 女性之声——全国妇联 2018-11-21
  • 新华网评:凝聚打赢脱贫攻坚战的强大合力 2018-11-21
  • 栗战书:执法检查要直面问题不搞评功摆好 让法律制度成为不可触碰的高压线 2018-11-21