title: Stream video content through Web API 2
body: <p>I'm in the process of working out what the best way is going to be to do the following:</p>
  
  <p>I have a bunch of CCTV footage files (MP4 files, ranging from 4MB-50MB in size), which I want to make available through a web portal. My first thought was to stream the file through Web API, so I found the link below:</p>
  
  <p><a href="http://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/" rel="noreferrer">http://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/</a></p>
  
  <p>After implementing a sample project, I realised that the example was based on Web API 1, and not Web API 2.1, which is what I'm using. After doing some more research, I got the code to compile with WebAPI 2.1. I then realised that if I want to do streaming I cannot use MP4 files, there is a fair amount of technical detail behind this, so here is the thread: </p>
  
  <p><a href="https://stackoverflow.com/questions/21921790/best-approach-to-real-time-http-streaming-to-html5-video-client">Best approach to real time http streaming to HTML5 video client</a></p>
  
  <p>It seems for this to work I need to encode my MP4 files to something like WebM, but that is going to take too much time. Icecast (<a href="http://icecast.org/" rel="noreferrer">http://icecast.org/</a>), which is a streaming server, but I haven't tried it out yet, again not sure if this is what I need to do.</p>
  
  <p>Now that I think of it, I actually don't need live streaming, I just need to allow the client to play the video file through their browser, perhaps using HTML5 video element? The thing is, my application needs to work on IOS as well, so I reckon that means I cant even encode my MP4 to FLV and just use flash.</p>
  
  <p>All I really need is to have all my video clips as thumbnails on a web page, and if the client clicks on one, it begins to play ASAP, without having to download the entire file. Think of the "Watch Trailer" feature on imdb.com. Simply just play a video file, thats really what I want. I don't need LIVE streaming, which is what I think WebM is for? Again, not sure.</p>