Recording video in C# and WPF from mediaElement
My application applies custom HLSL shader effects to a mediaElement using decorators. How can I record and save the modified video using the application itself in realtime? ...
My application applies custom HLSL shader effects to a mediaElement using decorators. How can I record and save the modified video using the application itself in realtime? ...
When playing an MPEG2 video using a WPF MediaElement, the parts of the video that should be black are gray. There is no alpha in the video, and the video has accurate color when played via Windows Media Player or Quicktime Player. Does anyone know what I might be doing wrong, or what codec is recommended to get accurate blacks? I'm more...
Hello guys & gals, I am trying the very simple scenario of binding the DownloadProgress dependency property of MediaElement to the Text of a TextBlock. <StackPanel> <MediaElement x:Name="mediaElement1" Width="500" Height="500" Source="http://ecn.channel9.msdn.com/o9/pdc09/wmv/CL20.wmv" AutoPlay="True" /> <TextBlock Text="{Bindi...
Why don't my media elements fill the screen correctly when I use the UniformToFill stretch? The mediaElement clips at the bottom if the window is wider than the mediaElement, and it clips at the right if the window is taller than the mediaElement. <Window x:Class="WpfApplication1.Window3" xmlns="http://schemas.microsoft.com/winfx/2006/x...
I'm learning C# and WPF by building a WMP-type app. The code below runs fine, selecting a movie from the listbox runs it in the media element. The problem I'm having is finding a way to automatically start the next movie after one ends. Thank You. The xml file that provides a list of movies: <?xml version="1.0" encoding="ISO-8859-1"?> ...
I would like to change song on my MediaElent from track1.mp3 to track2.mp3. And here is the code: MyMediaElement.Stop(); Uri u = new Uri("track2.mp3", UriKind.Relative); MyMediaElement.Source=u; MyMediaElement.Play(); The MediaElement change the source but just wont start. What could possibly be wrong with this code? ...
I'm trying to be able to affect SpeedRatio on a MediaElement whilst having the media play in a continous loop. This is possible through code behind; I can reset the position of the media once it has ended, but that creates a seam in the playback. For seamless playback, I use a MediaTimeline, but when I use I media timeline, I can't c...
I can open a video, play it and get position and set position, but nothing shows up in the video window on one pc. The code works fine a on a couple of PCs, but doesn't work on another. Does any one know or can refer me to what files I need to properly run MediaElement on XP pro. Thanks, Rob ...
I am hosting a MediaElement in a WinForms application, which I would like to play both images and video through. My images and video are set as embedded resources to the application. The MediaElement.Source property only accepts a URI. Any ideas on how to get the MediaElement to play the embedded resourece files without writing them...
I'm trying to get video's to repeat forever using MediaElement. I found the code below at http://msdn.microsoft.com/en-us/library/ms741866.aspx and it works fine. <!-- The MediaElement control plays the sound. --> <MediaElement Name="myMediaElement" > <MediaElement.Triggers> <EventTrigger RoutedEvent...
I see that there is a Markers Property on the MediaElement, but this seems to be available to the Silverlight MediaElement, not the WPF MediaElement? Can you help me with what I'm missing? I'm trying to add Markers to a WPF MediaElement, to play a video and show popups based on the timeline. What should I be using in place of the Missi...
The Windows Media Player control (sitting on a form) can be programmed to play a list of AVI files consecutively, but there is always a delay of a half second or so between the end of one file and the start of the next. Can WPF's MediaElement (or anything else) play a list of AVI's like this so that there is no noticeable delay between ...
Hello, I am trying to play a video in WMV format in a silverlight MediaElement. <StackPanel> <Grid x:Name="LayoutRoot"> <MediaElement x:Name="media" Source="Bounce.wmv" Width="300" Height="300" AutoPlay="True" /> </Grid> </StackPanel> This does nothiing.. but if I change the source attribute to point to some W...
I have a variable MediaElement variable named TestAudio in my Silverlight app. When I click the button, it plays the audio correctly. But when I click the button again, it does not play the audio. How can I make the MediaElement play a second time? None of the tries below to put position back to 0 worked: private void Button_Click_P...
Hi , When I try to play a Audio file , on http severr from silverlight code behind, unable to do so: string mediaFileName = "http://myserverIP/file.mp3"; musicPlayer.Source = new Uri("mediaFileName", UriKind.Relative); LayoutRoot.Children.Add(musicPlayer); musicPlayer.Play(); Now this should play the files easily. I dont understand wh...
Hi, I am trying to set the Media Elements position by following code: MediaElement musicPlayer = new MediaElement(); musicPlayer.Position = new TimeSpan(0, 0, 30); musicPlayer.Source = new Uri(strMediaFileURL, UriKind.RelativeOrAbsolute); LayoutRoot.Children.Add(musicPlayer); To Surprise, musicPlayer.Position...
I am trying to use a MediaPlayer instance to play M4A files. For those of you that aren't familiar, MediaPlayer is the non-XAML version of a MediaElement. There are pretty much the same, but I don't want any XAML, so I use a MediaPlayer instead. Anyways, it plays some M4A files just fine. The NaturalDuration of other M4A files is 0, but ...
Hello. I would like to stream videos that reside at the webserver from within a ExpressionMediaPlayer control. The following results in a network error. I believe that the problem is with my Uri. I have the videos inside the 'ClentBin' folder. Can anyone tell me how this is done? private void videoList_SelectionChanged(object sender, S...
I converted a local sound file to a resource, which built this in my XAML: <UserControl.Resources> <my:Uri x:Key="SoundFiles">file:///c:/Audio/HebrewDemo/Shalom.wav</my:Uri> </UserControl.Resources> I did this by pasting a local disk mp3 filename into source, then clicked on the "dot" by source and chose "Extract Value to Resourc...
Hi, I am trying to create a custom MediaElement , and the 1st thing I need is to inherit it from the MediaElement . But this is simply not happneing when I try to inherit like following: CustomMediaControl : MediaElement { } ...