简体   繁体   中英

How to multiplex multiple video streams in Linux (Gnome)

I have a number of computers (clients) distributed around the house and are connected through a wired LAN. My goal is to collect video streams from all of these computers and display them on a single (server) large screen. Clients can stream their desktop, or a video file, or a text (as an image), or whatever.

At this point I prepare the low-resolution visual data on the clients and display them individually on the server using OpenGL. Now I want to create a dynamic grid and show multiple streams on the same window. Dynamic, because at any given time only some of the clients will be streaming. I want to make these grid change its structure depending on the number of active clients. The clients and the server, are all running Linux and Gnome. I'm currently inclined to go with OpenGL and to use a separate thread for each client. I don't know if this is a good idea since each stream might have a different update rate .

What do you think is the simplest way, as in less coding without sacrificing flexibility, to achieve this functionality? Which technology is most suitable for this task? I have very limited knowledge on graphics programming.

You can draw a set of rectangles — one for each video. Each videoframe would be a texture for its rectangle. You can change textures independently and with different rates.

If each of your computers has a dedicated modern GPU you can leverage it in a process known as parallel rendering. That means that each GPU is responsible of rendering a part of the final frame.One of your PCs becomes the composer and the rest are "slaves".Every slave renders its part and fetches the result to the composer which assembles the final frame.The setup of such a system is no an easy one but you gain considerable performance boost + scalebility.

Take a look at Equalizer framework.It can reduce the amount of development toil in such a case .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM