This is a Pixelflut server (see here or here for details) written in C# taking advantage of the relatively new performance-focused C# 7.2 feature Span<T>
to reduce memory allocations during handling of Pixelflut traffic. On my system (i7-7820HQ, 32GB DDR4-2400) it is able to handle about 1 GBit/s per connection/thread (4-5 GBit/s total).
- Supported commands:
SIZE
to get the current canvas sizePX X Y RRGGBB
/PX X Y RRGGBBAA
to set the color for the pixel at the given positionPX X Y
to retrieve the pixel color at the given positionOFFSET X Y
to set an offset to apply to pixels sent in the futureHELP
to get a short help text about pixelflut
- simple output viewing via MJPEG (supported on all major browsers)
- optional NDI output
- Prometheus metrics (pixels sent/received, bytes received, current number of Pixelflut and HTTP connections, etc.)
If you're using Docker, docker-compose up --build -d
should get you up and running in a few seconds.
If you don't want to use Docker, you can either run this on Windows using Visual Studio or on Windows/Linux/macOS using .NET SDK. Settings can also be set via environment variables.
sudo apt update && sudo apt install dotnet-sdk-6.0
Don't forget to turn off the standby timeout in the energy saving options!
wget https://downloads.ndi.tv/SDK/NDI_SDK_Linux/Install_NDI_SDK_v6_Linux.tar.gz
tar -xzf Install_NDI_SDK_v6_Linux.tar.gz
./Install_NDI_SDK_v6_Linux.sh
cp 'NDI SDK for Linux/lib/x86_64-linux-gnu/libndi.so.6.0.0' '/lib/Processing.NDI.Lib.x64.dll'
Width=1280
Height=720
EnableNdi=true
AdditionalText='Hello World!'
see PixelFlutServerConfig.cs for more
Example startup with HTTP port 8080, Pixelflut port 1234:
cd PixelFlutServer/PixelFlutServer.Mjpeg
MjpegPort=8080 PixelFlutPort=1234 dotnet run -c Release