-
Notifications
You must be signed in to change notification settings - Fork 1
Add animated WebP from video guidance to video-transformations reference #19
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,6 +62,29 @@ c_fill,h_300,w_450/du_5/fl_splice,l_video:second_clip/c_fill,h_300,w_450/du_5/fl | |
|
|
||
| **Important:** Both videos should be resized to matching dimensions before splicing | ||
|
|
||
| ## Animated WebP from Video | ||
|
|
||
| To deliver an animated WebP from a video, use **one** of these valid combinations: | ||
|
|
||
| **Path A (simplest):** `f_auto:animated` — sufficient on its own; no extension or fl_ flags required. | ||
| ``` | ||
| du_5/f_auto:animated/q_auto # First 5 seconds as animated WebP (or GIF where unsupported) | ||
| du_5/e_loop/f_auto:animated # Looping animated WebP | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The looping example omits q_auto but the non-looping example above includes it. Is this intentional? If not, worth adding for consistency so it doesn't imply quality optimization doesn't apply when looping. |
||
| ``` | ||
|
|
||
| **Path B:** `fl_animated,fl_awebp` together, **plus** a WebP delivery signal (`f_webp`, `f_auto`, or `.webp` extension): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The top of this file (line 12) says "Always use f_auto:video or a specific video format plain f_auto may return an image thumbnail." Path B on line 78 uses bare f_auto as a valid WebP signal. These two rules look contradictory without explanation. Something like "bare f_auto is valid here because fl_awebp already constrains output to animated WebP" |
||
| ``` | ||
| du_5/fl_animated,fl_awebp/f_webp/q_auto # Animated WebP via fl_ flags + f_webp | ||
| du_5/e_loop/fl_animated,fl_awebp/f_auto # Looping, with f_auto as WebP signal | ||
| ``` | ||
|
|
||
| **WRONG — these do NOT produce animated WebP:** | ||
| - `fl_animated` alone (missing `fl_awebp`) | ||
| - `fl_animated,fl_awebp` with no format parameter and no `.webp` extension | ||
| - `f_auto` alone with a `.webp` extension (returns a still frame, not animated) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. f_auto appears as valid in Path B (line 78) and invalid in the WRONG list here. |
||
|
|
||
| **Additional controls:** `e_loop` makes it loop; `vs_N` controls frame sampling rate; `dl_N` controls frame delay (milliseconds). | ||
|
|
||
| ## Common Video Patterns | ||
|
|
||
| ``` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f_auto:animated delivers WebP only when the client sends a WebP Accept header. It falls back to GIF otherwise. Worth adding a note here so it's clear this isn't a guaranteed WebP delivery path.