1
Vote

Stuttering when playing more than 1 video on the same system

description

Hi,
I have the following situation: A PC with 2x8port-graphiccards from matrox, with 16 monitors attached.
If i use my self written apps to play some slideshows, etc. it all works well.
When I play 1 movie or even 2, it still works well. But as soon as I show 3 or 4 movies there are terrible performanceissues.
The video itself is in 1920x1080 and I tried using it in mp4, avi, wmv, etc. with different codecs. Mostly the same problem. The video is only 1,5 seconds in length and repeats in an endless loop.

I tried the analizer from VS2013 and this is what came up:

functions that made the most singleoperations:
d3d9.dll
devenum.dll

slowest path:
WPFMediaKit.DirectShow.Controls.MediaUriElement.<>c_DisplayClass8.<PlayerSetSource>b_6()

When I play this on my NVidia graphicscard with only 2 monitors, it runs smoothly even if I call 8 videos (after that it begins to stutter also ;)).

This is my sourcecode:
XAML:
<controls:MediaUriElement Height="{Binding ElementName=VideoWindow, Path=Height}" 
                          Width="{Binding ElementName=VideoWindow, Path=Width}"
                          UnloadedBehavior="Manual"
                          LoadedBehavior="Manual"
                          Stretch="UniformToFill"
                          VideoRenderer="VideoMixingRenderer9"
                          Loop="True"
                          x:Name="MarketingVideoMediaElement" />
C#:
        public VideoPlayerWindow(IReadOnlyList<string> fileList)
        {
            InitializeComponent();
            Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
            if(fileList.Count > 0)
                ShowMovie(fileList[0]);
        }

        private void ShowMovie(string fileName)
        {
            string filePath = ((App)Application.Current).MyPath + @"\temp" + fileName;
            MarketingVideoMediaElement.Source = new Uri(filePath);
            MarketingVideoMediaElement.Play();
        }
What did I try till now?
  • copied the used videofile temporarily for each screen, so they dont use all the same file
  • set the processor-priority to realtime for the application
  • installed different codecs (lastly the cccp)
  • tried the mediaelement from MS
  • tried both renderer
  • tried different videocodecs, a file that is 60 seconds in length instead of 1,5 (in case that the loop itself would be the problem), and different containers (like avi, a.s.o.)
Is there anything I can do to raise the performance?

comments

Marcel_Gpunkt wrote Jun 10, 2015 at 12:18 PM

It should work with softwarerendering (when you can trust the manufactorer of the graphicscard), but HOW can you do it with the MediaKit? When I use
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
the only thing I get is a blank screen (i.e. the video does not play).
Someone an idea?