Nathaire

Hi,

I want to save a video stream from a IP camera. I can access this stream with an URI. I just want to download the video stream during some time (ie 1 minute) and save the data to a file. The problem is I can't have access to the Result because i have to cancel the async operation.

Here's what I want to do in TCP point of view:

Establish a connection : SYN, SYN-ACK, ACK

Retrieving the video data : GET /img/video.asf

Stopping after some time and save the result to a file. I want to send a FIN and not a RST.

Is it possible with WebClient or some other classes

Thanks in advance

Nathaire



Re: .NET Framework Networking and Communication Trying to get a video stream with Webclient

H. Tony

WebClient is for some simple tasks, my guess is that you will have to use HttpRequest class, which has BinaryRead() method.






Re: .NET Framework Networking and Communication Trying to get a video stream with Webclient

Nathaire

Thanks, I'll follow your advice and try it.

Nathaire





Re: .NET Framework Networking and Communication Trying to get a video stream with Webclient

Nathaire

I've tried to use HTTPRequest, but it seems to be use only within aspx Pages. I want to create an application that can receive the video stream with an http GET. HttpRequest seems not usable in this goal. Am I wrong

Nathaire





Re: .NET Framework Networking and Communication Trying to get a video stream with Webclient

Jeris

If you are familiar with Http protocol and socket programming. you can implement it by System.Net.Sockets.





Re: .NET Framework Networking and Communication Trying to get a video stream with Webclient

Jörg Jooss - MSFT

WebClient.DownloadFile() should works just fine. For more advanced scenarios, you have to interact with HttpWebRequest directly, but WebClient allows you to manipulate the actual HttpWebRequest under its hood.

And yes, HttpRequest is an ASP.NET class and is of no use here .