• 龙船礼 有讲究 百岁龙 抖精神 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 > VapourSynth

    Reply
     
    Thread Tools Search this Thread Display Modes
    Old 18th March 2019, 22:47   #3361  |  Link
    Registered User
     
    Join Date: May 2005
    Posts: 1,354
    Quote:
    Originally Posted by _Al_ View Post
    vspipe is another (perhaps preferred) way how to encode your script. It pipes frames into an encoder of your choice from OUTSIDE of vapoursynth script *.vpy or *.py,

    but method from above, vapoursynth outpus raw frames directly from script itself, you bypass vspipe, but you need to have *.py, not *.vpy because you run Python basically , vapoursynth does its wrapping part in Python and serving frames with clip.output(). You just run script itself with this method and it will start encoding, you can choose a python consol of your choice (IDLE for example came with Python, so you should have it) and pressing F5 or even using VSEditor, but VS Editor needs clip.set_output(), otherwise it would not let script run, therefore encode (and then showing preview). If you want to avoid preview popup after encoding, you'd just evaluate script.

    if you do not use a console and prefer windows command line, you'd need to run:
    python3 "test.py"
    or
    python "test.py"

    Thank you!
    __________________
    Gorgeous, delicious, deculture!
    asarian is offline   Reply With Quote
    Old 19th March 2019, 01:16   #3362  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    I have this "prop transfer" code:
    Code:
    def _Transfer(n, f):
       fout = f[0].copy()
       fout.props['_Diff'] = f[1].props['_Diff']
       return fout
    alt_clip = core.std.ModifyFrame(alt_clip, [alt_clip, alt_clip_butt], selector=_Transfer)
    Is it possible to make _Transfer() more universal, like this _Transfer(n, f, prop_name), so I can pass any prop -> f[1].props[prop_name] ? If yes, how to call/pass it?

    @Myrsloik have you seen my RemoveDirt post? //www.zs-x.com/showthread.p...51#post1869151
    __________________
    Search and denoise

    Last edited by ChaosKing; 19th March 2019 at 01:42.
    ChaosKing is online now   Reply With Quote
    Old 19th March 2019, 05:13   #3363  |  Link
    Registered User
     
    Join Date: Jan 2016
    Posts: 95
    Quote:
    Originally Posted by ChaosKing View Post
    I have this "prop transfer" code:
    Code:
    def _Transfer(n, f):
       fout = f[0].copy()
       fout.props['_Diff'] = f[1].props['_Diff']
       return fout
    alt_clip = core.std.ModifyFrame(alt_clip, [alt_clip, alt_clip_butt], selector=_Transfer)
    Is it possible to make _Transfer() more universal, like this _Transfer(n, f, prop_name), so I can pass any prop -> f[1].props[prop_name] ? If yes, how to call/pass it?
    Code:
    from functools import partial
    
    def _Transfer(n, f, prop_name):
       fout = f[0].copy()
       fout.props[prop_name] = f[1].props[prop_name]
       return fout
    alt_clip = core.std.ModifyFrame(alt_clip, [alt_clip, alt_clip_butt], selector=partial(_Transfer, prop_name="_Diff"))
    WolframRhodium is offline   Reply With Quote
    Old 19th March 2019, 10:44   #3364  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    Exactly what I wanted, perfect
    __________________
    Search and denoise
    ChaosKing is online now   Reply With Quote
    Old 19th March 2019, 15:07   #3365  |  Link
    Registered User
     
    Join Date: Sep 2006
    Posts: 1,072
    When I try to extract planes and merge them back together, I got error "ShufflePlanes: Plane 1 and 2 are not subsampled multiples of first plane"?

    Code:
    clip_yuv16 = core.resize.Bicubic(clip, format=vs.YUV420P16)
    
    y_clip = core.std.ShufflePlanes(clip_yuv16 , planes=0, colorfamily=vs.YUV)
    u_clip = core.std.ShufflePlanes(clip_yuv16 , planes=1, colorfamily=vs.YUV)
    v_clip = core.std.ShufflePlanes(clip_yuv16 , planes=2, colorfamily=vs.YUV)
    
    yuv16_new = core.std.ShufflePlanes(clips=[y_clip, u_clip, v_clip], planes=[0,0,0], colorfamily=vs.YUV)
    lansing is offline   Reply With Quote
    Old 19th March 2019, 15:35   #3366  |  Link
    Helenium(Easter)
     
    Wolfberry's Avatar
     
    Join Date: Aug 2017
    Location: Hsinchu, Taiwan
    Posts: 82
    Quote:
    Originally Posted by lansing View Post
    When I try to extract planes and merge them back together, I got error "ShufflePlanes: Plane 1 and 2 are not subsampled multiples of first plane"?

    Code:
    clip_yuv16 = core.resize.Bicubic(clip, format=vs.YUV420P16)
    
    y_clip = core.std.ShufflePlanes(clip_yuv16 , planes=0, colorfamily=vs.YUV) ←
    u_clip = core.std.ShufflePlanes(clip_yuv16 , planes=1, colorfamily=vs.YUV) ←
    v_clip = core.std.ShufflePlanes(clip_yuv16 , planes=2, colorfamily=vs.YUV) ←
    
    yuv16_new = core.std.ShufflePlanes(clips=[y_clip, u_clip, v_clip], planes=[0,0,0], colorfamily=vs.YUV)
    You need to use GRAY (not YUV) if you want to extract individual planes.
    __________________
    Monochrome Anomaly
    Wolfberry is offline   Reply With Quote
    Old 19th March 2019, 15:51   #3367  |  Link
    Registered User
     
    Join Date: Sep 2006
    Posts: 1,072
    Quote:
    Originally Posted by Wolfberry View Post
    You need to use GRAY (not YUV) if you want to extract individual planes.
    Thanks it works
    lansing is offline   Reply With Quote
    Reply

    Tags
    speed, vaporware, vapoursynth


    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:25.


    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