tags:

views:

185

answers:

2

When programs such as Skype streams video from a user to another and vice versa, how is that usually accomplished?

Does client A stream to a server, and server sends it to client B?

or does it go directly from client A to B?

Feel free to correct me if i am way off and none of those is correct.

+2  A: 

Skype is much more complicated than that, because it is Peer to Peer, meaning that your stream may travel through several other skype clients, acting as several servers. Skype does not have a huge central system for this. Skype always keeps track of multiple places that it can deliver your stream to, so that if one of these places disappear (that Skype client disappears), then it will continue sending through another server/skype-client. This is done so efficiently, that you don't notice the interruption.

Lars D
thanks for this.So Skype acts a server/client simultaneously? interesting. If i were to make a video streaming program like skype,using a central server(thus, streams would go from clientA -> server -> clientB), would that be slow? This is a bit deeper than the original question, so feel free to ignore if you don't know the answer.
lyrae
It is usually much better to have a central server instead of using the Skype method. The main reason why Skype uses Peer to Peer methods, is that the company does not need to set up servers, and therefore has fewer costs.I would set up a central server, just like you suggest, too. It makes it much easier to establish connections.
Lars D
+3  A: 

Basically , this is how its achieved.

1) encode video / audio using the best compression you can get. Go lossy compression and plenty of aliasing to throw away portions of video and audio which is not usable. Like removing background hiss

2) pack video / audio into packets and put a timestamp on them. The packets are usually datagrams.

3) send packets directly to destination. Use the most appropriate route. You dont have to send all packets the same way. Use many routes if possible. P2P networks often use many routes to the same destination

4) re-encode on the destination. If a packet is too old , throw it away. If packets are lost , dont bother about it since its too late.

5) join the video back and fill in the missing frames the best you can.

Andrew Keith
thanks.sounds complicated but i will give a go at it.
lyrae