Greeting, What is the best practice to do Video streaming between two clients using C#.
First client will have a windows app that allow to brows the second client PC and select a viedo file to play it in the first client PC via an IP address.
Thank you,
For video streaming you should use the UDP protocol.
It's more efficient for real-time connections like video streaming to use UDP because dropped packets will quickly be replaced by new ones. And if you put some kind of ordering on the packets, you can reassemble them correctly at the receiving end.
You can create a UDP socket using System.Net.Sockets.UdpClient. Or if you want, use the System.Net.Sockets.Socket class to directly access the Winsock32 API.
You should go for TCP/IP as transport layer, is faster than HTTP and is more suited for such large binary data. I would also use WCF (Windows Communication Foundation) which makes streaming very easy. If you never worked with WCF you could have streaming up and running inside a couple hours.
Here is a link about streaming and WCF.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With