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:

http://www.tcarnews.com/MP4-Progressive-Download.aspx

Download:

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[] { "www.remix-video.com", "www.mediasoftpro.com" };

ii: Set list of restricted domains:

private static string[] _restricted_domains = new string[] { "www.sampledomain.com", "www.sampledomain2.com", "www.sampledomain3.com" };

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 asp.net mp4 streaming script as

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

 

Any feedback or more discussion on this article click here.