Skip to main content

Progressive MP4 Streaming in ASP.NET

After flash flv streaming mp4 streaming is much popular format now a days for streaming videos over the web.

ASP.NET MP4 Streaming Script:

ASP.NET MP4 Streaming Script provides ability to stream and protect mp4 videos over the web.

Main features includes

  • Stream mp4 videos progressively: Load and play mp4 video without downloading whole video and can start playing video from any duration.
  • Protect Videos: Protect original download url of mp4 video while streaming over the web.
  • Allowed Domains: Allow selected list of domains to stream video. This protect misusing website bandwidth and server resources while streaming and sharing videos from other domains.
  • Restricted Domains: Restrict select list of domains to access and stream mp4 videos.
  • Player: Support every player that support mp4 videos and streaming like JW Player.
  • It work on IIS 6 or later
  • No special configuration required in web.config file.

Live Demo:


You can download ASP.NET MP4 Streaming script from here. Download

Sample Code:

i: Set list of allowed domains:

private static string[] _allowed_domains = new string[] { "", "" };

ii: Set list of restricted domains:

private static string[] _restricted_domains = new string[] { "", "", "" };

iii: Enable disable domain allow and restriction:

private bool _islimitdomain = false;

private bool _isrestrictdomain = false;

iv: Video directory settings: (path where mp4 videos exist)

private string _vsk_path_files = "/contents/test/";

v: Player level settings: in JW Player you can use mp4 streaming script as



Any feedback or more discussion on this article click here.