-
Notifications
You must be signed in to change notification settings - Fork 84
[ViPPET] Simplify encoded video output configuration (auto-select CPU/GPU encoder) #1642
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
Conversation
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.
Pull request overview
This PR simplifies ViPPET's encoded video output configuration by removing explicit encoder device selection from the API. The system now automatically selects an appropriate encoder (GPU or CPU) based on the pipeline's capabilities, specifically by detecting VAAPI memory caps in the pipeline graph.
Changes:
- Removed
encoder_deviceconfiguration from the API and replaced it with automatic encoder device selection - Simplified encoder selection logic to use device type constants (CPU/GPU) instead of complex device configurations with GPU ID parsing
- Updated tests to reflect the simplified API and validate the new automatic encoder recommendation logic
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| video_encoder.py | Removed GPU ID parsing logic and multi-GPU encoder configurations; simplified to CPU/GPU constants |
| video_encoder_test.py | Updated tests to remove GPU selection tests and use simplified encoder device constants |
| pipeline_manager_test.py | Removed encoder_device specifications from test configurations |
| graph_test.py | Added comprehensive tests for the new automatic encoder device recommendation logic |
| tests_test.py | Removed assertions checking encoder device configuration fields |
| pipeline_manager.py | Added call to get_recommended_encoder_device() when video output is enabled |
| graph.py | Implemented get_recommended_encoder_device() to automatically select encoder based on VAMemory caps |
| tests.py | Updated API documentation to remove encoder_device parameter |
| api_schemas.py | Removed EncoderDeviceConfig schema and encoder_device field from VideoOutputConfig |
| vippet.json | Updated OpenAPI specification to remove encoder device configuration from all examples and schemas |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tools/visual-pipeline-and-platform-evaluation-tool/vippet/video_encoder.py
Show resolved
Hide resolved
Co-authored-by: Krystian Taube <[email protected]> Co-authored-by: Dariusz Lemiech <[email protected]>
Description
This PR simplifies Vippet’s encoded video output configuration by removing explicit encoder device selection from the API and instead choosing an appropriate encoder device automatically based on the pipeline’s caps (notably VAAPI memory caps).
What Changed
OpenAPI / docs updates
video_output.encoder_devicefrom request examples and descriptions.EncoderDeviceConfigschema from the API.Automatic encoder device selection
video/x-raw(memory:VAMemory)→ GPU encodervideo/x-rawcaps node exists) → CPU encoderGraph.get_recommended_encoder_device()and used when preparing pipelines with video output enabled.VideoEncoder interface simplification
CPU/GPU) rather than a structured device config (no GPU id parsing).Tests updated
User-Facing Impact
{ "video_output": { "enabled": true } }Breaking Change
video_output.encoder_deviceis removed.encoder_devicemust be updated to omit it.Checklist: