regarding streaming, how does a program like skype work?
Asked Answered
F

2

9

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.

Farrell answered 8/10, 2009 at 6:14 Comment(0)
V
6

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.

Villarreal answered 8/10, 2009 at 6:17 Comment(2)
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.Farrell
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.Villarreal
D
5

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.

Dit answered 8/10, 2009 at 6:23 Comment(1)
Good and clear explanation. I'm a bit late to the game BTW. But now I have a task of streaming video from clients android to a web page. How can i achieve it? Is this the same technology available today? Can you guide me in any way? I don't know even if it bothers but my scope is restricted to java and .net.Minify

© 2022 - 2024 — McMap. All rights reserved.