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

Proper Crop Toggle and Cycle Crops #35

Open
smhmd opened this issue Jan 27, 2020 · 4 comments
Open

Proper Crop Toggle and Cycle Crops #35

smhmd opened this issue Jan 27, 2020 · 4 comments

Comments

@smhmd
Copy link

smhmd commented Jan 27, 2020

toggle-crop removes crop, not toggle it.

It would be great to switch between cropped and uncropped. my use case would be cropping GUI elements of an editor in tutorials, but toggle to full video when the instructor switches the editor window.

It would also be great to cycle between crops instead of switching crop on/off. crop.lua can already define multiple crops within each other.

@occivink
Copy link
Owner

I wonder if this is not maybe more appropriate for another script, that would allow you to selectively enable/disable parts of the filter chain or reorder it.

@smhmd
Copy link
Author

smhmd commented Feb 18, 2020

I'm not familiar with filters in general, but a general-purpose script does seem like a sensible idea. How would it work, though? Currently, you can't have two crops that intersect/are totally separate.

+-------------------------------------------------+     +-------------------------------------------------+
|                                +-------------------+ |     |                                +-------------------+ |
|   +----------------------------+              |  |     |   +---------------+       |                       |  |
|   |                           |     |               |  |     |   |                   |      |                       |  |
|   +----------------------------+              |  |     |   +---------------+       |                       |  |
|                                +-------------------+ |     |                                +-------------------+ |
+-------------------------------------------------+     +-------------------------------------------------+

A crop must be within another crop. Just a week ago, I started needing these separate/intersect crops (maybe this should go in another issue). Which raises the question: is this filter chain a stack that would only allow filters on top of filters but not two different sets of filters to be cycled through?

@occivink
Copy link
Owner

Yes essentially the filter chain is a stack of filter (which can be crop, rotate, flip, blur... the list is long).

And I don't think your diagram renders properly.

If you need separate crops you can use lavfi-complex but this is not going to be easy to define interactively. Maybe if you have a mostly static usecase.
blur-edges.lua makes use of lavfi-complex, it essentially is two separate crops on either sides of the video

@smhmd
Copy link
Author

smhmd commented Feb 18, 2020

And I don't think your diagram renders properly.

Probably different fonts. It's supposed to look like this:
image


this is not going to be easy to define interactively.

How about this pattern: Press c to define-crop using [[380,230],[1500,800]] as points. pressing c again would simply zoom out to full video with the crop defined with [[380,230],[1500,800]] highlighted, leaving you with the freedom to define a separate, intersectional, or an inner crop.

Filters can be piped into something similar to this:

image

Where filters can be toggled on and off, with a keybinding to cycle between them/disable all of them on the fly.

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