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

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

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

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :WPF
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...

View Complete Post

More Related Resource Links

How to play wmv file is stored in ftp server using MediaElement?

Hello, I have a ftp server to store wmv files (with username and password). MediaElement can play a local wmv file well, but when I change the uri to access a file in ftp server (ftp://abc.serveftp.net/Assets/sample.wmv) and media element cannot play this file, I try to use Window Media Player installed on my machine to open a wmv file manually and that's ok, I think it is possible for MediaElement can play wmv throught ftp. How can I do that? Thank you for your answer. string sourceFile = "ftp://abc.serveftp.net/Assets/sample.wmv"; mediaElement.Source = new Uri(sourceFile);

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}

Play video


Hi to all 

 I have asp.net 2.0 & VS 2005. I want to play a video file in my web application, is there any control for this else help me how to play video in browser. Is this complex ?

How to take a snapshot pic from a (.mp4/.3gp) video file ?


Hello there,

I need some help with video embedding in ASP.NET. So I am developing a litle custom blog and I need users to upload Quick Time videos (.mp4,.3gp) but I also need when upload completes to take a snapshot from the uploaded video which should be used as a link to a page that plays the video, in other words I need to take a frame from this video file... Do you have any idea how this is possible??

Thanks in advance

Video: SharePoint 2010 File System

This video describes the SharePoint 2010 file system and integration with Visual Studio 2010. (Length: 3:23)

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?

How to import MOD video file to windows movie maker (WMM)?

MOD to windows movie maker converter is one of the most efficient converting program for your to convert MOD file to windows movie maker compatible format—WMV, AVI, MPG so that you could import MOD to windows movie maker for editing MOD with WMM without difficulty. People may encounter many problems about MOD and windows movie maker •1. I have an Everio JVC hard disk drive (meaning no tape needed) and the Windows movie maker says it doesn't support "The file F:\SD_VIDEO\PRG003\MOV0CD MOD is not a supported file type, and it cannot be imported into Windows Movie Make". •2. Hey I just got this video Camera with a hard driver build in, and it makes all the movie files in MOD files, but how do I convert them so I can put them into Windows Movie maker? •3. I have MOD video files on an sd card that I am trying to open and edit with windows movie maker. It shows the video but there is no sound from the files. Please help. The main reason for movie maker not being able to recognize MOD A MOD video file is used by some models of Panasonic, JVC, Canon and perhaps other camcorders and windows movie maker does not support MOD. That is why you are having problems. Windows movie maker is quite friendly to WMV, AVI and MPG format. MOD to windows movie maker converter is the best software to change MOD files extension for importing MOD to windows movie maker Ap

Embed Video File in Crystal Report

Hi to All I am new to crystal reports. I need to embed Video file in crystal report. Help will be appreciated.Rajeev Singh Chibrajeev16mca2k5@gmail.com

No sound when playing MPEG video in MediaElement

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

Use SharePoint 2010 to different video file types

Hi all,

I am new to SharePoint 2010 and have one question on Asset Libraries.

Asset Libraries is a new library type in SharePoint 2010. They are designed to hold media such as pictures and videos. We can upload a Windows Media Video (WMV) file to our Assets Library. However, can I upload other video types like MP4, flash or others?
If yes, how can I do that?
If no, are there any workaround for it?

Thanks in advanced.

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.   

No able to play the .swf file which embedded in web page on Window CE platform


Hi ,

I have developed a web page which embedded the .swf file. I'm able to open up the page and play the .swf file on normal window platform. But when I tried to browse the page thru the mobile device [Window CE 6.0 platform] the web page was open up but the .swf was not show. It just shown X sign on the page only.

Can someone tell me how to overcome this problem...Thanks....

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ParallelParking.aspx.vb" Inherits="MllpPortal.ParallelParking" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

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=

how to upload video in sql2005 and how to retrieve it and play in windows media player



i am developing web portal, which suppose to upload video in sql2005 and should be able to retrieve that video on request

and play in aspx page with windows media player.


Trying to write google video sitemap xsd file


I'm trying to write a gogole video sitemap xsd file, to auto generate video sitemaps.

There is a prefix for the video section <video:video> that I can't seem to get. I get <tns:video> instead

I think it's a namspace issue or I need to add a prefix?

This is my source

<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid XML Studio - FREE Community Edition (http://www.liquid-technologies.com)-->
<xs:schema elementFormDefault="qualified" targetNamespace="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xs="http://www.w3.org/2001/XMLSchema">
            XML Schema for Video Sitemap files. Last Modifed 2010-10-05
  <xs:element name="urlset">
        <xs:element minOccurs="0" maxOccurs="unbounded" name="url">

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?


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