WPF Seamless video play back -
i'm working on project right in need of seamless video transition between multiple videos in wpf application.
a second monitor being used media player, events being sent screen fire off videos, video position being used fire events according video hitting specific intervals. project using prism events being fired it's event aggregator.
the issue finding way of playing videos in wpf accommodate buffering between videos. don't have code examples methods tried have attempted using.
- the native wpf media element. buggy , not user friendly. bad play , huge gaps between media files.
- wpfmediakit best solution far, video play fine 2 issues. media screen stops playing videos @ seems random times , control goes black. , transition between videos half second of black.
- hosting axwindowsmediaplayer in windowsformshost. play great there huge gap between videos, when running playlist (this not happen in windows media player there missing.) control hosted in windowsformshost i'm not sure if possible keep(bind) videos position, , position event not appear caught.
- gmf play - seems have same issues wpfmediakit except seen collapsed rather screen going black during transitions.
edit media player example
media element setup
private void createmediakitelement() { wpfmediakit.begininit(); wpfmediakit.stretch = stretch.fill; wpfmediakit.loadedbehavior = wpfmediakit.directshow.mediaplayers.mediastate.manual; wpfmediakit.mediaended += wpfmediakit_mediaended; wpfmediakit.volume = 0; wpfmediakit.endinit(); } private void playvideo(string uri, ienumerable<interval> intervals) { // stop current audio track if new video being shown. audioelement.stop(); wpfmediakit.stop(); // wpfmediakit = null; //try recreating element wpfmediakit = new mediaurielement(); createmediakitelement(); wpfmediakit.source = new uri(uri, urikind.relative); wpfmediakit.play(); }
so question, know of or have example of method play videos in wpf seamless transition between videos?
thanks in advance, oli
Comments
Post a Comment