MediaPlayer color space handling

vansa 41 Reputation points
2022-04-20T12:26:17.977+00:00

I have a question regarding the color space handling because I can't find any information about it. Does the MediaPlayer handle color space automatically (e.g. Rec709)? Is there an API to get the color space or pixel format?

Universal Windows Platform (UWP)
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,061 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,826 Reputation points
    2022-04-21T08:05:40.057+00:00

    Hello,
    Welcome to Microsoft Q&A!

    Does the MediaPlayer handle color space automatically (e.g. Rec709)? Is there an API to get the color space or pixel format?

    I have to say there is no such api for medaplayer to get current video's color space or pixel format, but you could use other way to approach, such as custom video effect. You could get each frame from ProcessFrame method, it has SoftwareBitmap where in context.InputFrame, then you can get BitmapPixelFormat property from SoftwareBitmap.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments