PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Add missing codec detection and warning message in video preview

Open lei9444 opened this issue 7 months ago • 4 comments

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 GetMissingCodecAsync to detect unsupported video formats using MediaEncodingProfile and CodecQuery.
  • 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

image

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
  • [ ] 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):

  1. Check if the AV1 extension is installed:
    Get-AppxPackage -Name *AV1*
    
  2. If installed, remove it:
    Get-AppxPackage -Name *AV1* | Remove-AppxPackage
    
  3. Use Peek to preview a video encoded in AV1 format.
  4. Confirm that a warning message is shown indicating the missing codec.

lei9444 avatar May 26 '25 07:05 lei9444

/azp run

lei9444 avatar May 26 '25 14:05 lei9444

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar May 26 '25 14:05 azure-pipelines[bot]

/azp run

lei9444 avatar May 27 '25 00:05 lei9444

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar May 27 '25 00:05 azure-pipelines[bot]

New UI looks good to me :)

cinnamon-msft avatar Jun 05 '25 16:06 cinnamon-msft