mediaelement

Link Media Element on WPF with Label and Slider

依然范特西╮ 提交于 2020-01-06 23:02:03
问题 I have linked the import button with a media element so i can get the song to play. // Create OpenFileDialog Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); // Set filter for file extension and default file extension dlg.DefaultExt = ".txt"; dlg.Filter = "WAV Files (*.wav)|*.wav|MP3 Files (*.mp3)|*.mp3|MP4 Files (*.mp4)|*.mp4|WMA Files (*.wma)|*.wma|SWA (*.swa)|*.swa"; // Display OpenFileDialog by calling ShowDialog method Nullable<bool> result = dlg.ShowDialog(); /

Link Media Element on WPF with Label and Slider

狂风中的少年 提交于 2020-01-06 23:00:18
问题 I have linked the import button with a media element so i can get the song to play. // Create OpenFileDialog Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); // Set filter for file extension and default file extension dlg.DefaultExt = ".txt"; dlg.Filter = "WAV Files (*.wav)|*.wav|MP3 Files (*.mp3)|*.mp3|MP4 Files (*.mp4)|*.mp4|WMA Files (*.wma)|*.wma|SWA (*.swa)|*.swa"; // Display OpenFileDialog by calling ShowDialog method Nullable<bool> result = dlg.ShowDialog(); /

Windows Phone 7 - Playing streaming video

爷,独闯天下 提交于 2020-01-04 06:13:10
问题 On WP7 platform (using C# and Silverlight) I try to play an online stream into a MediaElement... Here is the C# code: (...) WebClient wc = new WebClient(); wc.OpenReadCompleted += (s, e) => { try { mediaElement.SetSource(e.Result); } catch (Exception we) { System.Diagnostics.Debug.WriteLine(we.Message); } }; wc.OpenReadAsync(new Uri(url, UriKind.Absolute)); (...) Here is the XAML source code: <MediaElement Height="316" HorizontalAlignment="Left" Margin="6,6,0,0" Name="mediaElement"

Is there a way to get frame number in Silverlight MediaElement object? [duplicate]

浪尽此生 提交于 2020-01-03 06:40:08
问题 This question already has an answer here : Closed 8 years ago . Possible Duplicate: silverlight media player with frame counter We want to know whether we can get frame number? 回答1: If you know the frames per second (FPS) then you multiply the FPS times the position in the media. MediaElement does not have a way to directly query the FPS. 来源: https://stackoverflow.com/questions/3193989/is-there-a-way-to-get-frame-number-in-silverlight-mediaelement-object

Issue using WPF MediaElement with HD (H.264, 720P) Video

这一生的挚爱 提交于 2020-01-03 03:17:46
问题 I am using media element to render video in WPF. All videos are working fine except H.264 videos. They have some stuttering problem while they are rendered on screen. My machine configuration is much more than the recommended requirement to play for this video. Another surprising fact is that the video renders perfectly fine when I play this in Window Media Player or any other player. Any solution or any alternative to MediaElement? 回答1: WPF does not support H.264 videos 回答2: You can try my

Start and stop MediaElement at specific times

微笑、不失礼 提交于 2020-01-01 14:56:08
问题 I am change an app over to WPF, it plays audio and video and pictures all based on timed events .. I used "string MciCommand = string.Format("play frames FROM {0} to {1} {2}"" , before. I have been searching and trying to fix this problem now in WPF c# I have a video (wmv) and I have multiple sections that need to be played together. example .. section1 start(200ms) stop(250ms) section2 start(5000ms) stop(15000ms) finally I need it to pause on a a still frame .. I have tried using a timer,

Rendering not working with MediaElement windows RT

会有一股神秘感。 提交于 2019-12-31 05:17:12
问题 I need to take thumbnail from Video playing with MediaElement For this i learn there is RenderTargetBitmap in windows 8.1 API RenderTargetBitmap a = new RenderTargetBitmap(); await a.RenderAsync(myMedia); thumb.Source = a; and second way i got with help of WinRTXamlToolkit.Composition toolkit which do rendring with WriteableBitmapRenderExtensions class WriteableBitmap w = await WriteableBitmapRenderExtensions.Render(myMedia); thumb.Source = w; Both these methods are working with all UIElement

How to check what version of Windows Media Player is installed on the machine?

人盡茶涼 提交于 2019-12-29 08:09:33
问题 As far as I know Windows Media Player 10 is the minimum requirement for WPF MediaElement to work. What is a decent way to programmatically (from .NET) check if WMP is present, and its version? 回答1: The method I used in my installer is to check this registry value: HKLM Software\Microsoft\MediaPlayer\PlayerUpgrade PlayerVersion The PlayerVersion value will be set to a string like "10,0,0,0". (Note that commas, not periods, are used to separate the numbers.) You need to extract the first number

WPF: MediaElement doesn't display at runtime

ⅰ亾dé卋堺 提交于 2019-12-24 16:14:30
问题 This concerns WPF. The problem is that my MediaElement (actually a GIF) doesn't show up at runtime (so I only get an empty screen), even though it shows perfectly in the design mode. Before citing the code I note the following: The GIF-file in question has been added to the solution. Its BuildAction property is set to Resource (I've checked). When I replace the MediaElement by an Image element (and either use the same GIF-file or replace that source-file by a .png file), the image/GIF does

How to create video with overlays in UWP?

喜欢而已 提交于 2019-12-24 10:28:18
问题 I'm using MediaComposition to create an edited video. The composed video will be: One video clip A set of images (overlay frames) that should be shown on top of it. The result should be like this: https://www.youtube.com/watch?v=cFEkkQIYGBc My current code looks like this. Each frame is an abstraction of the overlay image. I called it frames private async Task ExportFrames(IEnumerable<OverlayFrame> frames, IStorageFile inputFile, IStorageFile outputFile) { var folder = await ApplicationData