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.


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

s1.addVariable("file","sample.mp4"); s1.addVariable("streamer","http://full_mp4_streaming_path/mp4-streamer.ashx");