feat: enhance SaveVideo with DynamicCombo for codec-specific options#11940
Draft
christian-byrne wants to merge 4 commits intofeat/advanced-input-parameterfrom
Draft
feat: enhance SaveVideo with DynamicCombo for codec-specific options#11940christian-byrne wants to merge 4 commits intofeat/advanced-input-parameterfrom
christian-byrne wants to merge 4 commits intofeat/advanced-input-parameterfrom
Conversation
Major changes: - SaveVideo now uses DynamicCombo to show codec-specific encoding options - When selecting h264 or vp9, quality and speed inputs appear dynamically - Each codec has unique ADVANCED options (shown in 'Show Advanced' section): - h264: Profile (baseline/main/high), Tune (film/animation/grain/etc.) - vp9: Row Multi-threading, Tile Columns - Quality maps to CRF internally with codec-appropriate ranges - Speed presets map to FFmpeg presets New types: - VideoSpeedPreset enum with user-friendly names - quality_to_crf() helper function This demonstrates both DynamicCombo (codec-specific inputs) and advanced widgets (profile/tune/row_mt/tile_columns hidden by default). Amp-Thread-ID: https://ampcode.com/threads/T-019bce44-e743-7349-8bad-d3027d456fb1 Co-authored-by: Amp <amp@ampcode.com>
Wrap VideoSpeedPreset conversion in try/except to gracefully handle invalid speed_str values instead of raising unhandled ValueError. Logs warning and falls back to None (default) on failure.
Replace silent fallback to libx264 with explicit validation that raises ValueError for unknown codec types. Prevents silent codec substitution.
- Remove redundant pix_fmt assignment (set once instead of in both branches) - Remove unnecessary VideoContainer.AUTO check (format already normalized)
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.
Summary
Enhances the SaveVideo node with dynamic codec-specific encoding options using
DynamicCombo.Depends on: #11939
Changes
SaveVideo Node Enhancements
DynamicCombofor codec selection (auto/h264/vp9)advanced=True):New Types
VideoSpeedPresetenum with user-friendly names (Fastest, Fast, Balanced, Quality, Best)quality_to_crf()helper function mapping 0-100 quality to codec-appropriate CRF valuesVideo Encoding
VideoFromComponents.save_to()andVideoFromFile.save_to()to accept new parameters