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

Choose timelines to queue in CLI #161

Open
in03 opened this issue Jun 9, 2022 · 0 comments
Open

Choose timelines to queue in CLI #161

in03 opened this issue Jun 9, 2022 · 0 comments
Labels
feature New feature or request

Comments

@in03
Copy link
Owner

in03 commented Jun 9, 2022

More commands!

Queuing the active timeline by default is handy, but being able to specify the exact timeline means you can look through command history and see which ones you've already done. Queuing multiple timelines at once or even all would be nice too.

Calling without arguments activates picker

Special timelines, Active and All are coloured differently.
Picker only allows one choice if special timeline. Choosing a special deselects all others.
Multiple named timelines can be chosen.

> rprox queue
Working on project "Project 1"
Which timeline would you like to queue?
[space to select, enter to confirm]

-> Active Timeline
   All timelines     
   Assembled Edit
   Best Takes
   Day 1 review
   Day 2 review


Queuing active timeline "Assembled Edit"
[...]

Without argument for timeline option, defaults to active timeline

> rprox queue --active
Working on project "Project 1"
Queuing active timeline "Assembled Edit"
[...]

With timeline provided

> rprox queue "Best Takes"
Working on project "Project 1"
Queuing timeline "Best Takes"
[...]

With '--all' flag

> rprox queue --all
Working on project "Project 1"
[Warning]: Are you sure you want to queue all timelines?
           This includes any revisions and nested timelines!
           Large projects may take a while to process!
> y

Queuing timelines: 
"Assembled Edit"
"Best Takes"
"Day 1 review"
"Day 2 review"

Multiple chosen timelines

> rprox queue "Day 1 review" "Day 2 review"`
Working on project "Project 1"

Queuing timelines: 
"Day 1 review"
"Day 2 review"
[...]

But How?

Queuing multiple timelines could be a huge pain as far as implementation goes. As the application stands at the moment, it's centered on the handling of a single timeline.


Simple implementation:

  1. Iterate each timeline, all handlers, checks, etc on a per-timeline basis
  2. Gather all tasks from each timeline into a single task group
  3. De-duplicate tasks within the group that have the same source media reference
  4. Encode all tasks as per usual
  5. Notify when the entire task group of multiple timelines has finished
  6. Link proxies for each of these timelines
  7. Exit

Pros:

  • Only chosen timelines are iterated, meaning faster performance on large projects
  • Minimal changes to existing code

Cons:

  • If timelines share source-media, you'll be prompted to handle the same source-media multiple times
  • If you're waiting for post-encode linking before starting an editing sesh, you'll have to wait for each chosen timeline to finish

A more complicated way would be:

  1. Modify the Resolve class to always iterate all timelines, retrieving clip-properties along with appended timeline name
  2. thanks to media-pool-item de-duplication, we only need to remove tasks not in the list of chosen timelines
  3. Queue a task group for each timeline
  4. Encode all tasks as per usual
  5. Wait in a while-loop for a task group to finish:
    1. Run the notify routine for that task group
    2. Run the link routine for that task group
    3. Return to the loop until all groups have run those routines
  6. Exit

Pros:

  • Don't have to go through multiple prompts for each timeline
  • Notifications and post-encode link per finished timeline

Cons:

  • Since there's no way to retrieve the names of any timelines a source-file is used in, we have to iterate them all to ensure we get all the source files. Large projects will be slower no matter how many timelines you're queuing
@in03 in03 added the feature New feature or request label Jun 9, 2022
@in03 in03 added this to the Improve CLI commands milestone Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant