El Sampsa
El Sampsa

Reputation: 1733

Massive live video streaming using Linux

I am considering different ways to stream a massive number of live videos to the screen in linux/X11, using multiple independent processes.

I started the project initially with openGL/GLX and openGL textures, but that was a dead end. The reason: "context switching". It turns out that (especially nvidia) performs poorly when several (independent multi-)processes are manipulating at fast pace textures, using multiple contexts. This results in crashes, freezes, etc.

( see the following thread: https://lists.freedesktop.org/archives/nouveau/2017-February/027286.html )

I finally turned into Xvideo and it seems to work very nicely. My initial tests show that Xvideo handles video dumping ~ 10 times more effectively than openGL and does not crash. One can demonstrate this running ~ 10 vlc clients with 720p@25fps and trying both Xvideo and OpenGL output (remember to put all fullscreen).

However, I am suspecting that Xvideo uses, under the hood, openGL, so let's see if I am getting this right ..

Both Xvideo and GLX are extension modules of X11, but:

(A) Dumping video through Xvideo:

(B) Dumping video "manually" through GLX and openGL texture dumping:

Am I getting this right?

Is there any way to achieve, using openGL directly, situation (A) ?
.. one might have to drop GLX completely, which starts to be a bit hard-core.

Upvotes: 1

Views: 992

Answers (1)

El Sampsa
El Sampsa

Reputation: 1733

It's been a while but I finally got it sorted out, using OpenGL textures and multithreading. This seems to be the optimal way:

https://elsampsa.github.io/valkka-core/html/process_chart.html

(disclaimer: I did that)

Upvotes: 1

Related Questions