.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

Showing Video file in a MediaElement

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :WPF

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} 

View Complete Post

More Related Resource Links

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...

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

Excel file not showing in search results

We have a strange issue. I have one Excel document (or at least one that I am aware of) that will not show up in search results for content within the document. I can find the document by title just fine, but when I search for words within the document I do not see it. The document was originally a 2003 Excel document and was recently converted to 2007. Other than that there isn't really anything unusual about it (some formatting stuff, but mainly just background colors and whatnot, nothing fancy). The crawl log shows the document was crawled without error. Anyone know anything else I can check on?

Video: SharePoint 2010 File System

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

Showing WebCam Video in WPF

Hello all, Does anyone have any good links/references to showing WebCam video in a WPF application? All I need to do is show the video, any capture/manipulation is just candy.  The web sites I've found so far seem to use less then desirable methods (e.g., getting info from the clipboard) or use pre-compiled no-name DLLs. Any help is appreciated!

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

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);

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.   

SQL Server 2008 R2 Disk Usage report showing incorrect data file


When I go to ANY database (System, AdventureWorks*, user) in Managemant Studio, I right-click on the db, select Reports, select Standard Reports, and select Disk Usage.  The disk usage report shows the correct db on top, but always only shows AdventureWorks_Data.mdf when I expand Disk Space Used by Data Files section.  This happens to any db I try.  When I look at Database Properties/Files for that database, the logical and physical file names are correct.

Since the correct files appear in Database Properties/Files, I'm hoping it's just a bug in the report.  Same thing happens if I run a Disk Usage by Table report for ANY database,  The tables for AdventureWorks always only appear,

Thanks,  Mike

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=

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