web-stories-wp
web-stories-wp copied to clipboard
Video Optimization: Cropping
Feature Description
We should be able to cut off-screen parts of videos upon request (cropping the visible parts of the image).
Example use cases:
- A video element is partially off canvas
- Video is scaled/zoomed in the editor
Alternatives Considered
Additional Context
https://ffmpeg.org/ffmpeg-filters.html#crop
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria
Implementation Brief
Is this possible with ffmpeg.wasm? I can't see options in the docs for this. I may have missed it.
Yes, ffmpeg supports cropping: https://ffmpeg.org/ffmpeg-filters.html#crop
To confirm, we mean, cropping the image or cropping the video length? Or both?
Cropping the visible image.
Cropping the length (trimming) is something for waay in the future.