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

Add support for crop #220

Open
muellerj opened this issue Jan 3, 2022 · 0 comments
Open

Add support for crop #220

muellerj opened this issue Jan 3, 2022 · 0 comments

Comments

@muellerj
Copy link

muellerj commented Jan 3, 2022

A common usecase might be to force image/video dimensions (to fit a given container on a webpage e.g.). This may require a crop. My command atm is:

ffmpeg -i input.mov \
  -vf "scale=(iw*sar)*max(WIDTH/(iw*sar)\,HEIGHT/ih):ih*max(WIDTH/(iw*sar)\,HEIGHT/ih), crop=WIDTH:HEIGHT" \
  output.mov

where WIDTH and HEIGHT are the final dimensions.

Maybe it's worth adding this as an option in opposition to :preserve_aspect_ratio?

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

1 participant