Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The updated extractor can generate invalid ffmpeg commands (stream copy with filters) and the new settings defaults/constraints risk invalid resolutions and mismatched stated behavior (extension control vs disabled setting).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (5)
Previously missed (3) — in code that hasn't changed since the last review.
server/settings/publish_plugins.py:1038
- Allowing
default_to_widthto be 0 can lead to invalid ffmpeg arguments (e.g.scale=0:...andcolor=...:s=0x...) when instance resolution isn't provided. This should default to a valid width and validate as > 0.
This issue also appears on line 1039 of the same file.
server/settings/publish_plugins.py:1898
- The settings model description says the representation name defaults to the output extension, but the default settings here force
representation_nametoreview_png, changing behavior for projects that don't explicitly override it. If the goal is only to expose the setting without changing defaults, keeprepresentation_nameempty so it falls back to the extension at runtime.
client/ayon_core/plugins/publish/extract_otio_review.py:337 - New settings-driven behavior for
representation_nameisn't covered by the existing tests (they currently assert only the ffmpeg command lines). Add/extend a unit test to assert the created representation uses the configured name when set, and falls back to the extension when empty.
server/settings/publish_plugins.py:1043
- Allowing
default_to_heightto be 0 can lead to invalid ffmpeg arguments (e.g.scale=...:0andcolor=...:s=...x0) when instance resolution isn't provided. This should default to a valid height and validate as > 0.
default_to_height: int = SettingsField(
0,
ge=0,
le=100000,
title="Default height"
client/ayon_core/plugins/publish/extract_otio_review.py:568
- The
-c copybranch can produce an invalid ffmpeg command because this function also adds a-vf scale=...filter forvideo/sequence. ffmpeg does not allow stream copy together with filtering (it will error). With the new normalization (output_extwithout dot), this branch is more likely to trigger for.pnginputs.
# add copying if extensions are matching
if (
input_extension
and self.output_ext.lower() == input_extension.lower().strip(".")
):
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Description
fixes: ynput/ayon-hiero#164
Changes:
ExtractOTIOReviewsettings so user can better control the representation generated from OTIO-based product.Testing notes: