MPEG-DASH content in StreamingServer application

MPEG-DASH is ISO/IEC 23009 “Dynamic Adaptive Streaming over HTTP” specification. This is widely used to stream audiovisual content over internet opposed to playback of static content such as downloaded clip.

The StreamingServer application I published some time ago generated test content using HTTP Live Streaming protocol, which is, well, similar.

So I extended StreamingServer a bit and made it expose the media as MPEG-DASH content as well. The feature set is way narrower than in the case of HLS, it’s just a VOD asset, but it’s a bit sophisticated: multi-period with three periods and not so obvious internal layout. Experimental, a sort of.

I will use the space of this post to document steps to enable playback of this content.

Once again what the application does in first place? Once started, the application (or a service, if converted to run as a Windows service) is jumping onto Windows HTTP Server API (so you might need to run it with elevated privileges) and extends built-in web server by providing content. If executed with no arguments, it connects to http://localhost/hls/ node and is ready to serve http://localhost/hls/master.m3u8 for HLS playback, and now also http://localhost/hls/manifest.mpd for MPEG-DASH playback. http://localhost/hls/about has some embedded documentation.

Serving the requests, the application prepares audio and video content on the fly, for video it leverages NVIGIA GPU hardware video encoder if available, bit it also has a fallback code path to use Microsoft software encoder. The application is not designed for concurrent access by multiple clients and of course real time video encoding has its own capacity too. The application is rather a verification tool, internally it runs a few Microsoft Media Foundation pipelines (media sessions) for various things: to obtains RFC 6381 “codecs” data, initialization and media segments etc.

To play MPEG-DASH asset perhaps the most popular player would be Shaka Player, which specifically has a convenient online demo. There is custom content section where manifest URL http://localhost/hls/manifest.mpd can be added for playback.

One problem here is CORS with security and permissions for browser code. The demo is running over HTTPS and so it can’t consume HTTP media asset. To work this around StreamingServer needs to be started with these command line switches, to register on both HTTP and HTTPS nodes of the web server.

StreamingServer.exe -Location http://+:80/hls/ -Location https://+:443/hls/

In order to use the application non-locally over HTTPS you might need to configure IIS first and add a certificate there. Self-signed certificate works out fine as long as you add trust to it on the client side.

What happens next? We are good to go.

The blue, green and red parts represent separate periods which are stitched smoothly during playback (it is easy to see what’s inside by downloading the manifest and opening it in your favorite XML editor).

Some more perks:

The rest of the properties of video and audio are hardcoded for MPEG-DASH.

Further reading:

Download links


  • 64-bit: StreamingServer.exe (in .ZIP archive)
  • License: This software is free to use; builds have time based expiration

Leave a Reply