Best practice for streaming video using C #

Greetings, What is the best practice for streaming video between two clients using C #.

The first client will have a Windows application that allows you to view the second client PC and select the viedo file to play it on the first client PC via the IP address.

Thank,

+3
source share
3 answers

You should use TCP / IP as the transport layer, faster than HTTP, and more suitable for such large binary data. I would also use WCF (Windows Communication Foundation), which simplifies streaming. If you have never worked with WCF, you could start and run in a couple of hours.

WCF.

+3

Silverlight !

+3

UDP.

It is more efficient for real-time connections, such as video streaming, to use UDP, because dropped packets will be quickly replaced by new ones. And if you place any orders on packages, you can collect them correctly on the receiving side.

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.

+3
source

Source: https://habr.com/ru/post/1779707/


All Articles