fix: keep video movflags scoped to container#14787
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (2)**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
**⚙️ CodeRabbit configuration file
Files:
⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📚 Learning: 2026-02-21T14:01:41.482ZApplied to files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughChangesThis change modifies how PyAV container write options are configured when saving video output. The Sequence Diagram(s)See hidden artifact diagram above. Related Issues: Not specified in provided context. Related PRs: Not specified in provided context. Suggested labels: bug, video, tests Suggested reviewers: Not specified in provided context. Poem 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #14755.
VideoFromComponents.save_to()was passingmovflags=use_metadata_tagsthrough PyAV's globaloptionsargument. PyAV appliesoptionsto the container and streams, so the AAC encoder can seemovflagswhile opening the audio stream and reject it.This switches the shared write kwargs helper to
container_options, then hasVideoFromComponents.save_to()use that same helper instead of keeping its ownav.open()kwargs. That keeps metadata tags on the MP4 container without leaking the flag into stream codec options.Tests:
uv run --with-requirements requirements.txt --with-requirements tests-unit/requirements.txt pytest tests-unit/comfy_api_test/video_types_test.py -quv run --with ruff ruff check comfy_api/latest/_input_impl/video_types.py tests-unit/comfy_api_test/video_types_test.pypython3 -m py_compile comfy_api/latest/_input_impl/video_types.py tests-unit/comfy_api_test/video_types_test.pygit diff --check