Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
18th October 2022, 09:23 | #1 | Link |
Registered User
Join Date: Aug 2020
Posts: 32
|
how to setprop to single frame?
can ModifyFrame do single frame?
def transfer_property(n, f): fout = f[1].copy() fout.props['_Matrix'] = f[0].props['_Matrix'] return fout ... final=core.std.ModifyFrame(clip=c1, clips=[c1, c2], selector=transfer_property) #this work for clip to clip #final = core.text.FrameProps(final) final.set_output() ------------------------------------- how to set "framenumber(50,71,181)"? Last edited by tuqc; 18th October 2022 at 20:16. |
18th October 2022, 18:57 | #3 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
to copy matrix from c2 clip into c1:
Code:
def transfer_property(n, f): fout = f[0].copy() if n in [50,71,181]: fout.props['_Matrix'] = f[1].props['_Matrix'] return fout ... final=core.std.ModifyFrame(clip=c1, clips=[c1, c2], selector=transfer_property) to fix it right away, seems kind of unlikely just to fix matrix in some frames, but anyway: Code:
import functools def transfer_property(n, c1,c2): if n in [50,71,181]: #c1 gets matrix out prop from c2 and gets fixed return c1.resize.Bicubic(matrix_in=c2.get_frame(n).props['_Matrix'], matrix=c1.get_frame(n).props['_Matrix']) return c1 ... final=core.std.FrameEval(c1, functools.partial(transfer_property, c1=c1,c2=c2)) Last edited by _Al_; 18th October 2022 at 19:20. |
19th October 2022, 09:59 | #4 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
I would move the frame list outside the function for more flexibility.
I don't have python installed right now to test it PHP Code:
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
20th October 2022, 01:11 | #5 | Link | |
Registered User
Join Date: Aug 2020
Posts: 32
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|