Auto adjust quality based on network speed (or buffering progress).

Topics: Windows 8 Xaml
Mar 22, 2013 at 7:11 PM
Is there a standard way to auto adjust video quality based on network speed. My app plays HD videos(mp4) by default. Sometime I see buffering issues. Ideally I should switch to low quality when buffering takes too much time but can't see any obvious way to implement this. Smooth streaming looks fantastic! but I can't use it because I play videos from 3rd party services. any help appreciated.
Mar 22, 2013 at 8:10 PM
The short answer is no. This is in fact the reason to use smooth (adaptive) streaming instead of progressive download.

However, assuming you have different quality versions of the same video, there are a couple things you could do:
1) You could add a setting to your app to let the user choose which quality to watch. In your app you would then pass along the appropriate url on the player framework. Switching during playback is not ideal though because it would have to load a new video and the user will experience buffering -- but could be done by resetting the source and setting the StartupPosition property.
2) Instead of asking the user, you could try to choose the appropriate quality for them by querying their network speed (you'd have to research the best way to do this -- checking if it's a metered connection is one way to do this).
Mar 23, 2013 at 6:09 PM
Thanks Tim. I am doing 1st as of now. I will take a look at option 2 and see how can I best optimize it. thanks again!!!!
Jul 31, 2013 at 11:02 AM
Edited Jul 31, 2013 at 3:06 PM
Hi Tim,

Is there any build-in technique to give users possibility to set the video quality?
I am getting 5 urls from 3d party server. Each url is representing video with the specific quality: 240,360,480,720,1080

I want to give users possibility to switch between them.

Right now i can see only one way to do this:
1) Edit xaml of MediaPlayer control to add a combobox
2) implement logic, so Source will be switched to chosen video quality url
Aug 8, 2013 at 5:08 PM
@Alexey_Vashchenko, yes, this is the only way to do this today. Note: depending on how you want the player to look, you could also add your combo box to the app bar or app settings. This would probably be easier than creating a custom skin... just a thought.