downloading streaming video
<p>I have used VLC to download video file from IP Camera and it working. But then, i want to do the downloading without using EXE file.<br>
Using this code, i can download the file, but the problem is the video fili(.asf) is a non-stop streaming file. <br>
I need to download just for a 5nimutes for exaMple. How can i stop the downloading without making the video corrupt? and i want to save it in .AVI format.</p>

<pre><code>string url = "http://Ip.Cam.Address:Port/videostream.asf";
string savePath = Server.MapPath("\\video\\a.avi");
string username = "username";
string password = "password";

using (WebClient client = new WebClient())
{
    client.Credentials = new NetworkCredential(username, password);
    client.DownloadFile(url, savePath);
}
</code></pre>
