.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

No sound when playing MPEG video in MediaElement

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :WPF
Hi, I am writing a multimedia centre using the WPF MediaElement control, the project is very mature and going really well. However I get no audio when my player plays a .MPG file. I have tried installing lots of different codec packages on my test machine but to no avail. The same files have audio when loaded in WMP but not in my WPF application. I am developing on an XP machine and on that I get sound, but on my target machine, Windows 7, no sound! Other formats such as AVI etc do not have this problem. Any ideas? Thanks in advance

View Complete Post

More Related Resource Links

how do you detect which video format can be played in a wpf mediaelement?

how do you detect which video format can be played in a wpf mediaelement?

Playing video files in sharepoint

I uploaded Media file in sharepoint site. When click on video file, Windows media player open in my machine and got an error saying "Windows media player encountered a problem while playing a file". I have the same file in my local machine. It is playing fine. Only I have from sharepoint site.   Can some explain and solve the problem please? ItsMeSri

How to play a .mp4 video file with WPF (mediaelement) ?

I would like to play a .mp4 with WPF.Does anybody know how can I accomplish it?It can play wmv but when I try to play a .mp4 it doesn't show anything. It's strange because the Blend designer shows the first frame of the .mp4 video in the mediaelement.I can play the video with Windows Media Player...Waiting for an aswer...

Playing video's in an asset library

Hi, I've got an asset library with a bunch of video's in it. The aim is to get the videos playable in the browser. I see two possible ways to do this ootb with SharePoint 2010: a) create a corresponding publishing page for each video, add a media player web part and connect it to the video. As far as i can determine it appears as though you can't dynamically switch the source of the webpart so you need multiple webparts/pages to display all the videos, which i find abit messy. b)use the option built into the asset library where when you hover over a video you get the option to play. This method fits perfectly however when i click play, the video player stretches the video and distorts it (and also makes it run more sluggishly), and i can't seem to find a way to tell it what size to play the video at. I've used a 'Video' content type and set the 'Frame Height' and 'Frame Width' fields however it doesn't change anything. So there are 2 questions: 1) Is there any way to control the size of the player launched from the asset library? 2) Is it possible to dynamically change the source of media player webpart? e.g. webpart connection to an asset list or something along these lines?   Thanks in advance

Showing Video file in a MediaElement


Dear all,

I am trying to ceollect a Video file and then display the first frame of the video in a container

The dataTemplate I use is as follow :

 <DataTemplate x:Key="<strong>LibraryItemTemplateVideo</strong>" DataType="{x:Type vm:VideoMedia}">
      <Viewbox Stretch="Uniform">
        <MediaElement Source="{Binding Path=FullName}

Video formats Supported by Mediaelement in WPF


Hi ,

 I am trying to devolep a WPF applciation which will render LIVE video. The data for the Video comes through TCP/IP from the Firmware end and is of "RAW YUV format". Can i render this using a mediaelement?

If Yes please guide me further down. Thanks in advance.

duplicate video to multiple mediaelement

I have xpab (partial trust) application with multiple initialized pages. Each of these pages includes an mediaelement with a backroundvideo. Is it possible to load the sourcevideo only once? I would like to do something like this: page1mediaelent = publicMediaelement, page2mediaelent = publicMediaelement . . . pageNmediaelent = publicMediaelement.  I cannot afford to download the same wmv video n times.   

MediaElement - Video freeze after Ctrl+Alt+Delete is pressed



Why do my video frozen when I do Ctrl+alt+delete and go back to the WPF application? Any idea?

string videoSource = "somevideofile";
MediaElement HomePageVideo;

void init()
  HomePageVideo.Source = new System.Uri(videoSource);

  HomePageGrid.IsEnabled = true;
  HomePageGrid.IsHitTestVisible = true;
  HomePageGrid.Opacity = 1;
  HomePageGrid.Visibility = Visibility.Visible;


void play()
   HomePageVideo.Position = new TimeSpan(0, 0, 18);

<Grid Name="HomePageGrid" Visibility="Hidden" Background="Black" Opacity="0">
  <MediaElement Name="HomePageVideo" Width="1280" Height="720" LoadedBehavior=

Microsoft WPF options for playing HD Video?

I'm writing a WPF app that needs to play HD video. As others have found MediaElement does not cope easily with HD. Windows Media Player on my machine plays the (.wmv) HD file smoothly and GraphEdit plays the file smoothly both by default and when I use EVR.

When using GraphEdit with both renderers my CPU barely goes above 30%.

When I play this video in my WPF app I barely get 3fps and it's simply unusable. I get similar non-performance when using MediaPlayer.

I know there's WPF MediaKit but, no offense to Jeremiah, I'd rather not use a solution built by individuals for a core part of this application. I'm also looking at the WMP control but MediaElement/MediaPlayer fits so nicely in with data binding and with MVVM.

What is it that's causing the MediaElement to perform so badly, and is there anything that can be done about it?

WPF issues playing WMV video in Internet app

I have a WPF website app. I loaded a mediaelement and played a WMV video. I published the website but I can only see the video play from my machine via the website. I suspect it's just playing off the local drive? From any other computer it simply doesn't play, no errors.

WPF save streamed video using MediaElement


I would like to stream videos, and save it to the hard disc using WPF MediaElement. 
For example, I'm using this code to play a video from the net:   
<MediaElement Source="http://some.url/video.wmv" />
I need to save somehow streamed media file to the hard disc.
Can anyone tell me how this is done?


Video (application/x-oleobject) not playing in Firefox,Chrome and Opera



I have a WebForm in which I need to play a video file (wmv, mpg or mpeg). Here is my code:

<object id="vid" width="320" height="240" 
style="position:relative; left:10;top:10;"
<param name="URL" value='<%=Session["videourl"]%>'/>
<param name="SendPlayStateChangeEvents" value="True" />
<param name="AutoStart" value="False" />
<param name="uiMode" value="full" />
<param name="PlayCount" value="9999" />

This works well in Internet Explorer. I get the little media player with its controls(play, stop, pause etc) and everything works fine. However, in Firefox (3.6.12), Opera, Chrome, I don't get anything, just a blank space where the media object should appear.

I did some googling and... the problem should be that, the object is an ActiveX control and only IE supports ActiveX, so thats why it only shows in IE. Well, can anyone give some suggestions to make this work in any browser (Firefox, Chrome, Opera)

TreeSelector : playing with generics and type inference

create a generic way to define a selection starting from a tree of objects, the most simpler way as possible.

Let's start with the beginning...
Here is a very simple little interface defining a node of the tree, basically, a value and the references to the child nodes.

Playing with Linq grouping: GroupByMany?

One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier.

MOSS 2007 Tutorials video

This link about how create sharepoint website ,blogs,team site,document lib etc

How to Encrypt and Decrypt a Password using SQLSERVER 2005?(Video)

Encypt and Decrypt a Password using SQLSERVER 2005(Video)

SQL Server Backup and Restore (video)

Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend