24/7 Video Player in WPF
I'm having a problem with creating 24/7 video player for my application on WPF and .NET Framework 4.0. Application shall run on kiosk and displays video clips from my playlist in a loop.
The problem is that after about 8 - 24 hours of continues playback the video frame freezes. Application does not raise any exception and continue work in normal mode: sound from video is played, video files are changed but the screen does not change. I have been tried WPF MediaElement control and WPFMediaKit MediaUrlElement. All tests have been done on Windows 7 (x32 and x64).
I have been tried play my playlist in a Windows Media Player 11 and it does not freeze after a few days of playback.
I have been using media files with different codec (mp4 H.263, .flv, .avi, .mkv, .wmv). I’m using K-Lite Codec Pack Standard on all machines. Does anybo开发者_运维技巧dy know what the problem with video renderer in Windows 7 or Framework .NET 4.0 and how to find workaround for it?
Instead of continuously playing the playlist in a loop, you might try clearing and re-assigning the source to the mediaelement or creating a new mediaelement everytime the playlist reaches the start.
I realise that this doesn't solve the root cause of the problem, but it may be a workable workaround.
Yesterday I have removed K-Lite Codec pack from my machine and installed instead ffsshow + Haali Matroska Splitter and run another test. This test is running already about 25 hrs without any video problem. So, hope, this was the codec issue and my test will work more then couple of days.
精彩评论