PowerToys
PowerToys copied to clipboard
Add missing codec detection and warning message in video preview
Summary of the Pull Request
This PR adds support for detecting missing video codecs during video file preview, and displays a warning message to inform the user when the required codec is not installed.
Changes
- Added
GetMissingCodecAsyncto detect unsupported video formats usingMediaEncodingProfileandCodecQuery. - If a required codec is missing, display a warning in the preview UI.
- Added localized string
MissingVideoCodec_WarningMessage:"This video uses the {0} format, which isn't supported. Please install the required codec to play it."
- Add Store Search
PR Checklist
- [x] Closes: https://github.com/microsoft/PowerToys/issues/39235, https://github.com/microsoft/PowerToys/issues/38201
- [ ] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
- [ ] Tests: Added/updated and all pass
- [x] Localization: All end user facing strings can be localized
- [ ] Dev docs: Added/updated
- [ ] New binaries: Added on the required places
- [ ] JSON for signing for new binaries
- [ ] WXS for installer for new binaries and localization folder
- [ ] YML for CI pipeline for new test projects
- [ ] YML for signed pipeline
- [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
To simulate a missing codec (e.g., AV1):
- Check if the AV1 extension is installed:
Get-AppxPackage -Name *AV1* - If installed, remove it:
Get-AppxPackage -Name *AV1* | Remove-AppxPackage - Use Peek to preview a video encoded in AV1 format.
- Confirm that a warning message is shown indicating the missing codec.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
New UI looks good to me :)