wpf icon indicating copy to clipboard operation
wpf copied to clipboard

MediaElement does not work with AV1 Video Extension 2.0.4.0/1.3.20.0

Open WHYBBE opened this issue 2 months ago • 5 comments

Description

MediaElement does not work with AV1 Video Extension 2.0.4.0/1.3.20.0.

Version 1.3.4.0 is normal.

Reproduction Steps

<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="clr-namespace:WpfApp1"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Title="MainWindow"
        Width="800"
        Height="450"
        mc:Ignorable="d">
    <Grid>
        <MediaElement Source="C:\Users\Y\Downloads\01 3d-background-1.mp4" />
    </Grid>
</Window>

Expected behavior

The AV1 video can be played normally using the MediaElement.

AV1 Video Extension

  • 2.0.4.0
  • 1.3.20.0

Actual behavior

The video shows as blank when playing with MediaElement.

Regression?

No response

Known Workarounds

  • Use K-Lite Codec Pack
  • Use AV1 Video Extension 1.3.4.0 and lower(But it will update automatically.)

Impact

No response

Configuration

No response

Other information

Sample AV1 Video: https://github.com/user-attachments/assets/bef8d29d-5ab8-47c3-81bd-2857b7c4e7c7

It seems that it can be verified directly using Windows Media Player Legacy.

WHYBBE avatar Sep 20 '25 07:09 WHYBBE

@WHYBBE I think it's the WMP (Windows Media Player) 's issues, not the WPF's issues.

lindexi avatar Sep 22 '25 03:09 lindexi

Haha, I know. But I still hope that someone from the WPF team can directly communicate with other teams at Microsoft. After all, WPF is still not functioning properly.

WHYBBE avatar Sep 22 '25 03:09 WHYBBE

@WHYBBE You are right. It is meaningful to report here.

By the ways, what do you think of using VLC ?

lindexi avatar Sep 22 '25 03:09 lindexi

@WHYBBE You are right. It is meaningful to report here.

By the ways, what do you think of using VLC ?

I previously tried some methods to use other players in WPF, but they were neither simple enough nor highly stable, and there were always some minor problems. The MediaElement in WPF is simple and efficient enough.

WHYBBE avatar Sep 22 '25 03:09 WHYBBE

I would suggest you file feedback for Windows using the Feedback Hub.

miloush avatar Sep 22 '25 07:09 miloush

@WHYBBE recommend a third-party library:Flyleaf

LazyCuteLion avatar Nov 17 '25 06:11 LazyCuteLion

@WHYBBE recommend a third-party library:Flyleaf

I've used it. It's more modern than MediaElement, but I need to use a VisualBrush to duplicate a player, and it seems Flyleaf doesn't work that way.

WHYBBE avatar Nov 17 '25 06:11 WHYBBE

Yes,Flyleaf does not support VisualBrush,but if you use the VisualBrush to multi-view,maybe you can write your own Shader code to achieve that. Here perhaps one can refer to...

LazyCuteLion avatar Nov 17 '25 07:11 LazyCuteLion

@WHYBBE Add video to VisualBrush may cause performance issues.

VisualBrush will render twice in WPF gfx (WPF render engine).

lindexi avatar Nov 17 '25 07:11 lindexi

@WHYBBE Add video to VisualBrush may cause performance issues.

VisualBrush will render twice in WPF gfx (WPF render engine).

I understand, but this performance loss is acceptable. And it's the simplest method to simultaneously play multiple videos, apply custom shaders, and maintain synchronization.

WHYBBE avatar Nov 17 '25 07:11 WHYBBE

Yes,Flyleaf does not support VisualBrush,but if you use the VisualBrush to multi-view,maybe you can write your own Shader code to achieve that. Here perhaps one can refer to...

It seems worth a try, looks like a great solution.

WHYBBE avatar Nov 17 '25 07:11 WHYBBE

@WHYBBE Hi,here's a demo

LazyCuteLion avatar Nov 22 '25 04:11 LazyCuteLion

@WHYBBE Hi,here's a demo

Sorry, I might not have expressed myself clearly. I do know how to apply Shaders to MediaElement, because my requirement is to copy several MediaElements and apply different Shaders to each one, in order to achieve a comparison of different video effects.

What I want to know is whether Flyleaf supports the use of Shaders to fulfill my requirement.

By the way, the small example you provided is very good; it's an excellent introductory example for WPF Shaders.

WHYBBE avatar Nov 28 '25 09:11 WHYBBE