Skip to content
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

MediaCapture + WinUI 3 MediaPlayerElement doesn't support same subtype formats as WinUI 2 CaptureElement #9756

Open
whiskhub opened this issue Jun 24, 2024 · 1 comment
Labels
area-MediaPlayerElement bug Something isn't working team-Rendering Issue for the Rendering team

Comments

@whiskhub
Copy link
Contributor

Describe the bug

As CaptureElement is not available in WinUI 3, the official workaround is to use a MediaPlayerElement instead (#4710). This works in most cases, but not all.

Some webcam video subtype formats, which were supported by WinUI 2 CaptureElement, are not supported by the MediaPlayerElement approach in WinUI 3. The video feed just stays blank, and the MediaPlayerElement stays in "Paused" state. This causes problems if some webcams only support the affected video format and can't switch to another one like NV12.

Affected video formats (possibly incomplete): RGB24, UYVY ({59565955-0000-0010-8000-00AA00389B71}), I420 ({30323449-0000-0010-8000-00AA00389B71})

Porting CaptureElement to WinUI 3 would be one solution (#8214) to fix this regression from WinUI 2.

Steps to reproduce the bug

  1. Make sure to have a webcam with one of the unsupported formats connected
    !! You can also install FineCam from the Microsoft Store, which will create a virtual webcam in RGB24 format. Open the FineCam app and press the blue button "start virtual webcam" in the bottom right corner.
  2. Clone and execute WinUI 3 test project from https://github.com/whiskhub/WinUi3_MediaCapture_MediaPlayer_Bug
  3. Select webcam with unsupported subtype (e.g. FineCam with RGB24 subtype format)
  4. MediaPlayerElement stays blank, no video preview

Expected behavior

MediaPlayerElement shows video preview, just as with other subtype formats like NV12; or the CaptureElement from WinUI 2.

Screenshots

The bottom area, where the MediaPlayerElement is, stays blank.
image

NuGet package version

WinUI 3 - Windows App SDK 1.5.4: 1.5.240607001

Windows version

Windows 11 (22H2): Build 22621

Additional context

The Windows Settings app still uses WinUI 2 and a CaptureElement preview in "Bluetooth and devices -> Cameras", where you can also verify that CaptureElement works fine.

@whiskhub whiskhub added the bug Something isn't working label Jun 24, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jun 24, 2024
@codendone codendone added area-MediaPlayerElement team-Rendering Issue for the Rendering team and removed needs-triage Issue needs to be triaged by the area owners labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-MediaPlayerElement bug Something isn't working team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

2 participants