wpfmediaplayback

WPF wmv/mpg files skipping and jumping


I am trying to play some WMV/MPG files using the MediaElement control and for some reason, the video files jump and skip while they are playing.

I have played them on their own, outside of the WPF application and they seem to play ok, so why might this be?

I do scale them so that they are smaller, could that be an issue?

Also, if you think that its a codec issue, can I download an application to see what type on encoding it has? I do have 1 (and only one) video file that plays perfectly, so I would want to mimic that one if possible.

EDIT: I just tried to use one of the Vista videos that sit in the "Sample Videos" folder and it is also jumpy... I have no idea why. Its a WMV file.

For some reason, I can get one video file to play ok, which is a MPG file (actually it only skips once, and its hard to notice), curious that its an MPG file thouh..

Thanks a lot! Mark


Solution

  • Ok, so in a flurry of external libraries and articles I came across this codeplex library:

    http://www.codeplex.com/WPFMediaKit

    Which has a control the is a replacement for the MediaElement control, called MediaUriElement, I hot-swapped the WPF MediaElement control with this one and all the media issues went away! It even has a Loop flag so you dont have to reset the media Position property when the media ends!

    Its only early days of testing, but so far so good :)