2

It works fine with *.mp4 files, but i can't run any *.wmv or *.avi file.

This is what my XAML looks like:

<MediaElement x:Name="mediaElement" Margin="0" Source="C:\Users\Public\Videos\Sample Videos\Natur.wmv" Volume="1"/>

What i tried is:

  • trying different *.wmv or *.avi videos, but i can't play any of them.

  • *.mp4 work fine.

I have Windows Media Player version 12 (cause 10+ is recommended for using MediaElement) and i can play all those videos without any problems in Windows Media Player.

AlpakaJoe
  • 533
  • 5
  • 24
  • 2
    MediaElement doesn't have support for the wide range for formats. you can use any vlc plugin for .net. they are also available for WPF specifically. you will need to have vlc player installed on your machine. (https://github.com/ZeBobo5/Vlc.DotNet) – Mujahid Daud Khan Oct 02 '18 at 09:38
  • @MujahidDaudKhan i will give that a try, thanks. What formats are supported in MediaElement? Is it only *.mp4? – AlpakaJoe Oct 02 '18 at 10:04
  • Google is your friend btw https://stackoverflow.com/questions/28394220/what-formats-does-the-mediaelement-support – Mujahid Daud Khan Oct 02 '18 at 10:19
  • as long as they collect my data unsolicited, DuckDuckGo is more my friend ;) – AlpakaJoe Oct 02 '18 at 10:28

0 Answers0