#
Comprehensive Guide to IIS Smooth Streaming Implementation
IIS Smooth Streaming is Microsoft's implementation of adaptive streaming technology that dynamically adjusts video quality based on network conditions and CPU capabilities. This guide provides detailed instructions on configuring and implementing IIS Smooth Streaming using VisioForge SDKs.
#
Compatible VisioForge SDKs
Video Capture SDK .Net Video Edit SDK .Net
VideoCaptureCore VideoEditCore
#
Overview of IIS Smooth Streaming
IIS Smooth Streaming provides several key advantages for developers and end-users:
- Adaptive bitrate streaming: Automatically adjusts video quality based on available bandwidth
- Reduced buffering: Minimizes playback interruptions during network fluctuations
- Broad device compatibility: Works across desktops, mobile devices, smart TVs, and more
- Scalable delivery: Handles large numbers of concurrent viewers efficiently
This technology is particularly valuable for applications requiring high-quality video delivery across varied network conditions, such as live events, educational platforms, and media-rich applications.
#
Prerequisites
Before implementing IIS Smooth Streaming with VisioForge SDKs, ensure you have:
- Windows Server with IIS installed
- Administrative access to the server
- Relevant VisioForge SDK (Video Capture SDK .Net or Video Edit SDK .Net)
- Basic understanding of .NET development
#
Step-by-Step IIS Configuration
#
Installing Required Components
- Install Web Platform Installer on your server.
- Through the Web Platform Installer, search for and install IIS Media Services.
This component package includes all necessary modules for Smooth Streaming functionality, including the Live Smooth Streaming Publishing service.
#
Configuring IIS Manager
- Open IIS Manager on your server through the Start menu or by running
inetmgr
in the Run dialog.
- In the left navigation pane, locate and expand your server name, then select the site where you want to enable Smooth Streaming.
#
Creating a Publishing Point
- Within the selected site, find and open the "Live Smooth Streaming Publishing Points" feature.
- Click "Add" to create a new publishing point.
- Configure the basic settings for your publishing point:
- Name: Provide a descriptive name for your publishing point (e.g., "MainStream")
- Path: Specify the file path where the Smooth Streaming content will be stored
- Configure additional parameters by enabling the "Allow clients to connect to this publishing point" checkbox. This ensures that clients can connect and receive the streamed content.
#
Enabling Mobile Device Support
To ensure your Smooth Streaming content is accessible on mobile devices:
- In the publishing point configuration, navigate to the "Mobile Devices" tab.
- Enable the checkbox for "Allow playback on mobile devices."
This setting generates the necessary formats and manifests for mobile playback, significantly expanding your content's reach.
#
Setting Up the Player
To provide viewers with a way to watch your Smooth Streaming content:
- Download the Smooth Streaming Player Silverlight control provided by Microsoft.
- Extract the downloaded files and locate the
.xap
file. - Copy this
.xap
file to your website's directory. - Copy the included HTML file to the same directory and rename it to
index.html
. - Open
index.html
in a text editor and replace the "initparams" section with the following configuration:
<param name="initParams" value="selectedCaptionStreamsCount=0,
autoplay=true,
muted=false,
displayCCButton=false,
mediaLoadTimeout=60000,
stretchMode=none,
poster=,
enableGPUAcceleration=true,
startupBitrate=400000,
disableDynamicHeader=false,
backwardBufferLength=0,
initialEntryStartPosition=0,
forwardBufferLength=10000,
sourceType=livetv,
adaptivestreamingplugin.smoothstreaming=true,
adaptivestreamingplugin.LiveSmoothStreaming=true,
mediaurl=http://localhost/mainstream.isml/manifest" />
This configuration initializes the Silverlight player with optimal settings for Smooth Streaming playback. The mediaurl
parameter should point to your publishing point's manifest.
#
Starting the Publishing Point
- Return to IIS Manager and select your configured publishing point.
- Click the "Start" action in the right-hand panel.
The publishing point will now be active and ready to receive content from your application.
#
Implementing Smooth Streaming in VisioForge SDK Applications
#
Basic Configuration
To implement IIS Smooth Streaming in your VisioForge SDK application:
- Open your application built with Video Capture SDK .Net or Video Edit SDK .Net.
- Navigate to the network streaming settings section.
- Enable network streaming functionality.
- Select "Smooth Streaming" as the streaming method.
- Enter the publishing point URL (e.g.,
http://localhost/mainstream.isml
). - Configure additional streaming parameters as needed (bitrate, resolution, etc.).
- Start the stream.
#
Verifying the Connection
Once your application is configured:
- Check the connection status in your application. You should see confirmation that the SDK has successfully connected to IIS.
- Open a web browser and navigate to
http://localhost
(or your server address). - The Silverlight player should load and begin playing your stream.
#
HTML5 Streaming for iOS Devices
For broader device compatibility, particularly iOS devices that don't support Silverlight, create an HTML5 player:
- Create a new HTML file in your website's directory.
- Include the following code in the file:
<!DOCTYPE html>
<html>
<head>
<title>Smooth Streaming HTML5 Player</title>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 20px; }
.player-container { max-width: 800px; margin: 0 auto; }
video { width: 100%; height: auto; }
</style>
</head>
<body>
<div class="player-container">
<h1>HTML5 Smooth Streaming Player</h1>
<video id="videoPlayer" controls autoplay>
<source src="http://localhost/mainstream.isml/manifest(format=m3u8-aapl)" type="application/x-mpegURL">
Your browser does not support HTML5 video.
</video>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
var video = document.getElementById('videoPlayer');
video.addEventListener('error', function(e) {
console.error('Video playback error:', e);
});
});
</script>
</body>
</html>
This HTML5 player uses HLS (HTTP Live Streaming) format, which is automatically generated by IIS Media Services when you enable mobile device support.
#
Required Redistributables
To ensure your application functions correctly with IIS Smooth Streaming, include the following redistributables:
- SDK redistributables for your specific VisioForge SDK
- MP4 redistributables:
- For x86 architectures: VisioForge.DotNet.Core.Redist.MP4.x86
- For x64 architectures: VisioForge.DotNet.Core.Redist.MP4.x64
You can add these packages through NuGet Package Manager in Visual Studio or via the command line:
Install-Package VisioForge.DotNet.Core.Redist.MP4.x64
#
Advanced Configuration Options
For production environments, consider these additional configurations:
- Multiple bitrate encoding: Configure your VisioForge SDK to encode at multiple bitrates for optimal adaptive streaming
- Custom manifest settings: Modify the Smooth Streaming manifest for specialized playback requirements
- Authentication: Implement token-based authentication for secure streaming
- Content encryption: Enable DRM protection for sensitive content
- Load balancing: Configure multiple publishing points behind a load balancer for high-traffic scenarios
#
Troubleshooting Common Issues
- Connection failures: Verify firewall settings allow traffic on the streaming port (typically 80 or 443)
- Playback stuttering: Check server resources and consider increasing buffer settings
- Mobile compatibility issues: Ensure mobile format generation is enabled and test across multiple devices
- Quality issues: Adjust encoding parameters and bitrate ladder configuration
#
Conclusion
IIS Smooth Streaming, when implemented with VisioForge SDKs, provides a robust solution for adaptive video delivery across diverse network conditions and devices. By following this comprehensive guide, you can configure, implement, and optimize Smooth Streaming for your .NET applications.
For additional code samples and implementation examples, visit our GitHub repository.
This documentation is provided by VisioForge. For additional support or information about our SDKs, please visit www.visioforge.com.