1

I am using WPF mediaement to play video, so basically my app is downloading the video from server and stored in local system path. I will get a event then I will fetch the video using path and play in mediaement.

xaml

 <MediaElement x:Name="MediaElementPlayer"/>

.cs code

 System.Drawing.Rectangle resolution = System.Windows.Forms.Screen.PrimaryScreen.Bounds;
 MediaElementPlayer.Width = resolution.Width;
 MediaElementPlayer.Height = resolution.Height;
 MediaElementPlayer.LoadedBehavior = MediaState.Play;
 MediaElementPlayer.Source = new Uri(videoPlayerModel.videoSourcePath);
                            

Here I am facing a lag issue when I use video resolution more then 8k , below 8k all video are working fine. Please let me know if something is going wrong here.

Doge
  • 23
  • 3
  • your hardware is probably not fast enough to support videos in higer resolution. What does the taskmanger tell you regarding CPU / GPU / RAM? – Denis Schaf May 04 '23 at 08:35
  • I can observe GPU is 60% free , CPU is 40% and ram 55% free – Doge May 04 '23 at 09:21
  • there might be further limitation, eventually your maxing out your hardware decoder or has short bursts in GPU usage that slow down you machine – Denis Schaf May 04 '23 at 10:55

0 Answers0