IIS Smooth streaming low quality on start

前端 未结 4 1460
温柔的废话
温柔的废话 2020-12-31 21:26

I m hosting some adaptive streaming video on windows azure and I have noticed that at the beginning the video start with the lowest avaiable bitrate. That is a big issue.

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 21:38

    As the other answer mentioned, use MMPPF (previously Silverlight Media Framework). Much more full-featured player and relatively easy to customize (with video tutorials, too).

    For the bitrate - yes, the Smooth Streaming algorithm is designed for the lowest latency start possible - therefore, lowest bitrate/video chunk is used on start. However, it is possible to do what you want.

    You will need to do 2 things, first:

    Add a handler to the player's OnMediaPluginRegistered event. In that event, check to see if it's an IAdaptiveMediaPlugin - you'll need the instance of that plugin. Here's a sample...

        IAdaptiveMediaPlugin _adaptivePlugin = null;
    
        void OnMediaPluginRegistered(object sender, Microsoft.SilverlightMediaFramework.Core.CustomEventArgs e)
        {
            var adaptivePlugin = e.Value as IAdaptiveMediaPlugin;
    
            if (adaptivePlugin == null) { return; }
    
            if (_adaptivePlugin == null)
            {
                _adaptivePlugin = adaptivePlugin;
            }
        }
    

    Once you have that, wait for one of the media open events to fire (MediaOpened or something), and you will now have access to a method on IAdaptiveMediaPlugin called SetVideoBitrateRange(...).

    For example:

    _adaptivePlugin.SetVideoBitrateRange(minBitrate, maxBitrate, true);
    

    That should give you what you need.

提交回复
热议问题