Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve script output code #17

Open
LightArrowsEXE opened this issue May 16, 2022 · 3 comments
Open

Improve script output code #17

LightArrowsEXE opened this issue May 16, 2022 · 3 comments

Comments

@LightArrowsEXE
Copy link

There's room for improvement with the output script, both to make it fit in with existing scripts a bit nicer, and to make it a lot more Pythonic.

A couple ideas:

  • Set core = vs.core instead of c (as this is more standard, so the user doesn't have to find and replace it every single time)
  • Give clear variable names for every step, rather than calling them all src.
  • When only one splice exist at the start of a clip, simply use regular Python slicing as opposed to calling std.Splice()
  • Not adding kinda unnecessary params.

For example: c.std.SelectEvery(clip=src[0:755], cycle=5, offsets=[1,2,3,4,]).
This can be replaced with something like core.std.SelectEvery(src[:755], offsets=[1, 2, 3, 4]) This reduces additional bloat.

  • Add spaces in stuff like the dec# splices.
    • Alternatively, put them all in a list that gets passed to Splice. For example:
core.std.Splice([
    core.std.SelectEvery(src[:1000], offsets=[1, 2, 3, 4]),
    core.std.SelectEvery(src[1000:2000], offsets=[0, 1, 3, 4]),
    core.std.SelectEvery(src[2000:], offsets=[1, 2, 3, 4]),
], mismatch=True)
  • Creating a Python script that's meant to be imported,
    • A big annoyance I have with the output is that it's big, and makes scrolling through the entire script a royal pain. Putting the results into its own function meant to be imported into the main script may alleviate this issue somewhat.
  • Consider requiring a couple more external dependencies.
    • Namely replacing FTF with the lvsfunc implementation and using VFRSplice from muvsfunc (with settings to set default timecode output path. Maybe make that a function param if you apply the previous suggestion?)

I have my own setup I've been using to try and make my life easier, which is also included here should it prove useful and give you more ideas. Maybe also expose variables for all the selections/deletions/etc. from within an external module that the function to perform everything also uses might work? idk
archive.tar.gz

@ghost
Copy link

ghost commented May 17, 2022

IMO, SelectEvery decimation should be removed entirely. It's going to add significant clutter no matter what. I believe DeleteFrames creates much less clutter and avoids hundreds of splices in the script.

@myrsloik
Copy link
Collaborator

Can I have a wobbly project that generates ridiculously big output to evaluate some of the claims here?

The c => core change seems obvious and PRs welcome

@myrsloik
Copy link
Collaborator

IMO, SelectEvery decimation should be removed entirely. It's going to add significant clutter no matter what. I believe DeleteFrames creates much less clutter and avoids hundreds of splices in the script.

I suspect that DeleteFrames only is the way to go here and that SelectEvery should be dropped. Debate me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants